[FIX] website: add test for website filter in list view
With the Milk redesign in [1], the possibility to select a website on the filter/search view on our custom list views (e.g. on website.pages) to filter out the ones not related to a website and only keep the ones with a website_id or no website_id (and not shadowed by a website_id one) disappeared. It has been fixed in [2], but in order to prevent future breaks, this commit tests this functionality. task-3355253 [1]: https://github.com/odoo/odoo/commit/caef16ee4e5351142ef04f02798999ccb38a56bc [2]: https://github.com/odoo/odoo/commit/9237ca777fb9c5e9bda03c2d0dbe0deed8e1b2e5 closes odoo/odoo#127911 X-original-commit: d4a77cb112d3596b4313fcc4962d9d9d5af99d1d Related: odoo/design-themes#670 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -26,6 +26,31 @@ const checkKanbanGroupBy = [{
|
||||
trigger: '.o_cp_searchview .o_facet_remove',
|
||||
}];
|
||||
|
||||
const checkWebsiteFilter = [{
|
||||
content: "Click on the search options",
|
||||
trigger: ".o_searchview_dropdown_toggler",
|
||||
}, {
|
||||
content: "Select My Website 2",
|
||||
trigger: ".o_dropdown_container.o_website_menu > .dropdown-item:contains('My Website 2')",
|
||||
}, {
|
||||
content: "Check that the homepage is now the one of My Website 2",
|
||||
trigger: ".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home') " +
|
||||
"~ .o_data_cell[name=website_id]:contains('My Website 2')",
|
||||
run: () => null, // it's a check
|
||||
}, {
|
||||
content: "Check that the search options are still open",
|
||||
trigger: ".o_search_bar_menu",
|
||||
run: () => null, // it's a check
|
||||
}, {
|
||||
content: "Go back to My Website",
|
||||
trigger: ".o_dropdown_container.o_website_menu > .dropdown-item:contains('My Website')",
|
||||
}, {
|
||||
content: "Check that the homepage is now the one of My Website",
|
||||
trigger: ".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home') " +
|
||||
"~ .o_data_cell[name=website_id]:contains('My Website'):not(:contains('2'))",
|
||||
run: () => null, // it's a check
|
||||
}];
|
||||
|
||||
const deleteSelectedPage = [
|
||||
{
|
||||
content: "Click on Action",
|
||||
@@ -62,6 +87,7 @@ wTourUtils.registerWebsitePreviewTour('website_page_manager', {
|
||||
trigger: 'a.dropdown-item[data-menu-xmlid="website.menu_website_pages_list"]',
|
||||
},
|
||||
...checkKanbanGroupBy,
|
||||
...checkWebsiteFilter,
|
||||
{
|
||||
content: "Click on Home Page",
|
||||
trigger: `.o_list_renderer ${homePage} td.o_list_record_selector input[type="checkbox"]`,
|
||||
|
||||
Reference in New Issue
Block a user