[FIX] web,*: fix all tests and test utils to use native events
In this commit: - transformed test_utils helpers to always trigger native events - introduced new test_utils_create helper: prepareTarget - updated qunit asserts to support Owl Components - updated all misused helpers that would crash with the updated test_utils Co-authored-by: Julien Mougenot <jum@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Pierre Rousseau <pro@odoo.com>
This commit is contained in:
co-authored by
Julien Mougenot
Mathieu Duckerts-Antoine
Pierre Rousseau
parent
29726e8fd0
commit
b0941d19a0
@@ -2435,7 +2435,7 @@ QUnit.module('basic_fields', {
|
||||
function waitForChangeTriggered() {
|
||||
return def.then(function () {
|
||||
def = testUtils.makeTestPromise();
|
||||
return concurrency.delay(0);
|
||||
return testUtils.nextTick();
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -5988,7 +5988,7 @@ QUnit.module('basic_fields', {
|
||||
|
||||
// Focusing the field selector input should open the field selector
|
||||
// popover
|
||||
await testUtils.dom.triggerEvents($fieldSelector, ['focusin']);
|
||||
await testUtils.dom.triggerEvents($fieldSelector, 'focus');
|
||||
var $fieldSelectorPopover = $fieldSelector.find(".o_field_selector_popover");
|
||||
assert.ok($fieldSelectorPopover.is(":visible"),
|
||||
"field selector popover should be visible");
|
||||
@@ -6057,7 +6057,7 @@ QUnit.module('basic_fields', {
|
||||
"there should be a field selector");
|
||||
|
||||
// Focusing its input should open the field selector popover
|
||||
await testUtils.dom.triggerEvents($fieldSelector, ['focusin']);
|
||||
await testUtils.dom.triggerEvents($fieldSelector, 'focus');
|
||||
var $fieldSelectorPopover = $fieldSelector.find(".o_field_selector_popover");
|
||||
assert.ok($fieldSelectorPopover.is(":visible"),
|
||||
"field selector popover should be visible");
|
||||
|
||||
Reference in New Issue
Block a user