Odoo18-Base/addons/website/static/tests/tours/specific_website_editor.js
2025-01-06 10:57:38 +07:00

27 lines
912 B
JavaScript

/** @odoo-module **/
import { registry } from "@web/core/registry";
import {
clickOnEditAndWaitEditMode,
registerWebsitePreviewTour
} from '@website/js/tours/tour_utils';
registerWebsitePreviewTour("generic_website_editor", {
edition: true,
}, () => [{
trigger: ':iframe body:not([data-hello="world"])',
content: 'Check that the editor DOM matches its website-generic features',
}]);
// Good practice would have been to use `registerWebsitePreviewTour`
// for this tour with `edition: true` and remove the first step to enter edit
// mode. Unfortunately this breaks the page and therefore the test fails for
// unknown reason.
registry.category("web_tour.tours").add('specific_website_editor', {
steps: () => [
...clickOnEditAndWaitEditMode(),
{
trigger: ':iframe body[data-hello="world"]',
content: 'Check that the editor DOM matches its website-specific features',
}]});