test(web): record texture paint stroke and undo evidence
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

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-14 07:29:05 +08:00
parent 5430172f67
commit 9499664892
3 changed files with 77 additions and 1 deletions

View File

@@ -435,6 +435,10 @@
- 模式菜单:mode chip 可打开并切换 Object→Sculpt,状态 `模式:Sculpt`。
此前自动化“无菜单项”是 Playwright 角色选择器问题(实际 role 为
menuitemcheckbox),非产品缺口;证据 `tools/web/complete/probe-mode-menu.mjs`。
- Texture Paint:导入 `re-texture-base.png` → 打包 1024×1024,Texture Paint
画布加载;笔画提交(`笔画已提交`,r4)→ 撤销(`已撤销`,r5)。证据
`tools/web/complete/probe-texture-paint.mjs`。自动化中撤销按钮曾被
workspace 工具栏遮挡,程序化点击可执行;布局遮挡未单独判定为缺陷。
- Compositor:`WASM 合成求值` 在无合成节点组的场景返回结构化
`INVALID_ARGUMENT: COMPOSITOR_NODE_GROUP_MISSING: scene has no
compositing node group`。此前错误对象被渲染为 `[object Object]`,已在

View File

@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"task": "WBV2-P1425-001",
"updatedAt": "2026-11-14T07:26:00+08:00",
"updatedAt": "2026-11-14T07:29:00+08:00",
"status": "in_progress",
"focus": "COMPLETE-TUTORIAL-001 backend export gap (USD/Alembic)",
"breakpoint": "blender-5.2.0/source/blender/web_engine/CMakeLists.txt (USD wiring); WASM 6ee2b261",
@@ -218,5 +218,11 @@
"note": "earlier automation miss was a Playwright role selector issue (menuitemcheckbox), not a product gap",
"script": "tools/web/complete/probe-mode-menu.mjs",
"acceptance": "NOT_CLAIMED"
},
"texturePaintProbe": {
"result": "import re-texture-base → 1024×1024; stroke committed r4; undo → 已撤销 r5",
"note": "undo button was visually intercepted by the workspace toolbar at the automated scroll position; programmatic click succeeded, no defect claimed",
"script": "tools/web/complete/probe-texture-paint.mjs",
"acceptance": "NOT_CLAIMED"
}
}

View File

@@ -0,0 +1,66 @@
#!/usr/bin/env node
/**
* Focused case: import an image, open Texture Paint, paint a stroke, undo it.
*
* node tools/web/complete/probe-texture-paint.mjs --base-url http://127.0.0.1:5176
*/
import path from "node:path";
import { REPO, ASSETS, parseArgs, launchBrowser, newPage, openFile, waitScene, switchWorkspace } from "../course/lib/lesson-recorder.mjs";
const args = parseArgs();
const BASE = args.baseUrl || "http://127.0.0.1:5176";
const texture = path.join(REPO, "web/app/public/tutorial/texture-paint/re-texture-base.png");
const browser = await launchBrowser(args.gpu);
const { context, page, consoleErrors } = await newPage(browser, { baseUrl: BASE });
page.setDefaultTimeout(90_000);
const log = (...parts) => console.log(new Date().toISOString().slice(11, 19), ...parts);
const viewState = async () => page.evaluate(() => {
const view = document.querySelector('[aria-label="Texture Paint"]');
return {
status: document.querySelector('[data-testid="engine-status"]')?.textContent ?? "",
imageSha: view?.getAttribute("data-image-sha") ?? null,
imageId: view?.getAttribute("data-image-id") ?? null,
lastAction: view?.getAttribute("data-last-action") ?? null,
viewStatus: view?.querySelector('output')?.textContent ?? null,
options: Array.from(view?.querySelectorAll('select[aria-label="纹理图像"] option') ?? []).map((option) => ({ value: option.value, text: option.textContent })),
};
});
try {
await openFile(page, ASSETS.studio);
await waitScene(page, { objects: 6, timeout: 240_000 });
const importInput = page.locator('input[accept="image/png,image/jpeg"]').first();
await importInput.setInputFiles(texture);
await page.waitForTimeout(3000);
log("imported", JSON.stringify(await viewState()));
await switchWorkspace(page, "Texture Paint");
const view = page.locator('[aria-label="Texture Paint"]').first();
await view.waitFor({ timeout: 30_000 });
const select = view.locator('select[aria-label="纹理图像"]');
const options = await select.locator('option').evaluateAll((nodes) => nodes.map((node) => node.value).filter(Boolean));
log("options", JSON.stringify(options));
if (!options.length) throw new Error("no packed image available");
await select.selectOption(options.at(-1));
await page.waitForTimeout(4000);
log("loaded", JSON.stringify(await viewState()));
const canvas = view.getByTestId("texture-paint-canvas");
await canvas.waitFor({ timeout: 60_000 });
const box = await canvas.boundingBox();
if (!box) throw new Error("paint canvas has no box");
await page.mouse.move(box.x + box.width / 2 - 30, box.y + box.height / 2);
await page.mouse.down();
await page.mouse.move(box.x + box.width / 2 + 30, box.y + box.height / 2, { steps: 6 });
await page.mouse.up();
await page.waitForTimeout(4000);
log("painted", JSON.stringify(await viewState()));
await view.getByRole("button", { name: "撤销笔画", exact: true }).evaluate((element) => element.click());
await page.waitForTimeout(3000);
log("undone", JSON.stringify(await viewState()));
await page.screenshot({ path: "/tmp/texture-paint.png", fullPage: false });
} catch (error) {
log("probe error", error instanceof Error ? error.message : String(error));
log("state", JSON.stringify(await viewState().catch(() => null)));
} finally {
log("consoleErrors", JSON.stringify(consoleErrors.slice(-8)));
await context.close();
await browser.close();
}