From bd040caf66c0aacddda78170d7438038ca6ea756 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 9 Feb 2023 17:56:40 +0000 Subject: [PATCH] [FIX] website: add step in tour to check website kanban override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See previous commit, it fixes a bug introduced by a recent change in the javascript framework that broke the website kanban override. This commit is ensuring that the kanban can be accessed and used. Ideally, it should have been a QUnit test but since this has to be merged ASAP (critical bug) and a test is more than welcome as it's not the first time our custom kanban is broken, a hook in an existing tourµ is used to easily and quickly test it in the meantime. closes odoo/odoo#112369 X-original-commit: aca72bcdae98e1304c934f67efa65273d636863a Signed-off-by: Romain Derie (rde) Signed-off-by: Jorge Pinna Puissant (jpp) --- .../static/tests/tours/page_manager.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/addons/website/static/tests/tours/page_manager.js b/addons/website/static/tests/tours/page_manager.js index d7f1f4d90cb..ca24b8f5cbf 100644 --- a/addons/website/static/tests/tours/page_manager.js +++ b/addons/website/static/tests/tours/page_manager.js @@ -2,6 +2,33 @@ import wTourUtils from 'website.tour_utils'; +// TODO: This part should be moved in a QUnit test +const checkKanbanGroupBy = [{ + content: "Click on Kanban View", + trigger: '.o_cp_switch_buttons .o_kanban', +}, { + content: "Click on Group By", + extra_trigger: '.o_kanban_renderer', + trigger: '.o_search_options .o_group_by_menu button', +}, { + content: "Click on Add Custom Group", + trigger: '.o_search_options .o_add_custom_group_menu button', + run: function (actions) { + this.$anchor[0].dispatchEvent(new MouseEvent('mouseenter')); + }, +}, { + content: "Click on Apply", // Active is selected by default + trigger: '.o_add_custom_group_menu .dropdown-menu .btn-primary', +}, { + content: "Click on List View", + extra_trigger: '.o_kanban_renderer .o_kanban_header', + trigger: '.o_cp_switch_buttons .o_list', +}, { + content: "Remove applied Group By", + extra_trigger: '.o_list_renderer', + trigger: '.o_cp_searchview .o_facet_remove', +}]; + const deleteSelectedPage = [ { content: "Click on Action", @@ -37,6 +64,7 @@ wTourUtils.registerWebsitePreviewTour('website_page_manager', { content: "Click on Pages", trigger: 'a.dropdown-item[data-menu-xmlid="website.menu_website_pages_list"]', }, + ...checkKanbanGroupBy, { content: "Click on Home Page", trigger: `.o_list_renderer ${homePage} td.o_list_record_selector input[type="checkbox"]`,