Files
design-themes/theme_test_custo/static/tests/tours/theme_menu_hierarchies.js
T
Hubert Van De Walle 1a000aaf89 [FIX] theme_test_custo: correct tour trigger to look for svg images
Since [1], the test "test_01_menu_hierarchies" fails.

Note that the check is not as strong as before as we cannot check the
source of the image.

Since [2], the btn-primary is now btn-secondary
---

[1]: https://github.com/odoo/odoo/commit/3cc5ff6e96493f2b068090f880987def3787895e
[2]: https://github.com/odoo/odoo/commit/eca4d1b1d4ea58959793b0a2cbfa443308759372

runbot-226641

closes odoo/design-themes#1106

Signed-off-by: Robin Lejeune (role) <role@odoo.com>
2025-06-25 16:56:54 +00:00

70 lines
2.9 KiB
JavaScript

/** @odoo-module */
import * as wTourUtils from '@website/js/tours/tour_utils';
import { stepUtils } from "@web_tour/tour_service/tour_utils";
wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', {
url: '/example',
}, () => [
stepUtils.waitIframeIsReady(),
{
content: 'Check Mega Menu is correctly created',
trigger: ":iframe .top_menu a.o_mega_menu_toggle",
run: "click",
}, {
content: 'Check Mega Menu content',
trigger: ":iframe .top_menu div.o_mega_menu.show .fa-cube",
run: () => null, // It's a check.
}, {
content: 'Check new top level menu is correctly created',
trigger: ':iframe .top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")',
run: "click",
}, {
content: 'Check sub menu are correctly created',
trigger: ':iframe .top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")',
run: () => null, // It's a check.
}, {
content: 'The new menu hierarchy should not be included in the navbar',
trigger: ':iframe body:not(:has(.top_menu a[href="/dogs"]))',
run: () => null, // It's a check.
}, {
content: 'The new menu hierarchy should be inside the footer',
trigger: ':iframe footer ul li a[href="/dogs"]',
run: () => null, // It's a check.
},
...wTourUtils.clickOnEditAndWaitEditMode(),
{
content: 'Click on footer',
trigger: ':iframe footer',
run: "click",
}, {
content: 'The theme custom footer template should be listed and selected',
trigger: '[data-container-title="Footer"] [data-label="Template"] button.btn-secondary svg.theme_test_custo_footer',
run: () => null, // It's a check.
}, {
content: 'Click on header',
trigger: ':iframe header',
run: "click",
}, {
content: 'The theme custom header template should be listed and selected',
trigger: '[data-container-title="Header"] [data-label="Template"] button.btn-secondary svg.theme_test_custo_header',
run: () => null, // It's a check.
}, {
content: 'Click on image which has a shape',
trigger: ':iframe #wrap .s_text_image img[data-shape]',
run: "click",
}, {
content: 'The theme custom "Blob 01" shape should be listed and selected',
trigger: '[data-container-title="Image"] [data-label="Shape"] div.dropdown:contains("Blob 01")',
run: () => null, // It's a check.
}, {
content: 'Click on section which has a bg shape',
trigger: ':iframe #wrap .s_text_block[data-oe-shape-data]',
run: "click",
}, {
content: 'The theme custom "Curve 01" shape should be listed and selected',
trigger: '[data-container-title="Text"] [data-label="Shape"] button.btn-secondary:contains("Curve 01")',
run: () => null, // It's a check.
},
]);