File: snippet_cache_across_websites.js

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (36 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/** @odoo-module **/

import {
    clickOnEditAndWaitEditMode,
    clickOnSave,
    registerWebsitePreviewTour,
    switchWebsite,
} from '@website/js/tours/tour_utils';

registerWebsitePreviewTour('snippet_cache_across_websites', {
    edition: true,
    url: '/@/'
}, () => [
    {
        content: "Click on the Custom category block",
        trigger: "#oe_snippets .oe_snippet[name='Custom'].o_we_draggable .oe_snippet_thumbnail",
        run: "click",
    },
    {
        content: "Ensure custom snippet preview appeared in the dialog",
        trigger: ":iframe .o_snippet_preview_wrap[data-snippet-id='s_text_block'] section[data-name='custom_snippet_test']",
    },
    {
        content: "Close the 'add snippet' dialog",
        trigger: ".o_add_snippet_dialog .modal-header .btn-close",
        run: "click",
    },
    // There's no need to save, but canceling might or might not show a popup...
    ...clickOnSave(),
    ...switchWebsite(2, 'My Website 2'),
    ...clickOnEditAndWaitEditMode(),
    {
        content: "Check that the custom snippet category is not here",
        trigger: "#oe_snippets:not(:has(.oe_snippet[name='Custom']))",
    },
]);