@@ -153,11 +153,18 @@ test.describe("interactive examples", () => {
153
153
154
154
await editor . click ( )
155
155
156
- await typeInQuery ( page , editor , "tagline" , "des " )
156
+ await typeInQuery ( page , editor , "tagline" , "contr " )
157
157
158
158
await page . keyboard . press ( "Control+Space" )
159
+ let autoCompleteMenu = page . locator ( ".cm-tooltip-autocomplete" )
160
+ await expect ( autoCompleteMenu ) . toBeVisible ( { timeout : 5000 } )
161
+ await page . locator ( ".cm-completionLabel" ) . click ( )
159
162
160
- const autoCompleteMenu = page . locator ( ".cm-tooltip-autocomplete" )
163
+ await page . keyboard . type ( "(first: 2) {\n" )
164
+ await page . keyboard . type ( "cont" )
165
+
166
+ await page . keyboard . press ( "Control+Space" )
167
+ autoCompleteMenu = page . locator ( ".cm-tooltip-autocomplete" )
161
168
await expect ( autoCompleteMenu ) . toBeVisible ( { timeout : 5000 } )
162
169
await page . locator ( ".cm-completionLabel" ) . click ( )
163
170
@@ -170,8 +177,14 @@ test.describe("interactive examples", () => {
170
177
const jsonMatch = resultContent ?. match ( / \{ [ \s \S ] * \} / )
171
178
if ( jsonMatch ) {
172
179
try {
173
- const result = JSON . parse ( jsonMatch [ 0 ] )
174
- return result . project && result . project . description ? true : false
180
+ const data = JSON . parse ( jsonMatch [ 0 ] )
181
+ if ( data ?. project ?. contributors ?. length === 2 ) {
182
+ const contributors = data . project . contributors
183
+ return (
184
+ contributors [ 0 ] . contributions >= contributors [ 1 ] . contributions
185
+ )
186
+ }
187
+ return false
175
188
} catch {
176
189
return false
177
190
}
0 commit comments