summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorOdoo's Mergebot <xmo+roboto@odoo.com>2020-03-31 09:49:08 +0200
committerGitHub <noreply@github.com>2020-03-31 09:49:08 +0200
commit0e9f4e6cdea02573702577c4754b129f9d84cdd8 (patch)
treec0c83535f6c0f91a9a227e3e7959c8da6e902b3c /addons/web/static/tests/fields/basic_fields_tests.js
parent30f4f610bf146638b71a0b2a936f8ae9acef502e (diff)
parent72feab43b16d9d49703eacb7c886aafad9faa6c5 (diff)
[IMP] web: convert FieldBoolean to Owl
This commit aims to convert the FieldBoolean into Owl. For this, we also add missing features to AbstractFieldOwl (and to the renderers that will use them), like the keyboard navigation. Enterprise PR: https://github.com/odoo/enterprise/pull/8041 Task 2193996 closes odoo/odoo#44267 Related: odoo/enterprise#8041 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
-rw-r--r--addons/web/static/tests/fields/basic_fields_tests.js7
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");