diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2019-12-04 10:44:32 +0000 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2019-12-09 11:09:10 +0000 |
| commit | b0941d19a07b08fabc64a284b58e57edc46203dd (patch) | |
| tree | a6b25026177d26a64c6c7f6005e27c41fca5c1b6 /addons/snailmail/static | |
| parent | 29726e8fd000cb09075f9b6b2a6a8d2ddaf4ef58 (diff) | |
[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>
Diffstat (limited to 'addons/snailmail/static')
| -rw-r--r-- | addons/snailmail/static/tests/chatter_snailmail_tests.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/snailmail/static/tests/chatter_snailmail_tests.js b/addons/snailmail/static/tests/chatter_snailmail_tests.js index 4b403030a69..8fcf0ce587b 100644 --- a/addons/snailmail/static/tests/chatter_snailmail_tests.js +++ b/addons/snailmail/static/tests/chatter_snailmail_tests.js @@ -127,7 +127,7 @@ QUnit.test('Sent', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_sent'), 'mouseenter'); + await testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_sent'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-check').length, @@ -162,7 +162,7 @@ QUnit.test('Canceled', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_canceled'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_canceled'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-trash-o').length, @@ -198,7 +198,7 @@ QUnit.test('Pending', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_pending'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_pending'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-clock-o').length, @@ -241,7 +241,7 @@ QUnit.test('No Price Available', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_no_price_available'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_no_price_available'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-exclamation').length, @@ -301,7 +301,7 @@ QUnit.test('Format Error', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_format_error'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_format_error'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-exclamation').length, @@ -350,7 +350,7 @@ QUnit.test('Credit Error', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_credit_error'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_credit_error'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-exclamation').length, @@ -418,7 +418,7 @@ QUnit.test('Trial Error', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_trial_error'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_trial_error'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-exclamation').length, @@ -487,7 +487,7 @@ QUnit.test('Missing Required Fields', async function (assert) { assert.containsNone(form, '.o_thread_tooltip_snailmail', "No tooltip should be present"); - testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_missing_required_fields'), 'mouseenter'); + testUtils.dom.triggerMouseEvent(form.$('.o_thread_message_snailmail_missing_required_fields'), 'mouseover'); assert.ok($('.o_thread_tooltip_snailmail:visible').length, "Tooltip should appear when hovering the Snailmail Icon"); assert.ok($('.o_thread_tooltip_snailmail_icon.fa-exclamation').length, |
