Update e2e tests to use new selection mode attributes

This commit is contained in:
2026-04-11 13:57:55 +02:00
parent bf0ea5147f
commit 2e5603e5a1
2 changed files with 8 additions and 9 deletions

View File

@@ -30,19 +30,19 @@ test("orthographic panel controls keep brush authoring and selection behavior in
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")).toBeVisible();
await expect(page.getByTestId("viewport-selection-mode-topLeft")).toHaveText("Object");
await expect(page.getByTestId("whitebox-selection-mode-object")).toHaveAttribute("aria-pressed", "true");
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(page.getByTestId("viewport-selection-mode-topLeft")).toHaveText("Object");
await expect(page.getByTestId("whitebox-selection-mode-object")).toHaveAttribute("aria-pressed", "true");
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(page.getByTestId("viewport-selection-mode-topLeft")).toHaveText("Object");
await expect(page.getByTestId("whitebox-selection-mode-object")).toHaveAttribute("aria-pressed", "true");
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(page.getByTestId("viewport-selection-mode-topLeft")).toHaveText("Object");
await expect(page.getByTestId("whitebox-selection-mode-object")).toHaveAttribute("aria-pressed", "true");
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

@@ -91,7 +91,7 @@ test("whitebox component selection modes keep object picking intentional across
});
}, { target: brush.center });
await expect(page.getByTestId("viewport-selection-mode-topLeft")).toHaveText("Object");
await expect(page.getByTestId("whitebox-selection-mode-object")).toHaveAttribute("aria-pressed", "true");
await clickViewportAtRatio(page, "topLeft", 0.5, 0.52);
let snapshot = await getEditorStoreSnapshot(page);
expect(snapshot.whiteboxSelectionMode).toBe("object");
@@ -139,7 +139,7 @@ test("whitebox component selection modes keep object picking intentional across
}, { target: brush.center });
await page.getByTestId("whitebox-selection-mode-face").click();
await expect(page.getByTestId("viewport-selection-mode-topRight")).toHaveText("Face");
await expect(page.getByTestId("whitebox-selection-mode-face")).toHaveAttribute("aria-pressed", "true");
await clickViewportAtRatio(page, "topRight", 0.5, 0.5);
snapshot = await getEditorStoreSnapshot(page);
expect(snapshot.whiteboxSelectionMode).toBe("face");
@@ -148,10 +148,9 @@ test("whitebox component selection modes keep object picking intentional across
brushId: brush.id,
faceId: "posY"
});
await expect(page.getByTestId("viewport-panel-active-badge-topRight")).toBeVisible();
await page.getByTestId("whitebox-selection-mode-edge").click();
await expect(page.getByTestId("viewport-selection-mode-topRight")).toHaveText("Edge");
await expect(page.getByTestId("whitebox-selection-mode-edge")).toHaveAttribute("aria-pressed", "true");
await clickViewportAtRatio(page, "topRight", 0.5, 0.12);
snapshot = await getEditorStoreSnapshot(page);
expect(snapshot.whiteboxSelectionMode).toBe("edge");
@@ -162,7 +161,7 @@ test("whitebox component selection modes keep object picking intentional across
});
await page.getByTestId("whitebox-selection-mode-vertex").click();
await expect(page.getByTestId("viewport-selection-mode-topRight")).toHaveText("Vertex");
await expect(page.getByTestId("whitebox-selection-mode-vertex")).toHaveAttribute("aria-pressed", "true");
await clickViewportAtRatio(page, "topRight", 0.88, 0.12);
snapshot = await getEditorStoreSnapshot(page);
expect(snapshot.whiteboxSelectionMode).toBe("vertex");