|
1 | 1 | /** @odoo-module */ |
2 | 2 |
|
3 | 3 | import wTourUtils from '@website/js/tours/tour_utils'; |
| 4 | +import { stepUtils } from "@web_tour/tour_service/tour_utils"; |
4 | 5 |
|
5 | 6 | wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', { |
6 | 7 | url: '/example', |
7 | 8 | test: true, |
8 | 9 | }, () => [ |
| 10 | + stepUtils.waitIframeIsReady(), |
9 | 11 | { |
10 | 12 | content: 'Check Mega Menu is correctly created', |
11 | | - trigger: "iframe .top_menu a.o_mega_menu_toggle", |
| 13 | + trigger: ":iframe .top_menu a.o_mega_menu_toggle", |
12 | 14 | }, { |
13 | 15 | content: 'Check Mega Menu content', |
14 | | - trigger: "iframe .top_menu div.o_mega_menu.show .fa-cube", |
| 16 | + trigger: ":iframe .top_menu div.o_mega_menu.show .fa-cube", |
15 | 17 | run: () => null, // It's a check. |
16 | 18 | }, { |
17 | 19 | content: 'Check new top level menu is correctly created', |
18 | | - trigger: 'iframe .top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")', |
| 20 | + trigger: ':iframe .top_menu .nav-item.dropdown .dropdown-toggle:contains("Example 1")', |
19 | 21 | }, { |
20 | 22 | content: 'Check sub menu are correctly created', |
21 | | - trigger: 'iframe .top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")', |
| 23 | + trigger: ':iframe .top_menu .dropdown-menu.show a.dropdown-item:contains("Item 1")', |
22 | 24 | run: () => null, // It's a check. |
23 | 25 | }, { |
24 | 26 | content: 'The new menu hierarchy should not be included in the navbar', |
25 | | - trigger: 'iframe body:not(:has(.top_menu a[href="/dogs"]))', |
| 27 | + trigger: ':iframe body:not(:has(.top_menu a[href="/dogs"]))', |
26 | 28 | run: () => null, // It's a check. |
27 | 29 | }, { |
28 | 30 | content: 'The new menu hierarchy should be inside the footer', |
29 | | - trigger: 'iframe footer ul li a[href="/dogs"]', |
| 31 | + trigger: ':iframe footer ul li a[href="/dogs"]', |
30 | 32 | run: () => null, // It's a check. |
31 | 33 | }, |
32 | 34 | ...wTourUtils.clickOnEditAndWaitEditMode(), |
33 | 35 | { |
34 | 36 | content: 'Click on footer', |
35 | | - trigger: 'iframe footer', |
| 37 | + trigger: ':iframe footer', |
36 | 38 | }, { |
37 | 39 | content: 'The theme custom footer template should be listed and selected', |
38 | 40 | trigger: 'we-select[data-variable="footer-template"] we-toggler img[src*="/theme_test_custo"]', |
39 | 41 | run: () => null, // It's a check. |
40 | 42 | }, { |
41 | 43 | content: 'Click on header', |
42 | | - trigger: 'iframe header', |
| 44 | + trigger: ':iframe header', |
43 | 45 | }, { |
44 | 46 | content: 'The theme custom header template should be listed and selected', |
45 | 47 | trigger: 'we-select[data-variable="header-template"] we-toggler img[src*="/theme_test_custo"]', |
46 | 48 | run: () => null, // It's a check. |
47 | 49 | }, { |
48 | 50 | content: 'Click on image which has a shape', |
49 | | - trigger: 'iframe #wrap .s_text_image img[data-shape]', |
| 51 | + trigger: ':iframe #wrap .s_text_image img[data-shape]', |
50 | 52 | }, { |
51 | 53 | content: 'The theme custom "Blob 01" shape should be listed and selected', |
52 | 54 | trigger: 'we-select[data-name="shape_img_opt"] we-toggler:contains("Blob 01")', |
53 | 55 | run: () => null, // It's a check. |
54 | 56 | }, { |
55 | 57 | content: 'Click on section which has a bg shape', |
56 | | - trigger: 'iframe #wrap .s_text_block[data-oe-shape-data]', |
| 58 | + trigger: ':iframe #wrap .s_text_block[data-oe-shape-data]', |
57 | 59 | }, { |
58 | 60 | content: 'The theme custom "Curve 01" shape should be listed and selected', |
59 | 61 | trigger: 'we-select[data-name="bg_shape_opt"] we-toggler:contains("Curve 01")', |
|
0 commit comments