Update e2e tests to remove viewport overlay checks and add new properties in EditorStoreSnapshot

This commit is contained in:
2026-04-03 01:27:49 +02:00
parent edd0b3e2a2
commit 52d2634324
3 changed files with 9 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ test("user can create a box brush and keep it through a draft reload", async ({
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")).toBeVisible();
await expect(page.getByTestId("viewport-overlay-topLeft")).toHaveCount(0);
expect(pageErrors).toEqual([]);
expect(consoleErrors).toEqual([]);

View File

@@ -29,18 +29,19 @@ test("orthographic panel controls keep brush authoring and selection behavior in
await expect(page.getByText("1 brush selected (Box Brush 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);
await page.getByTestId("viewport-panel-topLeft-view-top").dispatchEvent("click");
await expect(page.getByTestId("viewport-panel-topLeft-view-top")).toHaveAttribute("aria-pressed", "true");
await expect(getViewportOverlay(page, "topLeft")).toContainText("XZ grid");
await expect(getViewportOverlay(page, "topLeft")).toHaveCount(0);
await page.getByTestId("viewport-panel-topLeft-view-front").dispatchEvent("click");
await expect(page.getByTestId("viewport-panel-topLeft-view-front")).toHaveAttribute("aria-pressed", "true");
await expect(getViewportOverlay(page, "topLeft")).toContainText("XY grid");
await expect(getViewportOverlay(page, "topLeft")).toHaveCount(0);
await page.getByTestId("viewport-panel-topLeft-view-side").dispatchEvent("click");
await expect(page.getByTestId("viewport-panel-topLeft-view-side")).toHaveAttribute("aria-pressed", "true");
await expect(getViewportOverlay(page, "topLeft")).toContainText("YZ grid");
await expect(getViewportOverlay(page, "topLeft")).toHaveCount(0);
await page.getByTestId("viewport-panel-topLeft-display-authoring").dispatchEvent("click");
await expect(page.getByTestId("viewport-panel-topLeft-display-authoring")).toHaveAttribute("aria-pressed", "true");

View File

@@ -28,6 +28,10 @@ interface EditorStoreSnapshot {
modelInstances: Record<string, { position: { x: number; y: number; z: number } }>;
entities: Record<string, { position: { x: number; y: number; z: number } }>;
};
viewportQuadSplit: {
x: number;
y: number;
};
viewportTransientState: {
toolPreview: ViewportToolPreview;
};