summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/activity_tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/tests/activity_tests.js')
-rw-r--r--addons/mail/static/tests/activity_tests.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/addons/mail/static/tests/activity_tests.js b/addons/mail/static/tests/activity_tests.js
index 9f7f7fd8808..0c3a9311dec 100644
--- a/addons/mail/static/tests/activity_tests.js
+++ b/addons/mail/static/tests/activity_tests.js
@@ -172,7 +172,7 @@ QUnit.test('activity view: simple activity rendering', function (assert) {
}
});
- assert.strictEqual(activity.$('table').length, 1,
+ assert.containsOnce(activity, 'table',
'should have a table');
assert.ok(activity.$('table thead tr:first th:nth-child(2) span:first:contains(Email)').length,
'should contain "Email" in header of first column');
@@ -204,7 +204,7 @@ QUnit.test('activity view: no content rendering', function (assert) {
},
});
- assert.strictEqual(activity.$('.o_view_nocontent').length, 1,
+ assert.containsOnce(activity, '.o_view_nocontent',
"should display the no content helper");
assert.strictEqual(activity.$('.o_view_nocontent .o_view_nocontent_empty_folder').text().trim(),
"No data to display",
@@ -234,16 +234,16 @@ QUnit.test('activity view: batch send mail on activity', function (assert) {
assert.notOk(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show').length,
'dropdown shouldn\'t be displayed');
- activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) i.fa-ellipsis-v').click();
+ testUtils.dom.click(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) i.fa-ellipsis-v'));
assert.ok(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show').length,
'dropdown should have appeared');
- activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show .o_send_mail_template:first:contains(Task: Rating Request)').click();
+ testUtils.dom.click(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show .o_send_mail_template:first:contains(Task: Rating Request)'));
assert.notOk(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show').length,
'dropdown shouldn\'t be displayed');
- activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) i.fa-ellipsis-v').click();
- activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show .o_send_mail_template:nth-child(2):contains(Task: Reception Acknowledgment)').click();
+ testUtils.dom.click(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) i.fa-ellipsis-v'));
+ testUtils.dom.click(activity.$('table thead tr:first th:nth-child(2) span:nth-child(2) .dropdown-menu.show .o_send_mail_template:nth-child(2):contains(Task: Reception Acknowledgment)'));
assert.verifySteps([
[[13, 30], 9], //send mail template 9 on tasl 13 and 30
[[13, 30], 8] //send mail template 8 on tasl 13 and 30
@@ -305,28 +305,28 @@ QUnit.test('activity view: activity widget', function (assert) {
var today = activity.$('table tbody tr:first td:nth-child(2).today');
var dropdown = today.find('.dropdown-menu.o_activity');
- today.find('.o_closest_deadline').click();
- assert.ok(dropdown.hasClass('show'), "dropdown should be displayed");
+ testUtils.dom.click(today.find('.o_closest_deadline'));
+ assert.hasClass(dropdown,'show', "dropdown should be displayed");
assert.ok(dropdown.find('.o_activity_color_today:contains(Today)').length, "Title should be today");
assert.ok(dropdown.find('.o_activity_title_entry[data-activity-id="2"]:first div:contains(template8)').length,
"template8 should be available");
assert.ok(dropdown.find('.o_activity_title_entry[data-activity-id="2"]:eq(1) div:contains(template9)').length,
"template9 should be available");
- dropdown.find('.o_activity_title_entry[data-activity-id="2"]:first .o_activity_template_preview').click();
- dropdown.find('.o_activity_title_entry[data-activity-id="2"]:first .o_activity_template_send').click();
+ testUtils.dom.click(dropdown.find('.o_activity_title_entry[data-activity-id="2"]:first .o_activity_template_preview'));
+ testUtils.dom.click(dropdown.find('.o_activity_title_entry[data-activity-id="2"]:first .o_activity_template_send'));
var overdue = activity.$('table tbody tr:first td:nth-child(3).overdue');
- overdue.find('.o_closest_deadline').click();
+ testUtils.dom.click(overdue.find('.o_closest_deadline'));
dropdown = overdue.find('.dropdown-menu.o_activity');
assert.notOk(dropdown.find('.o_activity_title div div div:first span').length,
"No template should be available");
- dropdown.find('.o_schedule_activity').click();
- overdue.find('.o_closest_deadline').click();
- dropdown.find('.o_mark_as_done').click();
+ testUtils.dom.click(dropdown.find('.o_schedule_activity'));
+ testUtils.dom.click(overdue.find('.o_closest_deadline'));
+ testUtils.dom.click(dropdown.find('.o_mark_as_done'));
dropdown.find('#activity_feedback').val("feedback2");
- dropdown.find('.o_activity_popover_done_next').click();
+ testUtils.dom.click(dropdown.find('.o_activity_popover_done_next'));
assert.verifySteps([
"do_action_compose",
"activity_send_mail",