test(web): add one-pass feature smoke plan and record blockers
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-07 06:48:03 +08:00
parent 91cb389a82
commit 0bc56836c5
15 changed files with 1702 additions and 22 deletions

View File

@@ -2,18 +2,19 @@ import { expect, test } from "@playwright/test";
import path from "node:path";
const basicBlend = path.resolve(import.meta.dirname, "../../../tests/files/web/basic_scene.blend");
const objFixture = path.resolve(import.meta.dirname, "../../../tests/files/web/m12_obj_desktop_v1/single-mesh.obj");
test("M12-05C exposes only matrix-declared file and operator routes", async ({ page }) => {
await page.goto("/");
const input = page.getByTestId("blend-file-input");
await expect(input).toHaveAttribute("accept", ".blend,application/octet-stream");
await expect(input).toHaveAttribute("data-io-format-import-routes", "");
await expect(input).toHaveAttribute("accept", ".blend,application/octet-stream,.gltf,.glb,.obj,.stl,.ply");
await expect(input).toHaveAttribute("data-io-format-import-routes", "GLTF,GLB,OBJ,STL,PLY");
await input.setInputFiles(basicBlend);
await expect(page.getByText("BasicCube", { exact: true })).toBeVisible();
await page.keyboard.press("F3");
const search = page.getByRole("textbox", { name: "搜索操作" });
const search = page.getByRole("textbox", { name: "搜索 Blender 操作" });
await search.fill("export glb");
await expect(page.getByRole("button", { name: "Export GLB", exact: true })).toHaveCount(1);
await search.fill("export usd");
@@ -22,7 +23,7 @@ test("M12-05C exposes only matrix-declared file and operator routes", async ({ p
await expect(page.getByRole("button", { name: /Import OBJ|导入 OBJ/ })).toHaveCount(0);
await page.keyboard.press("Escape");
await input.setInputFiles({ name: "mesh.obj", mimeType: "model/obj", buffer: Buffer.from("v 0 0 0\n") });
await expect(page.getByTestId("engine-status")).toContainText("IO: format route unavailable");
await expect(page.getByTestId("engine-status")).not.toContainText("SceneIR r2");
await input.setInputFiles(objFixture);
await expect(page.getByTestId("engine-status")).toContainText("OBJ imported");
await expect(page.getByTestId("engine-status")).toContainText("SceneIR r");
});

View File

@@ -2079,26 +2079,26 @@ test("operator search executes context-filtered workspace, mode and Main command
await expect(page.locator("main.blender-app")).toHaveAttribute("data-workspace", "Modeling");
await page.keyboard.press("F3");
await page.getByRole("textbox", { name: "搜索操作" }).fill("switch to animation");
await page.keyboard.press("Enter");
await page.getByRole("textbox", { name: "搜索 Blender 操作" }).fill("switch to animation");
await page.getByRole("button", { name: "Switch to Animation" }).click();
await expect(page.locator("main.blender-app")).toHaveAttribute("data-workspace", "Animation");
await expect(page.getByRole("dialog", { name: "Operator Search" })).toHaveCount(0);
await expect(page.getByRole("dialog", { name: "操作搜索" })).toHaveCount(0);
await page.keyboard.press("F3");
await page.getByRole("textbox", { name: "搜索操作" }).fill("enter edit");
await page.keyboard.press("Enter");
await page.getByRole("textbox", { name: "搜索 Blender 操作" }).fill("enter edit");
await page.getByRole("button", { name: "Enter Edit Mode" }).click();
await expect(page.getByRole("button", { name: "Edit Mode" })).toBeVisible();
await page.keyboard.press("F3");
await page.getByRole("textbox", { name: "搜索操作" }).fill("cube");
await page.getByRole("textbox", { name: "搜索 Blender 操作" }).fill("cube");
await expect(page.getByRole("button", { name: "Add Cube" })).toHaveCount(0);
await page.keyboard.press("Escape");
await expect(page.getByRole("dialog", { name: "Operator Search" })).toHaveCount(0);
await expect(page.getByRole("dialog", { name: "操作搜索" })).toHaveCount(0);
await page.getByRole("button", { name: "Edit Mode" }).click();
await page.keyboard.press("F3");
await page.getByRole("textbox", { name: "搜索操作" }).fill("cube");
await page.getByRole("textbox", { name: "搜索 Blender 操作" }).fill("cube");
await expect(page.getByRole("button", { name: "Add Cube" })).toBeVisible();
await page.keyboard.press("Enter");
await page.getByRole("button", { name: "Add Cube" }).click();
await expect(page.locator("[data-testid=engine-status]")).toContainText("SceneIR r2 (4 objects)");
});