@@ -33,8 +33,8 @@ const checkScrollbar = function (hasScrollbar) {
33
33
} ;
34
34
} ;
35
35
36
- const toggleBackdrop = function ( ) {
37
- return changeOption ( 'SnippetPopup' , 'we-button[data-name="popup_backdrop_opt"] we- checkbox' , 'backdrop ') ;
36
+ const toggleBackdrop = function ( snippet ) {
37
+ return changeOption ( snippet , '.o- checkbox input ' ) ;
38
38
} ;
39
39
40
40
registerWebsitePreviewTour ( "snippet_popup_and_scrollbar" , {
@@ -49,17 +49,17 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
49
49
trigger : ':iframe .s_popup .modal' ,
50
50
run : "click" ,
51
51
} ,
52
- toggleBackdrop ( ) , // hide Popup backdrop
52
+ toggleBackdrop ( "Popup" ) , // hide Popup backdrop
53
53
checkScrollbar ( true ) ,
54
54
goBackToBlocks ( ) ,
55
55
{
56
56
content : "Drag the Content snippet group and drop it at the bottom of the popup." ,
57
- trigger : '#oe_snippets .oe_snippet [name="Content"] .oe_snippet_thumbnail :not(.o_we_ongoing_insertion)' ,
57
+ trigger : '.o-snippets-menu .o_snippet [name="Content"] .o_snippet_thumbnail :not(.o_we_ongoing_insertion)' ,
58
58
run : "drag_and_drop :iframe #wrap .s_popup .oe_drop_zone:last" ,
59
59
} ,
60
60
{
61
61
content : "Click on the s_media_list snippet." ,
62
- trigger : ':iframe .o_snippet_preview_wrap [data-snippet-id ="s_media_list"]' ,
62
+ trigger : ':iframe .o_add_snippets_preview [data-snippet="s_media_list"]' ,
63
63
run : "click" ,
64
64
} ,
65
65
checkScrollbar ( false ) ,
@@ -70,11 +70,11 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
70
70
} ,
71
71
{
72
72
content : "Remove the Media List snippet in the Popup." ,
73
- trigger : ":iframe .oe_overlay.oe_active .oe_snippet_remove" ,
73
+ trigger : "body .o_overlay_options .oe_snippet_remove" ,
74
74
run : "click" ,
75
75
} ,
76
76
checkScrollbar ( true ) ,
77
- toggleBackdrop ( ) , // show Popup backdrop
77
+ toggleBackdrop ( "Popup" ) , // show Popup backdrop
78
78
checkScrollbar ( false ) ,
79
79
{
80
80
content : "Close the Popup that has now backdrop." ,
@@ -88,9 +88,9 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
88
88
run : "click" ,
89
89
} ,
90
90
checkScrollbar ( true ) ,
91
- toggleBackdrop ( ) , // show Cookies Bar backdrop
91
+ toggleBackdrop ( "Cookies Bar" ) , // show Cookies Bar backdrop
92
92
checkScrollbar ( false ) ,
93
- toggleBackdrop ( ) , // hide Cookies Bar backdrop
93
+ toggleBackdrop ( "Cookies Bar" ) , // hide Cookies Bar backdrop
94
94
checkScrollbar ( true ) ,
95
95
{
96
96
content : "Open the Popup that has backdrop." ,
@@ -103,12 +103,12 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
103
103
goBackToBlocks ( ) ,
104
104
{
105
105
content : "Drag the Content snippet group and drop it at the bottom of the popup." ,
106
- trigger : '#oe_snippets .oe_snippet [name="Content"] .oe_snippet_thumbnail :not(.o_we_ongoing_insertion)' ,
106
+ trigger : '.o-snippets-menu .o_snippet [name="Content"] .o_snippet_thumbnail :not(.o_we_ongoing_insertion)' ,
107
107
run : "drag_and_drop :iframe #wrap .s_popup .oe_drop_zone:last" ,
108
108
} ,
109
109
{
110
110
content : "Click on the s_media_list snippet." ,
111
- trigger : ':iframe .o_snippet_preview_wrap [data-snippet-id ="s_media_list"]' ,
111
+ trigger : ':iframe .o_add_snippets_preview [data-snippet="s_media_list"]' ,
112
112
run : "click" ,
113
113
} ,
114
114
/* task-4185877
@@ -121,7 +121,7 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
121
121
} ,
122
122
{
123
123
content : "Remove the s_popup snippet" ,
124
- trigger : ".o_we_customize_panel we-customizeblock-options:contains( 'Popup') we-button .oe_snippet_remove:first " ,
124
+ trigger : ".o_customize_tab .options-container[data-container-title= 'Popup'] .oe_snippet_remove" ,
125
125
async run ( helpers ) {
126
126
await helpers . click ( ) ;
127
127
// TODO: remove the below setTimeout. Without it, goBackToBlocks() not works.
@@ -132,12 +132,12 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
132
132
goBackToBlocks ( ) ,
133
133
{
134
134
content : "Drag the Content snippet group and drop it in the Cookies Bar." ,
135
- trigger : '#oe_snippets .oe_snippet [name="Content"] .oe_snippet_thumbnail :not(.o_we_ongoing_insertion)' ,
135
+ trigger : '.o-snippets-menu .o_snippet [name="Content"] .o_snippet_thumbnail :not(.o_we_ongoing_insertion)' ,
136
136
run : "drag_and_drop :iframe #website_cookies_bar .modal-content.oe_structure" ,
137
137
} ,
138
138
{
139
139
content : "Click on the s_media_list snippet." ,
140
- trigger : ':iframe .o_snippet_preview_wrap [data-snippet-id ="s_media_list"]' ,
140
+ trigger : ':iframe .o_add_snippets_preview [data-snippet="s_media_list"]' ,
141
141
run : "click" ,
142
142
} ,
143
143
{
@@ -147,21 +147,18 @@ registerWebsitePreviewTour("snippet_popup_and_scrollbar", {
147
147
} ,
148
148
{
149
149
content : "Duplicate the Media List snippet" ,
150
- trigger : ".o_we_customize_panel we-customizeblock-options:contains('Media List') we-button.oe_snippet_clone:first" ,
151
- run ( ) {
152
- // TODO: use run: "click", instead
153
- this . anchor . click ( ) ;
154
- }
150
+ trigger :".o_customize_tab .options-container[data-container-title='Media List'] button.oe_snippet_clone" ,
151
+ run : "click" ,
155
152
} ,
156
153
checkScrollbar ( false ) ,
157
154
{
158
155
content : "Remove the first Media List snippet in the Cookies Bar." ,
159
- trigger : ":iframe .oe_overlay.oe_active .oe_snippet_remove" ,
156
+ trigger : "body .o_overlay_options .oe_snippet_remove" ,
160
157
run : "click" ,
161
158
} ,
162
159
{
163
160
content : "Remove the second Media List snippet in the Cookies Bar." ,
164
- trigger : ":iframe .oe_overlay.oe_active .oe_snippet_remove" ,
161
+ trigger : "body .o_overlay_options .oe_snippet_remove" ,
165
162
run : "click" ,
166
163
} ,
167
164
checkScrollbar ( true ) ,
0 commit comments