test(web): record mode menu switching evidence
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -432,6 +432,9 @@
|
||||
- Sculpt:`Apply Sculpt Stroke`(DRAW,radius 20)使 Ground 四个顶点
|
||||
z 0→0.6429,Main revision r2;证据
|
||||
`tools/web/complete/probe-sculpt-stroke.mjs`。
|
||||
- 模式菜单:mode chip 可打开并切换 Object→Sculpt,状态 `模式:Sculpt`。
|
||||
此前自动化“无菜单项”是 Playwright 角色选择器问题(实际 role 为
|
||||
menuitemcheckbox),非产品缺口;证据 `tools/web/complete/probe-mode-menu.mjs`。
|
||||
- Compositor:`WASM 合成求值` 在无合成节点组的场景返回结构化
|
||||
`INVALID_ARGUMENT: COMPOSITOR_NODE_GROUP_MISSING: scene has no
|
||||
compositing node group`。此前错误对象被渲染为 `[object Object]`,已在
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"task": "WBV2-P1425-001",
|
||||
"updatedAt": "2026-11-14T07:19:00+08:00",
|
||||
"updatedAt": "2026-11-14T07:26: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",
|
||||
@@ -212,5 +212,11 @@
|
||||
"result": "DRAW stroke radius 20 moved Ground vertices z 0→0.6429",
|
||||
"script": "tools/web/complete/probe-sculpt-stroke.mjs",
|
||||
"acceptance": "NOT_CLAIMED"
|
||||
},
|
||||
"modeMenuProbe": {
|
||||
"result": "mode chip opens; Object→Sculpt via [role^=menuitem][aria-label=雕刻模式]; status 模式:Sculpt",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
48
tools/web/complete/probe-mode-menu.mjs
Normal file
48
tools/web/complete/probe-mode-menu.mjs
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Focused case: open the mode chip menu and switch to Sculpt.
|
||||
*
|
||||
* node tools/web/complete/probe-mode-menu.mjs --base-url http://127.0.0.1:5176
|
||||
*/
|
||||
import { ASSETS, parseArgs, launchBrowser, newPage, openFile, waitScene } from "../course/lib/lesson-recorder.mjs";
|
||||
|
||||
const args = parseArgs();
|
||||
const BASE = args.baseUrl || "http://127.0.0.1:5176";
|
||||
const browser = await launchBrowser(args.gpu);
|
||||
const { context, page, consoleErrors } = await newPage(browser, { baseUrl: BASE });
|
||||
page.setDefaultTimeout(60_000);
|
||||
const log = (...parts) => console.log(new Date().toISOString().slice(11, 19), ...parts);
|
||||
const dump = async () => page.evaluate(() => {
|
||||
const chip = document.querySelector('.mode-chip');
|
||||
const button = chip?.querySelector('button');
|
||||
return {
|
||||
chip: chip?.outerHTML?.slice(0, 200) ?? null,
|
||||
expanded: button?.getAttribute('aria-expanded') ?? null,
|
||||
panels: Array.from(document.querySelectorAll('[role="menu"]')).map((node) => ({ label: node.getAttribute('aria-label'), items: Array.from(node.querySelectorAll('[role^="menuitem"]')).map((item) => item.getAttribute('aria-label')) })),
|
||||
mode: document.querySelector('.mode-chip button')?.textContent ?? null,
|
||||
status: document.querySelector('[data-testid="engine-status"]')?.textContent ?? "",
|
||||
};
|
||||
});
|
||||
try {
|
||||
await openFile(page, ASSETS.studio);
|
||||
await waitScene(page, { objects: 6, timeout: 240_000 });
|
||||
log("before", JSON.stringify(await dump()));
|
||||
await page.locator('.mode-chip button').click();
|
||||
await page.waitForTimeout(800);
|
||||
log("after click", JSON.stringify(await dump()));
|
||||
const edit = page.locator('[role^="menuitem"][aria-label="雕刻模式"]').first();
|
||||
if (await edit.count()) {
|
||||
await edit.click();
|
||||
await page.waitForTimeout(2000);
|
||||
log("after sculpt", JSON.stringify(await dump()));
|
||||
} else {
|
||||
log("no sculpt item");
|
||||
}
|
||||
} catch (error) {
|
||||
log("probe error", error instanceof Error ? error.message : String(error));
|
||||
log("state", JSON.stringify(await dump().catch(() => null)));
|
||||
} finally {
|
||||
log("consoleErrors", JSON.stringify(consoleErrors.slice(-8)));
|
||||
await context.close();
|
||||
await browser.close();
|
||||
}
|
||||
Reference in New Issue
Block a user