Skip to content

Commit 4bcb53c

Browse files
sobo-odooxlu-odoo
authored andcommitted
[FIX] theme_test_custo: consider the top_menu navbar class in tests
In PR [1], the duplicated navbars ids `o_main_nav` and `top_menu` are replaced by classes, to avoid having the same ids multiple times in the DOM. Note that for stability, the ids are kept for the desktop view navbar. This commit adapts the tests so they now consider the classes and not the ids. [1]: odoo/odoo#146492 task-3609531 closes odoo#780 X-original-commit: 103e544 Related: odoo/odoo#156013 Signed-off-by: Quentin Smetz (qsm) <[email protected]>
1 parent a960ff2 commit 4bcb53c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

theme_test_custo/static/tests/tours/theme_menu_hierarchies.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', {
88
}, () => [
99
{
1010
content: 'Check Mega Menu is correctly created',
11-
trigger: 'iframe #top_menu a.o_mega_menu_toggle',
11+
trigger: "iframe .top_menu a.o_mega_menu_toggle",
1212
}, {
1313
content: 'Check Mega Menu content',
14-
trigger: 'iframe #top_menu div.o_mega_menu.show .fa-cube',
14+
trigger: "iframe .top_menu div.o_mega_menu.show .fa-cube",
1515
run: () => null, // It's a check.
1616
}, {
1717
content: 'Check new top level menu is correctly created',
18-
trigger: 'iframe #top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")',
18+
trigger: 'iframe .top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")',
1919
}, {
2020
content: 'Check sub menu are correctly created',
21-
trigger: 'iframe #top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")',
21+
trigger: 'iframe .top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")',
2222
run: () => null, // It's a check.
2323
}, {
2424
content: 'The new menu hierarchy should not be included in the navbar',
25-
trigger: 'iframe body:not(:has(#top_menu a[href="/dogs"]))',
25+
trigger: 'iframe body:not(:has(.top_menu a[href="/dogs"]))',
2626
run: () => null, // It's a check.
2727
}, {
2828
content: 'The new menu hierarchy should be inside the footer',

0 commit comments

Comments
 (0)