test: Gate canvas readiness before header interactions after route (#36422)

Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
n8n-cat-bot[bot] 2026-08-18 14:19:13 +00:00 committed by GitHub
parent 8fa6cde8a1
commit c0d1bd0e5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,6 +56,9 @@ export class CanvasComposer {
await this.n8n.canvas.openWorkflowHistory();
await this.n8n.canvas.closeWorkflowHistory();
await this.n8n.page.waitForLoadState();
// Wait for the editor's loading overlay to clear before subsequent header
// interactions; nodes can report visible while the overlay still blocks clicks.
await this.n8n.canvas.waitForCanvasReady();
await expect(this.n8n.canvas.getCanvasNodes().first()).toBeVisible();
await expect(this.n8n.canvas.getCanvasNodes().last()).toBeVisible();
}
@ -66,6 +69,9 @@ export class CanvasComposer {
async switchBetweenEditorAndWorkflowList(): Promise<void> {
await this.n8n.sideBar.clickHomeButton();
await this.n8n.workflows.cards.getWorkflows().first().click();
// Wait for the editor's loading overlay to clear before subsequent header
// interactions; nodes can report visible while the overlay still blocks clicks.
await this.n8n.canvas.waitForCanvasReady();
await expect(this.n8n.canvas.getCanvasNodes().first()).toBeVisible();
await expect(this.n8n.canvas.getCanvasNodes().last()).toBeVisible();
}