test(web): record high-contrast theme and keyframe dope sheet evidence
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,24 @@ try {
|
||||
await page.getByRole("button", { name: "关闭偏好设置", exact: true }).click();
|
||||
await page.waitForTimeout(800);
|
||||
log("dark", JSON.stringify(await themeState()));
|
||||
await page.getByRole("button", { name: "编辑", exact: true }).click();
|
||||
await page.getByRole("menuitem", { name: "偏好设置", exact: true }).click();
|
||||
await page.getByRole("button", { name: "主题", exact: true }).click();
|
||||
await page.getByRole("combobox", { name: "主题预设", exact: true }).selectOption("HIGH_CONTRAST");
|
||||
await page.getByRole("button", { name: "关闭偏好设置", exact: true }).click();
|
||||
await page.waitForTimeout(800);
|
||||
const high = await page.evaluate(() => {
|
||||
const frame = document.querySelector('.area-frame');
|
||||
const style = frame ? getComputedStyle(frame) : null;
|
||||
return { theme: document.documentElement.dataset.theme ?? null, outline: style ? `${style.outlineStyle} ${style.outlineWidth} ${style.outlineColor}` : null };
|
||||
});
|
||||
log("high-contrast", JSON.stringify(high));
|
||||
await page.getByRole("button", { name: "编辑", exact: true }).click();
|
||||
await page.getByRole("menuitem", { name: "偏好设置", exact: true }).click();
|
||||
await page.getByRole("button", { name: "主题", exact: true }).click();
|
||||
await page.getByRole("combobox", { name: "主题预设", exact: true }).selectOption("DARK");
|
||||
await page.getByRole("button", { name: "关闭偏好设置", exact: true }).click();
|
||||
await page.waitForTimeout(500);
|
||||
} catch (error) {
|
||||
log("probe error", error instanceof Error ? error.message : String(error));
|
||||
log("state", JSON.stringify(await themeState().catch(() => null)));
|
||||
|
||||
Reference in New Issue
Block a user