@@ -148,8 +148,8 @@ describe('browser', () => {
148
148
let browser : puppeteer . Browser
149
149
let page : puppeteer . Page
150
150
151
- const playButtonSelector = `[d="M 11 9 L 24 16 L 11 23 z "]`
152
- const stopButtonSelector = `[d="M 10 10 L 23 10 L 23 23 L 10 23 z "]`
151
+ const playButtonSelector = `[aria-label^="Execute "]`
152
+ const stopButtonSelector = `[aria-label^="Stop "]`
153
153
154
154
let port : number
155
155
const server = createServer ( yogaApp )
@@ -177,14 +177,14 @@ describe('browser', () => {
177
177
} )
178
178
179
179
const typeOperationText = async ( text : string ) => {
180
- await page . type ( '.query-editor .CodeMirror textarea' , text )
180
+ await page . type ( '.graphiql- query-editor .CodeMirror textarea' , text )
181
181
// TODO: figure out how we can avoid this wait
182
182
// it is very likely that there is a delay from textarea -> react state update
183
183
await new Promise ( ( res ) => setTimeout ( res , 100 ) )
184
184
}
185
185
186
186
const typeVariablesText = async ( text : string ) => {
187
- await page . type ( '.variable-editor .CodeMirror textarea' , text )
187
+ await page . type ( '[aria-label="Variables"] .CodeMirror textarea' , text )
188
188
// TODO: figure out how we can avoid this wait
189
189
// it is very likely that there is a delay from textarea -> react state update
190
190
await new Promise ( ( res ) => setTimeout ( res , 100 ) )
@@ -210,7 +210,7 @@ describe('browser', () => {
210
210
await page . goto ( `http://localhost:${ port } ${ endpoint } ` )
211
211
await typeOperationText ( '{ alwaysTrue }' )
212
212
213
- await page . click ( '.execute-button' )
213
+ await page . click ( '.graphiql- execute-button' )
214
214
const resultContents = await waitForResult ( )
215
215
216
216
expect ( resultContents ) . toEqual (
@@ -232,7 +232,7 @@ describe('browser', () => {
232
232
`mutation ($number: Int!) { setFavoriteNumber(number: $number) }` ,
233
233
)
234
234
await typeVariablesText ( `{ "number": 3 }` )
235
- await page . click ( '.execute-button' )
235
+ await page . click ( '.graphiql- execute-button' )
236
236
const resultContents = await waitForResult ( )
237
237
238
238
expect ( resultContents ) . toEqual (
@@ -251,7 +251,7 @@ describe('browser', () => {
251
251
test ( 'execute SSE (subscription) operation' , async ( ) => {
252
252
await page . goto ( `http://localhost:${ port } ${ endpoint } ` )
253
253
await typeOperationText ( `subscription { count(to: 2) }` )
254
- await page . click ( '.execute-button' )
254
+ await page . click ( '.graphiql- execute-button' )
255
255
256
256
await new Promise ( ( res ) => setTimeout ( res , 50 ) )
257
257
@@ -299,7 +299,7 @@ describe('browser', () => {
299
299
query ,
300
300
) } `,
301
301
)
302
- await page . click ( '.execute-button' )
302
+ await page . click ( '.graphiql- execute-button' )
303
303
const resultContents = await waitForResult ( )
304
304
305
305
expect ( resultContents ) . toEqual (
@@ -318,7 +318,7 @@ describe('browser', () => {
318
318
test ( 'should show BigInt correctly' , async ( ) => {
319
319
await page . goto ( `http://localhost:${ port } ${ endpoint } ` )
320
320
await typeOperationText ( `{ bigint }` )
321
- await page . click ( '.execute-button' )
321
+ await page . click ( '.graphiql- execute-button' )
322
322
const resultContents = await waitForResult ( )
323
323
324
324
expect ( resultContents ) . toEqual ( `{
@@ -330,7 +330,7 @@ describe('browser', () => {
330
330
test ( 'should show live queries correctly' , async ( ) => {
331
331
await page . goto ( `http://localhost:${ port } ${ endpoint } ` )
332
332
await typeOperationText ( `query @live { liveCounter }` )
333
- await page . click ( '.execute-button' )
333
+ await page . click ( '.graphiql- execute-button' )
334
334
335
335
await new Promise ( ( res ) => setTimeout ( res , 50 ) )
336
336
0 commit comments