Replace Save Draft button with reload in e2e tests
This commit is contained in:
@@ -76,7 +76,7 @@ test("user can create a whitebox box with float transforms and keep it through r
|
||||
await page.getByTestId("selected-brush-name").press("Tab");
|
||||
await expect(page.getByTestId("selected-brush-name")).toHaveValue("Entry Room");
|
||||
|
||||
await page.getByRole("button", { name: "Save Draft" }).click();
|
||||
await page.waitForTimeout(400);
|
||||
await page.reload();
|
||||
|
||||
await expect(page.getByRole("button", { name: /^Entry Room$/ })).toBeVisible();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { expect, test } from "@playwright/test";
|
||||
|
||||
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 }) => {
|
||||
test("user can assign a face material through the UI and keep it through an autosave reload", async ({ page }) => {
|
||||
const pageErrors: string[] = [];
|
||||
const consoleErrors: string[] = [];
|
||||
|
||||
@@ -29,7 +29,7 @@ test("user can assign a face material through the UI and keep it through a draft
|
||||
|
||||
await expect(page.getByTestId("selected-face-material-name")).toContainText("Amber Grid");
|
||||
|
||||
await page.getByRole("button", { name: "Save Draft" }).click();
|
||||
await page.waitForTimeout(400);
|
||||
await page.reload();
|
||||
|
||||
await page.getByRole("button", { name: /Whitebox Box 1/ }).click();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { expect, test } from "@playwright/test";
|
||||
|
||||
import { beginBoxCreation, clickViewport, setViewportCreationPreview } from "./viewport-test-helpers";
|
||||
|
||||
test("first-room workflow covers create, texture, save/load, and run", async ({ page }) => {
|
||||
test("first-room workflow covers create, texture, autosave recovery, and run", async ({ page }) => {
|
||||
const pageErrors: string[] = [];
|
||||
const consoleErrors: string[] = [];
|
||||
|
||||
@@ -45,13 +45,8 @@ 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 beginBoxCreation(page);
|
||||
await clickViewport(page);
|
||||
await expect(page.getByRole("button", { name: /Whitebox Box 2/ })).toBeVisible();
|
||||
|
||||
await page.getByRole("button", { name: "Load Draft" }).click();
|
||||
await expect(page.getByRole("button", { name: /Whitebox Box 2/ })).toHaveCount(0);
|
||||
await page.waitForTimeout(400);
|
||||
await page.reload();
|
||||
|
||||
await page.getByRole("button", { name: /Whitebox Box 1/ }).click();
|
||||
await page.getByTestId("face-button-posZ").click();
|
||||
|
||||
@@ -70,8 +70,7 @@ test("imports a draco-compressed glb asset, places an instance, and survives rel
|
||||
z: -88
|
||||
});
|
||||
|
||||
await page.getByRole("button", { name: "Save Draft" }).dispatchEvent("click");
|
||||
await expect(page.getByTestId("status-message")).toContainText("Local draft saved.");
|
||||
await page.waitForTimeout(400);
|
||||
|
||||
await page.reload();
|
||||
|
||||
|
||||
@@ -108,8 +108,7 @@ test("imports a model asset, places an instance, and survives reload", async ({
|
||||
z: -76
|
||||
});
|
||||
|
||||
await page.getByRole("button", { name: "Save Draft" }).dispatchEvent("click");
|
||||
await expect(page.getByTestId("status-message")).toContainText("Local draft saved.");
|
||||
await page.waitForTimeout(400);
|
||||
|
||||
await page.reload();
|
||||
|
||||
|
||||
@@ -65,8 +65,7 @@ test("local lights and background images persist through editor and runner flows
|
||||
|
||||
await expect(page.locator('[data-testid^="outliner-entity-"]')).toHaveCount(2);
|
||||
|
||||
await page.getByRole("button", { name: "Save Draft" }).click();
|
||||
await expect(page.getByTestId("status-message")).toContainText("Local draft saved.");
|
||||
await page.waitForTimeout(400);
|
||||
|
||||
await page.reload();
|
||||
|
||||
|
||||
@@ -44,14 +44,8 @@ test("world environment settings persist and carry into the runner", async ({ pa
|
||||
await expect(page.getByTestId("world-background-mode-value")).toContainText("Vertical Gradient");
|
||||
await expect(page.getByTestId("viewport-canvas-topLeft")).toHaveCSS("background-image", /linear-gradient/);
|
||||
|
||||
await page.getByRole("button", { name: "Save Draft" }).click();
|
||||
|
||||
await page.getByTestId("world-background-mode-solid").click();
|
||||
await setColorInput(page.getByTestId("world-background-solid-color"), "#223344");
|
||||
await page.getByTestId("world-ambient-intensity").fill("0.9");
|
||||
await page.getByTestId("world-ambient-intensity").press("Tab");
|
||||
|
||||
await page.getByRole("button", { name: "Load Draft" }).click();
|
||||
await page.waitForTimeout(400);
|
||||
await page.reload();
|
||||
|
||||
await expect(page.getByTestId("world-background-mode-value")).toContainText("Vertical Gradient");
|
||||
await expect(page.getByTestId("world-ambient-intensity")).toHaveValue("0.45");
|
||||
|
||||
Reference in New Issue
Block a user