Skip to content

Commit 94d4596

Browse files
committed
e2e: shorten visit-site-editor canvas-loader visible wait
The site-editor performance suite has been spending ~60s per `visitSiteEditor` call since #77443 because the loader element no longer becomes visible (the editor resolves inside the 100ms artificial-delay in `useIsSiteEditorLoading` before React commits the loading render). The visible-state wait then times out at 60s and the catch block recovers, costing ~10-13 min per perf workflow run. Drop the visible-state timeout to 3s. The loader either appears within a tick or it doesn't appear at all, so the long wait is just wasted wall clock when the loader is skipped.
1 parent 7d8facb commit 94d4596

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/e2e-test-utils-playwright/src/admin/visit-site-editor.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ export async function visitSiteEditor(
6767

6868
try {
6969
// Wait for the canvas loader to appear first, so that the locator that
70-
// waits for the hidden state doesn't resolve prematurely.
71-
await canvasLoader.waitFor( { state: 'visible', timeout: 60_000 } );
70+
// waits for the hidden state doesn't resolve prematurely. The loader
71+
// either renders within a tick or it is skipped entirely (when the
72+
// editor finishes resolving inside the artificial-delay window in
73+
// `useIsSiteEditorLoading`), so a long visible-state timeout is just
74+
// wasted wall clock when the loader never shows up.
75+
await canvasLoader.waitFor( { state: 'visible', timeout: 3_000 } );
7276
await canvasLoader.waitFor( {
7377
state: 'hidden',
7478
// Bigger timeout is needed for larger entities, like the Large Post

0 commit comments

Comments
 (0)