Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/webui/test/browser/rail-pin.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ test("the pin button offers the unpin glyph on a pinned row", async ({ page }) =
// Wrong when: the label says 取消置顶 and the drawing does not change, which
// is the state this whole change started from.
expect(await pinGlyphState(page, "A")).toBe("pinned");
expect(await pinButtonLabel(page, "A")).toBe("取消置顶:绿川椒 Demo 订货小程序");
expect(await pinButtonLabel(page, "A")).toBe("取消置顶:Synthetic session A");
});

test("the pin button offers the pin glyph on a row that is not pinned", async ({ page }) => {
await seedPins(page, { sessions: { A: true } });
await openApp(page, "#session=A");

expect(await pinGlyphState(page, "B")).toBe("unpinned");
expect(await pinButtonLabel(page, "B")).toBe("置顶:灵动岛卡住问题");
expect(await pinButtonLabel(page, "B")).toBe("置顶:Synthetic session B");
});

test("two pinned rows each draw their own pin glyph", async ({ page }) => {
Expand Down
11 changes: 11 additions & 0 deletions packages/webui/test/browser/visual-baselines.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ test("settings dialog layout baseline", async ({ page }) => {
const dialog = page.locator('[role="dialog"][aria-label="设置"]');
await assertInViewport(dialog, page);
await expect(dialog.getByRole("heading", { name: "通用", exact: true })).toBeVisible();
// The overlay fades in and the panel behind it slides in, so a frame taken
// while either is still moving is a frame the next run does not repeat. The
// same wait the browser panel case uses, over the whole subtree, so this
// records the settled frame rather than a lucky one.
await dialog.evaluate(async (element) => {
const finite = element.getAnimations({ subtree: true }).filter((animation) => {
const timing = animation.effect?.getComputedTiming();
return timing ? Number.isFinite(timing.endTime) : false;
});
await Promise.all(finite.map((animation) => animation.finished.catch(() => undefined)));
});
await expect(dialog).toHaveScreenshot("settings-dialog.png", { animations: "disabled" });
});

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading