From 88761855225b9225df35f6d2b22cd3cc622ba1a2 Mon Sep 17 00:00:00 2001 From: Guifen Chen Date: Mon, 26 Oct 2026 21:36:55 +0000 Subject: [PATCH] Wait for completed undo and redo before inspecting workspace tiles --- e2e/workspace.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2e/workspace.spec.ts b/e2e/workspace.spec.ts index fee3cc5..5aad384 100644 --- a/e2e/workspace.spec.ts +++ b/e2e/workspace.spec.ts @@ -23,6 +23,7 @@ test("demo imports, exact cut edits survive switching, undo/redo and export", as page.getByRole("button", { name: "Select cell 1", exact: true }), ).toHaveCount(0); await page.getByRole("button", { name: "Undo", exact: true }).click(); + await ready(page); await page.locator(".tile-wall").evaluate((el) => (el.scrollTop = 0)); await expect( page.getByRole("button", { name: "Select cell 1", exact: true }), @@ -38,12 +39,14 @@ test("demo imports, exact cut edits survive switching, undo/redo and export", as page.getByRole("button", { name: "Select cell 1", exact: true }), ).toHaveCount(0); await page.getByRole("button", { name: "Undo", exact: true }).click(); + await ready(page); await page.locator(".tile-wall").evaluate((el) => (el.scrollTop = 0)); await expect( page.getByRole("button", { name: "Select cell 1", exact: true }), ).toHaveText(count!); await expect(page.locator(".tile-wave-canvas")).toBeVisible(); await page.getByRole("button", { name: "Redo", exact: true }).click(); + await ready(page); await expect( page.getByRole("button", { name: "Select cell 1", exact: true }), ).toHaveCount(0); @@ -58,6 +61,7 @@ test("demo imports, exact cut edits survive switching, undo/redo and export", as page.getByRole("button", { name: "Select cell 1", exact: true }), ).toHaveCount(0); await page.getByRole("button", { name: "Undo", exact: true }).click(); + await ready(page); await page.locator(".tile-wall").evaluate((el) => (el.scrollTop = 0)); await expect( page.getByRole("button", { name: "Select cell 1", exact: true }),