From eae9980e0cf4f150594029b8c34cdd5adb467dc2 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Thu, 2 Nov 2023 18:56:40 +0100 Subject: [PATCH] [FIX] web: fix clickbot blacklisted menus for event In f0b7838f the event_barcode was moved from enterprise to community, so the menu for the registration desk changed. As this menu was blacklisted in the clickbot, it started to fail in the nightly tests. While at it: * remove useless and noisy log * log when a menu is skipped instead of telling that it was tested closes odoo/odoo#140805 Signed-off-by: Jorge Pinna Puissant (jpp) --- addons/web/static/src/webclient/clickbot/clickbot.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/webclient/clickbot/clickbot.js b/addons/web/static/src/webclient/clickbot/clickbot.js index 92dd27974b9..7134a29a154 100644 --- a/addons/web/static/src/webclient/clickbot/clickbot.js +++ b/addons/web/static/src/webclient/clickbot/clickbot.js @@ -14,7 +14,7 @@ const MOUSE_EVENTS = ["mouseover", "mouseenter", "mousedown", "mouseup", "click" const BLACKLISTED_MENUS = [ "base.menu_theme_store", // Open a new tab "base.menu_third_party", // Open a new tab - "event_barcode.menu_event_registration_desk", // there's no way to come back from this menu (tablet mode) + "event.menu_event_registration_desk", // there's no way to come back from this menu (tablet mode) "hr_attendance.menu_hr_attendance_kiosk_no_user_mode", // same here (tablet mode) "account.menu_action_account_bank_journal_form", // Modal in an iFrame ]; @@ -358,10 +358,11 @@ async function testViews() { async function testMenuItem(element) { const menu = element.dataset.menuXmlid; const menuDescription = element.innerText.trim() + " " + menu; - browser.console.log(`Testing menu ${menuDescription}`); if (BLACKLISTED_MENUS.includes(menu)) { + browser.console.log(`Skipping blacklisted menu ${menuDescription}`); return Promise.resolve(); // Skip black listed menus } + browser.console.log(`Testing menu ${menuDescription}`); testedMenus.push(menu); const startActionCount = actionCount; await triggerClick(element, `menu item "${element.innerText.trim()}"`); @@ -462,8 +463,6 @@ async function _clickEverywhere(xmlId) { } finally { cleanup(); } - console.log(testedApps); - console.log(testedMenus); } function clickEverywhere(xmlId, light) {