Update test to use exact match for button name

This commit is contained in:
2026-04-03 01:28:54 +02:00
parent 8fc2f7e9a4
commit 39ee96f3e3

View File

@@ -69,13 +69,13 @@ test("user can create a box brush and keep it through a draft reload", async ({
await page.getByTestId("brush-size-z").press("Tab");
await page.getByTestId("selected-brush-name").fill("Entry Room");
await page.getByTestId("selected-brush-name").press("Tab");
await expect(page.getByRole("button", { name: /Entry Room/ })).toBeVisible();
await expect(page.getByRole("button", { name: /^Entry Room$/ })).toBeVisible();
await page.getByRole("button", { name: "Save Draft" }).click();
await page.reload();
await expect(page.getByRole("button", { name: /Entry Room/ })).toBeVisible();
await page.getByRole("button", { name: /Entry Room/ }).click();
await expect(page.getByRole("button", { name: /^Entry Room$/ })).toBeVisible();
await page.getByRole("button", { name: /^Entry Room$/ }).click();
await expect(page.getByTestId("brush-center-y")).toHaveValue("2");
await expect(page.getByTestId("brush-size-z")).toHaveValue("4");
await expect(page.getByTestId("viewport-overlay-topLeft")).toHaveCount(0);