diff options
Diffstat (limited to 'addons/web/static/tests/widgets/model_field_selector_tests.js')
| -rw-r--r-- | addons/web/static/tests/widgets/model_field_selector_tests.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/addons/web/static/tests/widgets/model_field_selector_tests.js b/addons/web/static/tests/widgets/model_field_selector_tests.js index 23b5ed5d05c..9cbba06ad97 100644 --- a/addons/web/static/tests/widgets/model_field_selector_tests.js +++ b/addons/web/static/tests/widgets/model_field_selector_tests.js @@ -59,7 +59,7 @@ QUnit.module('ModelFieldSelector', { readonly: false, debugMode: true, }); - testUtils.addMockEnvironment(fieldSelector, {data: this.data}); + testUtils.mock.addMockEnvironment(fieldSelector, {data: this.data}); fieldSelector.appendTo($target); var $value = fieldSelector.$("> .o_field_selector_value"); @@ -84,7 +84,7 @@ QUnit.module('ModelFieldSelector', { // Clicking the "Bar" field should close the popover and set the field // chain to "bar" as it is a basic field - $barLi.click(); + testUtils.dom.click($barLi); assert.notOk($fieldSelectorPopover.is("visible"), "field selector popover should be closed now"); assert.strictEqual(getValueFromDOM($value), "Bar", @@ -118,7 +118,7 @@ QUnit.module('ModelFieldSelector', { // Clicking on the "Product" field should update the popover to show // the product fields (so only "Product Name" should be there) - $productLi.click(); + testUtils.dom.click($productLi); $lis = $fieldSelectorPopover.find("li"); assert.strictEqual($lis.length, 1, "there should be only one field proposition for 'product' model"); @@ -127,7 +127,7 @@ QUnit.module('ModelFieldSelector', { // Clicking on "Product Name" should close the popover and set the chain // to "product_id.name" - $lis.first().click(); + testUtils.dom.click($lis.first()); assert.notOk($fieldSelectorPopover.is("visible"), "field selector popover should be closed now"); assert.strictEqual(getValueFromDOM($value), "Product -> Product Name", @@ -135,8 +135,8 @@ QUnit.module('ModelFieldSelector', { // Remove the current selection and recreate it again fieldSelector.$el.trigger('focusin'); - fieldSelector.$('.o_field_selector_prev_page').click(); - fieldSelector.$('.o_field_selector_close').click(); + testUtils.dom.click(fieldSelector.$('.o_field_selector_prev_page')); + testUtils.dom.click(fieldSelector.$('.o_field_selector_close')); fieldSelector.$el.trigger('focusin'); $fieldSelectorPopover = fieldSelector.$(".o_field_selector_popover:visible"); @@ -151,9 +151,9 @@ QUnit.module('ModelFieldSelector', { assert.strictEqual($productLi.length, 1, "field selector popover should contain the 'Product' field"); - $productLi.click(); + testUtils.dom.click($productLi); $lis = $fieldSelectorPopover.find("li"); - $lis.first().click(); + testUtils.dom.click($lis.first()); assert.notOk($fieldSelectorPopover.is("visible"), "field selector popover should be closed now"); assert.strictEqual(getValueFromDOM($value), "Product -> Product Name", @@ -180,7 +180,7 @@ QUnit.module('ModelFieldSelector', { return field.type === 'many2one'; }, }); - testUtils.addMockEnvironment(fieldSelector, {data: this.data}); + testUtils.mock.addMockEnvironment(fieldSelector, {data: this.data}); fieldSelector.appendTo($target); fieldSelector.$el.trigger('focusin'); @@ -202,7 +202,7 @@ QUnit.module('ModelFieldSelector', { readonly: false, showSearchInput: true, }); - testUtils.addMockEnvironment(fieldSelector, {data: this.data}); + testUtils.mock.addMockEnvironment(fieldSelector, {data: this.data}); fieldSelector.appendTo($target); fieldSelector.$el.trigger('focusin'); |
