[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) <jpp@odoo.com>
This commit is contained in:
Christophe Monniez
2023-11-06 11:16:41 +00:00
parent c82ffda05d
commit eae9980e0c
@@ -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) {