diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-03-27 10:56:44 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-03-31 07:11:01 +0000 |
| commit | 4520a09f2c789626d6aba074e063deb490a5bb52 (patch) | |
| tree | 0c7b1154e623240afef2d17aa8211615e781dd38 /addons/web/static/tests/fields | |
| parent | 9324282b0118e311382ee9a57cd10ef3f02d1dbb (diff) | |
[REF] web: convert FieldBoolean to owl
This commit does 4 things:
- adds a file for deprecated legacy fields.
- moves legacy FieldBoolean into this file.
- converts FieldBoolean to owl component.
- adds a new xml file for component fields' templates.
task id: 2193996
Diffstat (limited to 'addons/web/static/tests/fields')
| -rw-r--r-- | addons/web/static/tests/fields/basic_fields_tests.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 6bd62b2d25c..710dd66e40e 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -267,12 +267,14 @@ QUnit.module('basic_fields', { assert.containsOnce(form, '.o_field_boolean input:checked', "checkbox should now be checked"); // blindly press enter again, it should uncheck the checkbox - $(document.activeElement).trigger({type: "keydown", which: $.ui.keyCode.ENTER}); + await testUtils.dom.triggerEvent(document.activeElement, "keydown", + {which: $.ui.keyCode.ENTER}); assert.containsNone(form, '.o_field_boolean input:checked', "checkbox should not be checked"); await testUtils.nextTick(); // blindly press enter again, it should check the checkbox back - $(document.activeElement).trigger({type: "keydown", which: $.ui.keyCode.ENTER}); + await testUtils.dom.triggerEvent(document.activeElement, "keydown", + {which: $.ui.keyCode.ENTER}); assert.containsOnce(form, '.o_field_boolean input:checked', "checkbox should still be checked"); @@ -333,6 +335,7 @@ QUnit.module('basic_fields', { // the checkbox directly in readonly mode ! $cell = list.$('tr.o_data_row:has(.custom-checkbox input:not(:checked)) td:not(.o_list_record_selector)').first(); await testUtils.dom.click($cell.find('.custom-checkbox .custom-control-label')); + await testUtils.nextTick(); assert.strictEqual(list.$('tbody td:not(.o_list_record_selector) .custom-checkbox input').length, 5, "should still have 5 checkboxes"); |
