From 898e69b8df40eb492acad38335339f96144caee3 Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Wed, 14 Sep 2022 09:12:57 +0000 Subject: [PATCH] [FIX] test_mail: fix activity widget test Before this PR, any fail during the QUnit test suite would have failed the activity widget test. This is due to the fact that this test was relying on the activity table to be the only table present in the document. This issue is that QUnit is also using table to display failed tests. Thus, the activity widget test was looking in the wrong table to find its elements. This commit fixes the issue by ensuring the test is actually targeting the right table that is, the one inside the activity view. Part-of: odoo/odoo#99924 --- addons/test_mail/static/tests/activity_tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/test_mail/static/tests/activity_tests.js b/addons/test_mail/static/tests/activity_tests.js index 6d4e1d05bdf..e73089ce223 100644 --- a/addons/test_mail/static/tests/activity_tests.js +++ b/addons/test_mail/static/tests/activity_tests.js @@ -263,7 +263,7 @@ QUnit.test('activity view: activity widget', async function (assert) { }, }); - const activity = $(document); + const activity = $('.o_activity_view'); var today = activity.find('table tbody tr:first td:nth-child(2).today'); var dropdown = today.find('.dropdown-menu.o_activity');