Files
design-themes/theme_test_custo/static/tests/tours/theme_menu_hierarchies.js
T
Romain Derie f4a772bffe [FIX] theme_test_custo: add bigger timeout to the new test
New test was introduced with [1] but it actually sometimes lead to
timeout errors.
That's a common issue since we merged the frontend in the backend and
some tour (like this one) now have to start both the backend and the
frontend (in the iframe).

10 seconds is not enough to load both, it often miss just half a second.

[1]: https://github.com/odoo/design-themes/commit/0e2497b8e84eab8957028f4d63ff0899a9fe6ab3

runbot-4684

closes odoo/design-themes#587

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 22:50:02 +02:00

66 lines
2.7 KiB
JavaScript

/** @odoo-module */
import wTourUtils from 'website.tour_utils';
wTourUtils.registerEditionTour('theme_menu_hierarchies', {
url: '/example',
test: true,
}, [
{
content: 'Check Mega Menu is correctly created',
trigger: 'iframe #top_menu a.o_mega_menu_toggle',
timeout: 20000,
}, {
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")',
}, {
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.clickOnEdit(),
{
content: 'Click on footer',
// TODO: this extra_trigger should be part of the `clickOnEdit` util
extra_trigger: "#oe_snippets.o_loaded",
trigger: 'iframe footer',
}, {
content: 'The theme custom footer template should be listed and selected',
trigger: 'we-select[data-variable="footer-template"] we-toggler img[src*="/theme_test_custo"]',
run: () => null, // It's a check.
}, {
content: 'Click on header',
trigger: 'iframe header',
}, {
content: 'The theme custom header template should be listed and selected',
trigger: 'we-select[data-variable="header-template"] we-toggler img[src*="/theme_test_custo"]',
run: () => null, // It's a check.
}, {
content: 'Click on image which has a shape',
trigger: 'iframe #wrap .s_text_image img[data-shape]',
}, {
content: 'The theme custom "Blob 01" shape should be listed and selected',
trigger: 'we-select[data-name="shape_img_opt"] we-toggler: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]',
}, {
content: 'The theme custom "Curve 01" shape should be listed and selected',
trigger: 'we-select[data-name="bg_shape_opt"] we-toggler:contains("Curve 01")',
run: () => null, // It's a check.
},
]);