trabajo-afectivo/public/assets/tests/qunit/form_trim.js
2022-04-14 16:34:23 -03:00

33 lines
561 B (Stored with Git LFS)
JavaScript

QUnit.test( 'form trim checks', assert => {
var el = $('#form1')
var test_params = {
input1: '',
input2: '',
input3: 'a',
input4: 'a b',
input5: 'äö ü',
input6: [
'a',
'b',
'c',
'd'
],
textarea1: '',
textarea2: '',
textarea3: 'a',
textarea4: "test\r\n\r\n 123",
ce1: 'lala',
ce2: "la\nla",
}
el.find('[contenteditable]').ce({
mode: 'richtext'
})
var params = App.ControllerForm.params( el )
assert.deepEqual( params, test_params, 'form param check' )
})