From 9d56445f4ace37775d9bb2f8b46fb1a707d55ed3 Mon Sep 17 00:00:00 2001 From: mes123456 Date: Sat, 14 Nov 2026 10:04:56 +0800 Subject: [PATCH] test(web): verify multi-keyframe animation editing Co-Authored-By: Claude Code --- .../WBV2-P1425-001-web-operator-dispatch.md | 7 ++++-- .../continuation-20261113-web-export.json | 5 ++-- tools/web/complete/probe-keyframe-edit.mjs | 24 ++++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/status/WBV2-P1425-001-web-operator-dispatch.md b/docs/status/WBV2-P1425-001-web-operator-dispatch.md index b5034ad57..faa0e7aed 100644 --- a/docs/status/WBV2-P1425-001-web-operator-dispatch.md +++ b/docs/status/WBV2-P1425-001-web-operator-dispatch.md @@ -436,8 +436,11 @@ 状态均为“原生操作已返回”;证据 `tools/web/complete/probe-curve-menu.mjs`。 - 主题高对比度:`data-theme="high-contrast"`,`.area-frame` 计算样式 `outline solid 1px rgb(255,212,0)`。 -- 关键帧/Dope Sheet:自动关键帧在 frame 1 生成 9 条 F-Curve;Dope Sheet - 出现“关键帧 1”并可选;证据 `tools/web/complete/probe-keyframe-edit.mjs`。 +- 关键帧/Dope Sheet:自动关键帧在 frame 1 生成 9 条 F-Curve;`下一帧` + 到 frame 10 后再次变换,location 曲线变为 2 键(frames [1,10]、 + values [0.1,0.2]);Keyframe Editor 将 frame 10 的值改为 0.5;Dope Sheet + 显示“关键帧 1/10”两个点;证据 + `tools/web/complete/probe-keyframe-edit.mjs`。 - Sequencer:Properties 的 Sequencer Strip Editing → Add Strip 创建 `Web MOVIE`(MOVIE);证据 `tools/web/complete/probe-sequencer.mjs`。 - Outliner:右键 `Data` 菜单 → 重命名,`PBR Studio Ground` → `GroundRenamed`, diff --git a/tests/golden/WBV2-P1425-001/continuation-20261113-web-export.json b/tests/golden/WBV2-P1425-001/continuation-20261113-web-export.json index 6654460dc..3f84491ea 100644 --- a/tests/golden/WBV2-P1425-001/continuation-20261113-web-export.json +++ b/tests/golden/WBV2-P1425-001/continuation-20261113-web-export.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "task": "WBV2-P1425-001", - "updatedAt": "2026-11-14T09:00:00+08:00", + "updatedAt": "2026-11-14T09:05: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", @@ -269,8 +269,7 @@ "acceptance": "NOT_CLAIMED" }, "keyframeDopeSheet": { - "result": "auto-key at frame 1 creates 9 F-Curves; dope sheet dot 关键帧 1 present/selectable", - "note": "a second g after clicking 下一帧 did not register in automation (focus on the button); not claimed", + "result": "auto-key at frame 1 (9 F-Curves); step to frame 10 via 下一帧; second g → 2 keys per curve at frames [1,10]; Keyframe Editor changed frame-10 location value 0.2→0.5; dope sheet shows 关键帧 1 and 10", "script": "tools/web/complete/probe-keyframe-edit.mjs", "acceptance": "NOT_CLAIMED" } diff --git a/tools/web/complete/probe-keyframe-edit.mjs b/tools/web/complete/probe-keyframe-edit.mjs index 50b40b535..d7d59b993 100644 --- a/tools/web/complete/probe-keyframe-edit.mjs +++ b/tools/web/complete/probe-keyframe-edit.mjs @@ -72,19 +72,27 @@ try { await page.keyboard.press("g"); await page.waitForTimeout(1800); log("key1", JSON.stringify(await autoKeyState())); - await page.getByRole("button", { name: "下一帧", exact: true }).click(); - await page.waitForTimeout(1200); + for (let index = 0; index < 9; index++) { + await page.getByRole("button", { name: "下一帧", exact: true }).click(); + await page.waitForTimeout(150); + } + await page.waitForTimeout(600); + log("frame", await page.evaluate(() => document.querySelector('input[aria-label="当前帧"]')?.value ?? null)); + await page.evaluate(() => document.activeElement instanceof HTMLElement && document.activeElement.blur()); await page.keyboard.press("g"); await page.waitForTimeout(1800); log("key2", JSON.stringify(await autoKeyState())); + const valueInput = page.locator('input[aria-label="Keyframe value"]').first(); + if (await valueInput.count()) { + await valueInput.fill("0.5"); + await valueInput.press("Enter"); + await page.waitForTimeout(1500); + log("edited", JSON.stringify(await autoKeyState())); + } else { + log("no keyframe editor"); + } const dots = await page.locator('.key-dot').count(); log("dots", dots, JSON.stringify(await page.locator('.key-dot').evaluateAll((nodes) => nodes.map((node) => node.getAttribute('aria-label'))))); - if (dots) { - await page.locator('.key-dot').first().click(); - await page.waitForTimeout(800); - const frame = await page.evaluate(() => document.querySelector('input[aria-label="当前帧"]')?.value ?? null); - log("after dot", frame); - } } catch (error) { log("probe error", error instanceof Error ? error.message : String(error)); log("state", JSON.stringify(await autoKeyState().catch(() => null)));