From f10d814809cdc927f4775744e55e5dbb073bd7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souk=C3=A9ina=20Bojabza?= Date: Wed, 10 Jan 2024 15:18:12 +0100 Subject: [PATCH] [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]: https://github.com/odoo/odoo/pull/146492 task-3609531 closes odoo/design-themes#756 Related: odoo/odoo#146492 Signed-off-by: Quentin Smetz (qsm) --- .../static/tests/tours/theme_menu_hierarchies.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/theme_test_custo/static/tests/tours/theme_menu_hierarchies.js b/theme_test_custo/static/tests/tours/theme_menu_hierarchies.js index f8fce0667..90f97007a 100644 --- a/theme_test_custo/static/tests/tours/theme_menu_hierarchies.js +++ b/theme_test_custo/static/tests/tours/theme_menu_hierarchies.js @@ -8,21 +8,21 @@ wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', { }, () => [ { content: 'Check Mega Menu is correctly created', - trigger: 'iframe #top_menu a.o_mega_menu_toggle', + trigger: "iframe .top_menu a.o_mega_menu_toggle", }, { content: 'Check Mega Menu content', - trigger: 'iframe #top_menu div.o_mega_menu.show .fa-cube', + trigger: "iframe .top_menu div.o_mega_menu.show .fa-cube", run: () => null, // It's a check. }, { content: 'Check new top level menu is correctly created', - trigger: 'iframe #top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")', + trigger: 'iframe .top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")', }, { content: 'Check sub menu are correctly created', - trigger: 'iframe #top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")', + trigger: 'iframe .top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")', run: () => null, // It's a check. }, { content: 'The new menu hierarchy should not be included in the navbar', - trigger: 'iframe body:not(:has(#top_menu a[href="/dogs"]))', + trigger: 'iframe body:not(:has(.top_menu a[href="/dogs"]))', run: () => null, // It's a check. }, { content: 'The new menu hierarchy should be inside the footer',