Update tests to use beginBoxCreation helper function

This commit is contained in:
2026-04-03 00:44:14 +02:00
parent 138445a7de
commit 66fdcca4af
3 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import { expect, test } from "@playwright/test";
import { clickViewport } from "./viewport-test-helpers";
import { beginBoxCreation, clickViewport } from "./viewport-test-helpers";
test("user can assign a face material through the UI and keep it through a draft reload", async ({ page }) => {
const pageErrors: string[] = [];
@@ -22,7 +22,7 @@ test("user can assign a face material through the UI and keep it through a draft
}, "webeditor3d.scene-document-draft");
await page.reload();
await page.getByRole("button", { name: "Box Create" }).click();
await beginBoxCreation(page);
await clickViewport(page);
await page.getByTestId("face-button-posZ").click();
await page.getByTestId("material-button-starter-amber-grid").click();

View File

@@ -1,6 +1,6 @@
import { expect, test } from "@playwright/test";
import { clickViewport } from "./viewport-test-helpers";
import { beginBoxCreation, clickViewport } from "./viewport-test-helpers";
test("first-room workflow covers create, texture, save/load, and run", async ({ page }) => {
const pageErrors: string[] = [];
@@ -22,7 +22,7 @@ test("first-room workflow covers create, texture, save/load, and run", async ({
}, "webeditor3d.scene-document-draft");
await page.reload();
await page.getByRole("button", { name: "Box Create" }).click();
await beginBoxCreation(page);
await clickViewport(page);
await page.getByTestId("face-button-posZ").click();
await page.getByTestId("material-button-starter-amber-grid").click();
@@ -44,7 +44,7 @@ test("first-room workflow covers create, texture, save/load, and run", async ({
await expect(page.getByTestId("status-run-preflight")).toContainText("Ready for First Person");
await page.getByRole("button", { name: "Save Draft" }).click();
await page.getByRole("button", { name: "Box Create" }).click();
await beginBoxCreation(page);
await clickViewport(page);
await expect(page.getByRole("button", { name: /Box Brush 2/ })).toBeVisible();

View File

@@ -1,6 +1,6 @@
import { expect, test } from "@playwright/test";
import { clickViewport, getViewportOverlay, getViewportPanel } from "./viewport-test-helpers";
import { beginBoxCreation, clickViewport, getViewportOverlay, getViewportPanel } from "./viewport-test-helpers";
test("orthographic panel controls keep brush authoring and selection behavior intact", async ({ page }) => {
const pageErrors: string[] = [];
@@ -22,7 +22,7 @@ test("orthographic panel controls keep brush authoring and selection behavior in
}, "webeditor3d.scene-document-draft");
await page.reload();
await page.getByRole("button", { name: "Box Create" }).click();
await beginBoxCreation(page);
await clickViewport(page, "topLeft");
await expect(page.getByRole("button", { name: /Box Brush 1/ })).toBeVisible();