test(web): verify multi-keyframe animation editing
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user