[FIX] web: clickbot: correctly select first level menus
Before this commit, when we wanted to select first level menus inside an app (i.e. menus available in the navbar), we could by mistake select sub-menus if the dropdown was opened (e.g. if it was previously tested). For instance, it happened in the 'Apps' app. It then led to wrong index computation, and a traceback. As a consequence, the nightly build failed as the clickEverywhere test didn't pass.
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
*/
|
||||
async function getNextMenu() {
|
||||
const menus = document.querySelectorAll(
|
||||
".o_menu_sections .o_dropdown_toggler, .o_menu_sections .o_dropdown_item"
|
||||
".o_menu_sections > .o_dropdown > .o_dropdown_toggler, .o_menu_sections > .o_dropdown_item"
|
||||
);
|
||||
if (menuIndex === menus.length) {
|
||||
menuIndex = 0;
|
||||
@@ -374,7 +374,7 @@
|
||||
async function _clickEverywhere(xmlId) {
|
||||
ensureSetup();
|
||||
console.log("Starting ClickEverywhere test");
|
||||
console.log(`Odoo flavor: ${isEnterprise} ? 'Enterprise' : 'Community'`);
|
||||
console.log(`Odoo flavor: ${isEnterprise ? "Enterprise" : "Community"}`);
|
||||
const startTime = performance.now();
|
||||
testedApps = [];
|
||||
testedMenus = [];
|
||||
|
||||
Reference in New Issue
Block a user