mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
[FIX] theme_test_custo: add test for the mobile/desktop theme preview
With the Milk redesign in [1], the possibility to use the mobile/desktop switcher on a theme preview to see how it behaves/displays on those devices didn't work anymore. 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/9445f61bcaee88bc6ac2fc373d7eca4e4b38c154 closes odoo/design-themes#661 Related: odoo/odoo#124839 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import tour from "web_tour.tour";
|
||||
|
||||
tour.register("website_theme_preview", {
|
||||
test: true,
|
||||
url: "/web#action=website.action_website_configuration",
|
||||
},
|
||||
[{
|
||||
content: "Click on create new website",
|
||||
trigger: 'button[name="action_website_create_new"]',
|
||||
}, {
|
||||
content: "insert website name",
|
||||
trigger: '[name="name"] input',
|
||||
run: "text Website Test",
|
||||
}, {
|
||||
content: "Validate the website creation modal",
|
||||
trigger: "button.btn-primary",
|
||||
},
|
||||
// Configurator first screen
|
||||
{
|
||||
content: "Click Skip and start from scratch",
|
||||
trigger: "button:contains('Skip and start from scratch')",
|
||||
}, {
|
||||
content: "Click on the Live preview of a theme",
|
||||
trigger: ".o_theme_preview .o_button_area .btn-secondary:contains('Live Preview')",
|
||||
}, {
|
||||
content: "Switch from desktop to mobile preview",
|
||||
trigger: ".btn[for=themeViewerMobile]",
|
||||
}, {
|
||||
content: "Check that the mobile view is active",
|
||||
trigger: ".o_view_form_theme_preview_controller .o_field_iframe > div.is_mobile:visible",
|
||||
run: () => null, // it's a check
|
||||
}, {
|
||||
content: "Switch back to desktop",
|
||||
trigger: ".btn[for=themeViewerDesktop]",
|
||||
}, {
|
||||
content: "Check that the desktop view is active",
|
||||
trigger: ".o_view_form_theme_preview_controller .o_field_iframe > div:not(.is_mobile):visible",
|
||||
run: () => null, // it's a check
|
||||
}]);
|
||||
Reference in New Issue
Block a user