@@ -47,15 +47,19 @@ describe('DocTour', function () {
47
47
const docTour = await driver . executeScript ( 'return window._gristDocTour()' ) ;
48
48
assert . deepEqual ( docTour , [
49
49
{
50
- body : 'General Kenobi!' ,
50
+ body : '<div>' +
51
+ '<p>General Kenobi!</p>\n' +
52
+ '</div>' ,
51
53
placement : 'bottom' ,
52
54
selector : '.active_cursor' ,
53
55
showHasModal : false ,
54
56
title : 'Hello there!' ,
55
57
urlState : { colRef : 2 , rowId : 2 , sectionId : 1 }
56
58
} ,
57
59
{
58
- body : 'no title' ,
60
+ body : '<div>' +
61
+ '<p>no title</p>\n' +
62
+ '</div>' ,
59
63
placement : 'auto' ,
60
64
selector : '.active_cursor' ,
61
65
showHasModal : true ,
@@ -64,7 +68,7 @@ describe('DocTour', function () {
64
68
} ,
65
69
{
66
70
body : '<div>' +
67
- '<p ></p >' +
71
+ '<div ></div >' +
68
72
'<p><div class="_grainXXX_">' +
69
73
'<a href="https://www.getgrist.com/" target="_blank" class="_grainXXX_ _grainXXX_">' +
70
74
'<div class="_grainXXX_ _grainXXX_" style="mask-image: var(--icon-Page);"></div>' +
@@ -79,8 +83,8 @@ describe('DocTour', function () {
79
83
urlState : { colRef : 4 , rowId : 4 , sectionId : 1 }
80
84
} ,
81
85
{
82
- body : '<div>' +
83
- '<p>Good riddance</p>' +
86
+ body : '<div><div> ' +
87
+ '<p>Good riddance</p>\n</div> ' +
84
88
'<p><div class="_grainXXX_">' +
85
89
'<a href="https://xkcd.com/" target="_blank" class="_grainXXX_ _grainXXX_">' +
86
90
'Test link here' +
@@ -92,6 +96,113 @@ describe('DocTour', function () {
92
96
showHasModal : true ,
93
97
title : 'Bye' ,
94
98
urlState : null ,
99
+ } ,
100
+ {
101
+ body : '<div><p>' +
102
+ '<strong>bold</strong>' +
103
+ ' <em>italicized</em>' +
104
+ ' <code>code</code>' +
105
+ ' <del>strikethrough</del>' +
106
+ '</p>\n' +
107
+ '</div>' ,
108
+ placement : 'auto' ,
109
+ selector : '.active_cursor' ,
110
+ showHasModal : true ,
111
+ title : 'Markdown formating' ,
112
+ urlState : null ,
113
+ } ,
114
+ {
115
+ body : '<div><p></p>' +
116
+ '<div class="doc-tutorial-popup-thumbnail">\n' +
117
+ ' <img title="" src="https://example.com/image.jpg">\n' +
118
+ ' <div class="doc-tutorial-popup-thumbnail-icon-wrapper">\n' +
119
+ ' <div class="doc-tutorial-popup-thumbnail-icon"></div>\n' +
120
+ ' </div>\n</div><p></p>\n' +
121
+ '</div>' ,
122
+ placement : 'auto' ,
123
+ selector : '.active_cursor' ,
124
+ showHasModal : false ,
125
+ title : 'Markdown image' ,
126
+ urlState : {
127
+ "colRef" : 8 ,
128
+ "rowId" : 8 ,
129
+ "sectionId" : 1
130
+ } ,
131
+ } ,
132
+ {
133
+ body : '<div>' +
134
+ '<h1>H1</h1>\n<h2>H2</h2>\n<h3>H3</h3>\n' +
135
+ '</div>' ,
136
+ placement : 'auto' ,
137
+ selector : '.active_cursor' ,
138
+ showHasModal : true ,
139
+ title : 'Markdown headings' ,
140
+ urlState : null ,
141
+ } ,
142
+ {
143
+ body : '<div>' +
144
+ '<ol>\n<li>First item</li>\n<li>Second item</li>\n<li>Third item</li>\n</ol>\n' +
145
+ '</div>' ,
146
+ placement : 'auto' ,
147
+ selector : '.active_cursor' ,
148
+ showHasModal : false ,
149
+ title : 'Markdown ordered list' ,
150
+ urlState : {
151
+ "colRef" : 10 ,
152
+ "rowId" : 10 ,
153
+ "sectionId" : 1
154
+ } ,
155
+ } ,
156
+ {
157
+ body : '<div>' +
158
+ '<ul>\n<li>First item</li>\n<li>Second item</li>\n<li>Third item</li>\n</ul>\n' +
159
+ '</div>' ,
160
+ placement : 'auto' ,
161
+ selector : '.active_cursor' ,
162
+ showHasModal : true ,
163
+ title : 'Markdown unordered list' ,
164
+ urlState : null ,
165
+ } ,
166
+ {
167
+ body : '<div>' +
168
+ '<blockquote>\n<p>blockquote</p>\n</blockquote>\n' +
169
+ '</div>' ,
170
+ placement : 'auto' ,
171
+ selector : '.active_cursor' ,
172
+ showHasModal : false ,
173
+ title : 'Markdown quote' ,
174
+ urlState : {
175
+ "colRef" : 12 ,
176
+ "rowId" : 12 ,
177
+ "sectionId" : 1
178
+ } ,
179
+ } ,
180
+ {
181
+ body : '<div>' +
182
+ '<pre><code>{\n ' +
183
+ '"firstName": "John",\n "lastName": "Smith",\n "age": 25\n' +
184
+ '}\n' +
185
+ '</code></pre>\n' +
186
+ '</div>' ,
187
+ placement : 'auto' ,
188
+ selector : '.active_cursor' ,
189
+ showHasModal : true ,
190
+ title : 'Markdown code block' ,
191
+ urlState : null ,
192
+ } ,
193
+ {
194
+ body : '<div>' +
195
+ '<p><a href="https://www.example.com">title</a></p>\n' +
196
+ '</div>' ,
197
+ placement : 'auto' ,
198
+ selector : '.active_cursor' ,
199
+ showHasModal : false ,
200
+ title : 'Markdown link' ,
201
+ urlState : {
202
+ "colRef" : 14 ,
203
+ "rowId" : 14 ,
204
+ "sectionId" : 1
205
+ } ,
95
206
}
96
207
] ) ;
97
208
} ) ;
@@ -154,7 +265,8 @@ describe('DocTour', function () {
154
265
155
266
async function checkDocTourPresent ( ) {
156
267
// Check the expected message.
157
- assert . match ( await driver . findWait ( '.test-onboarding-popup' , 500 ) . getText ( ) , / G e n e r a l K e n o b i / ) ;
268
+ assert . isFalse ( await driver . findWait ( '.test-onboarding-popup' , 500 ) . findContent ( 'p' , 'General Kenobi!' ) . isPresent ( ) ) ;
269
+
158
270
// Check that there is only one popup, and no errors.
159
271
assert . lengthOf ( await driver . findAll ( '.test-onboarding-popup' ) , 1 ) ;
160
272
await gu . checkForErrors ( ) ;
0 commit comments