test(web): record physics manifest playback 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:55:40 +08:00
parent 0274b58c18
commit c507c01a71
3 changed files with 27 additions and 1 deletions

View File

@@ -75,6 +75,24 @@ try {
await page.waitForTimeout(1500);
log("mass", JSON.stringify(await physicsState()));
}
const manifest = page.locator('[data-testid="physics-simulation-manifest"]').first();
await manifest.waitFor({ timeout: 30_000 });
const manifestInfo = async () => page.evaluate(() => {
const fieldset = document.querySelector('[data-testid="physics-simulation-manifest"]');
return {
output: fieldset?.querySelector('output')?.textContent ?? null,
buttons: Array.from(fieldset?.querySelectorAll('button') ?? []).map((button) => ({ text: button.textContent, disabled: button.hasAttribute('disabled') })),
frame: document.querySelector('input[aria-label="当前帧"]')?.value ?? null,
status: document.querySelector('[data-testid="engine-status"]')?.textContent ?? "",
};
});
log("manifest", JSON.stringify(await manifestInfo()));
await manifest.getByRole("button", { name: "播放", exact: true }).evaluate((element) => element.click());
await page.waitForTimeout(2500);
log("playing", JSON.stringify(await manifestInfo()));
await manifest.getByRole("button", { name: "暂停", exact: true }).evaluate((element) => element.click());
await page.waitForTimeout(1000);
log("paused", JSON.stringify(await manifestInfo()));
} catch (error) {
log("probe error", error instanceof Error ? error.message : String(error));
log("state", JSON.stringify(await physicsState().catch(() => null)));