File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,15 +34,10 @@ jobs:
3434 matrix :
3535 include :
3636 - browser : chromium
37- jobName : E2E (Playwright, chromium, shard 1/2 )
38- workers : 1
37+ jobName : E2E (Playwright, chromium)
38+ workers : 2
3939 shardIndex : 1
40- shardTotal : 2
41- - browser : chromium
42- jobName : E2E (Playwright, chromium, shard 2/2)
43- workers : 1
44- shardIndex : 2
45- shardTotal : 2
40+ shardTotal : 1
4641 - browser : webkit
4742 jobName : E2E (Playwright, webkit, shard 1/4)
4843 workers : 1
Original file line number Diff line number Diff line change @@ -316,15 +316,33 @@ export const ensureDiagnosticsDrawerOpen = async (page: Page) => {
316316 const isExpanded = await toggle . getAttribute ( 'aria-expanded' )
317317
318318 if ( isExpanded !== 'true' ) {
319+ const waitForExpanded = async ( ) => {
320+ await expect
321+ . poll ( async ( ) => {
322+ return toggle . getAttribute ( 'aria-expanded' )
323+ } )
324+ . toBe ( 'true' )
325+ }
326+
319327 try {
320328 await toggle . click ( { timeout : 2_000 } )
329+ await waitForExpanded ( )
321330 } catch {
322331 /* WebKit can report pointer interception from the drawer during transitions. */
323- await toggle . focus ( )
324- await page . keyboard . press ( 'Enter' )
332+ try {
333+ await toggle . focus ( )
334+ await page . keyboard . press ( 'Enter' )
335+ await waitForExpanded ( )
336+ } catch {
337+ /* Fallback for intermittent top-layer/actionability issues. */
338+ await toggle . evaluate ( element => {
339+ if ( element instanceof HTMLButtonElement ) {
340+ element . click ( )
341+ }
342+ } )
343+ await waitForExpanded ( )
344+ }
325345 }
326-
327- await expect ( toggle ) . toHaveAttribute ( 'aria-expanded' , 'true' )
328346 }
329347
330348 await expect ( page . getByRole ( 'complementary' , { name : 'Diagnostics' } ) ) . toBeVisible ( )
You can’t perform that action at this time.
0 commit comments