diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-08-18 13:21:17 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-08-18 13:34:37 +0200 |
| commit | 74fe046e1ad3a8f5f5b1e4fe63eb651cb1bf96d6 (patch) | |
| tree | 8572886e7bd3d3ecb2c667ae8d4ac2b442755e6e /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 4efa4e9d9420d0283c8d7b9683d13d3cd0907400 (diff) | |
[FIX] web: missing test case for fix 0966f75b
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/basic_fields_tests.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 35fa05a8eab..1f9e416223c 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -718,6 +718,31 @@ QUnit.module('basic_fields', { form.destroy(); }); + QUnit.test('char field with size attribute', function (assert) { + assert.expect(1); + + this.data.partner.fields.foo.size = 5; // max length + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '<form>' + + '<sheet>' + + '<group><field name="foo"/></group>' + + '</sheet>' + + '</form>', + res_id: 1, + viewOptions: { + mode: 'edit', + }, + }); + + assert.strictEqual(form.$('input.o_field_widget').attr('maxlength'), '5', + "maxlength attribute should have been set correctly on the input"); + + form.destroy(); + }); + QUnit.test('char field in editable list view', function (assert) { assert.expect(6); |
