[FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours [FIX][TMP] account: CogMenu selector in tours [FIX][TMP] web*: Breadcrumb targetting in tours Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter how much elements it contains (collapsed parts, visible path, single name...). add classname on last breadcrumb item [FIX][TMP] project: View buttons selector in tours (moved away from CP) [FIX][TMP] project: Kanban selectors in tours (quick create) [FIX][TMP] *: SearchBar selectors in tours (toggle menu) [FIX][TMP] *: ButtonBox selector in tours [WIP][IMP] web: add toggleSearchBarMenu in search helpers adapt and unskip 3 list tests adapt and unskip calendar tests unskip web_tour test that actually pass post rebase fix allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later post rebase fixes fix Part-of: odoo/odoo#116641
This commit is contained in:
@@ -384,10 +384,24 @@ export function click(el, selector, skipVisibilityCheck = false) {
|
||||
}
|
||||
|
||||
export function clickCreate(htmlElement) {
|
||||
if (htmlElement.querySelectorAll(".o_form_button_create").length) {
|
||||
return click(htmlElement, ".o_form_button_create");
|
||||
} else if (htmlElement.querySelectorAll(".o_list_button_create").length) {
|
||||
return click(htmlElement, ".o_list_button_create");
|
||||
if (
|
||||
htmlElement.querySelectorAll(
|
||||
".o_control_panel_main_buttons .d-none.d-xl-inline-flex .o_form_button_create"
|
||||
).length
|
||||
) {
|
||||
return click(
|
||||
htmlElement,
|
||||
".o_control_panel_main_buttons .d-none.d-xl-inline-flex .o_form_button_create"
|
||||
);
|
||||
} else if (
|
||||
htmlElement.querySelectorAll(
|
||||
".o_control_panel_main_buttons .d-none.d-xl-inline-flex .o_list_button_create"
|
||||
).length
|
||||
) {
|
||||
return click(
|
||||
htmlElement,
|
||||
".o_control_panel_main_buttons .d-none.d-xl-inline-flex .o_list_button_create"
|
||||
);
|
||||
} else {
|
||||
throw new Error("No edit button found to be clicked.");
|
||||
}
|
||||
@@ -407,8 +421,10 @@ export async function clickSave(htmlElement) {
|
||||
}
|
||||
if (htmlElement.querySelectorAll(".o_form_button_save").length) {
|
||||
return click(htmlElement, ".o_form_button_save");
|
||||
} else if (htmlElement.querySelectorAll(".o_list_button_save").length) {
|
||||
return click(htmlElement, ".o_list_button_save");
|
||||
}
|
||||
const listSaveButtons = htmlElement.querySelectorAll(".o_list_button_save");
|
||||
if (listSaveButtons.length) {
|
||||
return listSaveButtons.length >= 2 ? click(listSaveButtons[1]) : click(listSaveButtons[0]);
|
||||
} else {
|
||||
throw new Error("No save button found to be clicked.");
|
||||
}
|
||||
@@ -420,8 +436,8 @@ export async function clickDiscard(htmlElement) {
|
||||
}
|
||||
if (htmlElement.querySelectorAll(".o_form_button_cancel").length) {
|
||||
return click(htmlElement, ".o_form_button_cancel");
|
||||
} else if (htmlElement.querySelectorAll(".o_list_button_discard").length) {
|
||||
return click(htmlElement, ".o_list_button_discard");
|
||||
} else if ($(htmlElement).find(".o_list_button_discard:visible").length) {
|
||||
return click($(htmlElement).find(".o_list_button_discard:visible").get(0));
|
||||
} else {
|
||||
throw new Error("No discard button found to be clicked.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user