[FIX] web: clickall should not click on tablet mode views
Before this commit, clickall was clicking on an app that redirect to a tablet mode view. The issue with this is that clickall don't know how to exit the view, so it was stuck in the view. This commit adds that view on the blacklist of clickall. Also, this commit adds an error message when clickall is stuck in a view. closes odoo/odoo#146216 X-original-commit: 8f365824c9dddacf1b3a40688a30c8498df3d5d4 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -14,6 +14,7 @@ const BLACKLISTED_MENUS = [
|
||||
"base.menu_third_party", // Open a new tab
|
||||
"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)
|
||||
"mrp_workorder.menu_mrp_workorder_root", // same here (tablet mode)
|
||||
"account.menu_action_account_bank_journal_form", // Modal in an iFrame
|
||||
];
|
||||
// If you change this selector, adapt Studio test "Studio icon matches the clickbot selector"
|
||||
@@ -245,6 +246,9 @@ async function getNextApp() {
|
||||
await ensureAppsMenu();
|
||||
apps = document.querySelectorAll(".o_navbar_apps_menu .dropdown-item");
|
||||
}
|
||||
if (apps.length === 0) {
|
||||
throw new Error("No app found, it's possible that we are not on the home menu/app menu");
|
||||
}
|
||||
const app = apps[appIndex];
|
||||
appIndex++;
|
||||
return app;
|
||||
|
||||
Reference in New Issue
Block a user