Update test cases to reflect changes in button names and labels

This commit is contained in:
2026-04-04 19:37:16 +02:00
parent 9093903287
commit 69f4c8302a
4 changed files with 12 additions and 12 deletions

View File

@@ -32,7 +32,7 @@ test("user can assign a face material through the UI and keep it through a draft
await page.getByRole("button", { name: "Save Draft" }).click();
await page.reload();
await page.getByRole("button", { name: /Box Brush 1/ }).click();
await page.getByRole("button", { name: /Whitebox Box 1/ }).click();
await page.getByTestId("face-button-posZ").click();
await expect(page.getByTestId("selected-face-material-name")).toContainText("Amber Grid");

View File

@@ -48,12 +48,12 @@ test("first-room workflow covers create, texture, save/load, and run", async ({
await page.getByRole("button", { name: "Save Draft" }).click();
await beginBoxCreation(page);
await clickViewport(page);
await expect(page.getByRole("button", { name: /Box Brush 2/ })).toBeVisible();
await expect(page.getByRole("button", { name: /Whitebox Box 2/ })).toBeVisible();
await page.getByRole("button", { name: "Load Draft" }).click();
await expect(page.getByRole("button", { name: /Box Brush 2/ })).toHaveCount(0);
await expect(page.getByRole("button", { name: /Whitebox Box 2/ })).toHaveCount(0);
await page.getByRole("button", { name: /Box Brush 1/ }).click();
await page.getByRole("button", { name: /Whitebox Box 1/ }).click();
await page.getByTestId("face-button-posZ").click();
await expect(page.getByTestId("selected-face-material-name")).toContainText("Amber Grid");

View File

@@ -25,8 +25,8 @@ test("orthographic panel controls keep brush authoring and selection behavior in
await beginBoxCreation(page);
await clickViewport(page, "topLeft");
await expect(page.getByRole("button", { name: /Box Brush 1/ })).toBeVisible();
await expect(page.getByText("1 brush selected (Box Brush 1)")).toBeVisible();
await expect(page.getByRole("button", { name: /Whitebox Box 1/ })).toBeVisible();
await expect(page.getByText("1 solid selected (Whitebox Box 1)")).toBeVisible();
await expect(page.getByTestId("viewport-active-panel")).toHaveCount(0);
await expect(page.getByTestId("viewport-panel-topLeft-view-perspective")).toHaveAttribute("aria-pressed", "true");
await expect(getViewportOverlay(page, "topLeft")).toHaveCount(0);
@@ -47,12 +47,12 @@ test("orthographic panel controls keep brush authoring and selection behavior in
await expect(page.getByTestId("viewport-panel-topLeft-display-authoring")).toHaveAttribute("aria-pressed", "true");
await expect(page.getByTestId("viewport-canvas-topLeft")).toHaveCSS("background-color", "rgb(0, 0, 0)");
await expect(getViewportPanel(page, "topLeft")).toHaveAttribute("data-active", "true");
await expect(page.getByText("1 brush selected (Box Brush 1)")).toBeVisible();
await expect(page.getByText("1 solid selected (Whitebox Box 1)")).toBeVisible();
await page.getByTestId("viewport-panel-topLeft-display-wireframe").dispatchEvent("click");
await expect(page.getByTestId("viewport-panel-topLeft-display-wireframe")).toHaveAttribute("aria-pressed", "true");
await expect(page.getByTestId("viewport-canvas-topLeft")).toHaveCSS("background-color", "rgb(0, 0, 0)");
await expect(page.getByText("1 brush selected (Box Brush 1)")).toBeVisible();
await expect(page.getByText("1 solid selected (Whitebox Box 1)")).toBeVisible();
expect(pageErrors).toEqual([]);
expect(consoleErrors).toEqual([]);

View File

@@ -24,8 +24,8 @@ test("quad viewport layout shows four linked panels with shared selection and ac
await beginBoxCreation(page);
await clickViewport(page, "topLeft");
await expect(page.getByRole("button", { name: /Box Brush 1/ })).toBeVisible();
await expect(page.getByText("1 brush selected (Box Brush 1)")).toBeVisible();
await expect(page.getByRole("button", { name: /Whitebox Box 1/ })).toBeVisible();
await expect(page.getByText("1 solid selected (Whitebox Box 1)")).toBeVisible();
await page.getByTestId("viewport-layout-quad").click();
@@ -107,7 +107,7 @@ test("quad viewport layout shows four linked panels with shared selection and ac
await page.getByTestId("viewport-panel-topRight-view-side").dispatchEvent("click");
await expect(getViewportPanel(page, "topRight")).toHaveAttribute("data-active", "true");
await expect(page.getByTestId("viewport-panel-topRight-view-side")).toHaveAttribute("aria-pressed", "true");
await expect(page.getByRole("button", { name: /Box Brush 1/ })).toBeVisible();
await expect(page.getByRole("button", { name: /Whitebox Box 1/ })).toBeVisible();
const transferredSnapshot = await getEditorStoreSnapshot(page);
expect(transferredSnapshot).toMatchObject({
viewportTransientState: {
@@ -131,7 +131,7 @@ test("quad viewport layout shows four linked panels with shared selection and ac
await expect(getViewportPanel(page, "topLeft")).toHaveAttribute("data-active", "true");
await expect(page.getByTestId("viewport-panel-topLeft-display-authoring")).toHaveAttribute("aria-pressed", "true");
await expect(page.getByTestId("viewport-canvas-topLeft")).toHaveCSS("background-color", "rgb(0, 0, 0)");
await expect(page.getByText("1 brush selected (Box Brush 1)")).toBeVisible();
await expect(page.getByText("1 solid selected (Whitebox Box 1)")).toBeVisible();
const finalSnapshot = await getEditorStoreSnapshot(page);
expect(finalSnapshot).toMatchObject({
viewportTransientState: {