*: test_website_modules, website_sale When one starts a trial with the website app, they arrive on a webpage in edit mode. Many users struggle to understand they need to save before accessing the Odoo navbar (app switcher, creation of new page, etc.). Additionally, if they want to navigate through Odoo, not having to discard could save some time. It was therefore decided to land on the homepage without editor after creating a website. The first step of the homepage tour should then be to click on the edit button. When creating an empty website (skipping the configurator), the website loader is shown until the page is ready, to avoid the user leaving the page before the first step is displayed. On another related note, if one wants to try out the Odoo website builder, they might create multiple DB, one per website, which is OK. In such a case, the link to 'my database' is not visible from the website app because the user profile was hidden. The user menu is therefore added to the navbar on the website app. In order to make sure the header and its dropdowns always stay on top of the website's elements regardless of their z-index, `.o_website_preview` is blocked in its own stacking context with `isolation: isolate;`. task-3381773 closes odoo/odoo#133031 Related: odoo/enterprise#46992 Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
90 lines
2.8 KiB
JavaScript
90 lines
2.8 KiB
JavaScript
/** @odoo-module **/
|
|
|
|
import wTourUtils from "@website/js/tours/tour_utils";
|
|
|
|
wTourUtils.registerWebsitePreviewTour('automatic_editor_on_new_website', {
|
|
test: true,
|
|
url: '/',
|
|
},
|
|
() => [
|
|
{
|
|
content: "Select the language dropdown",
|
|
trigger: 'iframe .js_language_selector .dropdown-toggle'
|
|
},
|
|
{
|
|
content: "click on Add a language",
|
|
trigger: 'iframe a.o_add_language',
|
|
},
|
|
{
|
|
content: "type Parseltongue",
|
|
trigger: 'div[name="lang_ids"] .o_input_dropdown input',
|
|
run: 'text Parseltongue',
|
|
},
|
|
{
|
|
content: 'select Parseltongue',
|
|
trigger: '.dropdown-item:contains(Parseltongue)',
|
|
in_modal: false,
|
|
},
|
|
{
|
|
content: "load parseltongue",
|
|
extra_trigger: '.modal div[name="lang_ids"] .rounded-pill .o_tag_badge_text:contains(Parseltongue)',
|
|
trigger: '.modal-footer button[name=lang_install]',
|
|
},
|
|
{
|
|
content: "Select the language dropdown",
|
|
trigger: 'iframe .js_language_selector .dropdown-toggle',
|
|
},
|
|
{
|
|
content: "Select parseltongue",
|
|
trigger: 'iframe a.js_change_lang[data-url_code=pa_GB]',
|
|
extra_trigger: 'iframe a.js_change_lang .o_lang_flag',
|
|
},
|
|
{
|
|
content: "Check that we're on parseltongue and then go to settings",
|
|
trigger: 'iframe html[lang=pa-GB]',
|
|
run: () => {
|
|
// Now go through the settings for a new website. A frontend_lang
|
|
// cookie was set during previous steps. It should not be used when
|
|
// redirecting to the frontend in the following steps.
|
|
window.location.href = '/web#action=website.action_website_configuration';
|
|
}
|
|
},
|
|
{
|
|
content: "create a new website",
|
|
trigger: 'button[name="action_website_create_new"]',
|
|
},
|
|
{
|
|
content: "insert website name",
|
|
trigger: 'div[name="name"] input',
|
|
run: 'text Website EN'
|
|
},
|
|
{
|
|
content: "validate the website creation modal",
|
|
trigger: 'button.btn-primary'
|
|
},
|
|
{
|
|
content: "skip configurator",
|
|
// This trigger targets the skip button, it doesn't have a more
|
|
// explicit class or ID.
|
|
trigger: '.o_configurator_container .container-fluid .btn.btn-link'
|
|
},
|
|
{
|
|
content: "make hover button appear",
|
|
trigger: '.o_theme_preview',
|
|
run: () => {
|
|
$('.o_theme_preview .o_button_area').attr('style', 'visibility: visible; opacity: 1;');
|
|
},
|
|
},
|
|
{
|
|
content: "Install a theme",
|
|
trigger: 'button[name="button_choose_theme"]'
|
|
},
|
|
{
|
|
content: "Check that the homepage is loaded",
|
|
trigger: ".o_website_preview[data-view-xmlid='website.homepage']",
|
|
extra_trigger: ".o_menu_systray .o_user_menu",
|
|
timeout: 30000,
|
|
isCheck: true,
|
|
},
|
|
]);
|