Skip to content
Merged
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
5 changes: 5 additions & 0 deletions tests/ui-tools.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,10 @@ test.describe("Clinical KB tools launcher", () => {
const dock = page.locator("form.answer-footer-search-dock");
await expect(dock).toBeVisible();
await expect(dock).not.toHaveAttribute("data-scroll-hidden", "true");
// The global Playwright config emulates prefers-reduced-motion:reduce to
// avoid animation races. Temporarily lift it so motion-reduce:transition-none
// does not suppress the transition we are about to verify.
await page.emulateMedia({ reducedMotion: "no-preference" });
const transition = await dock.evaluate((node) => {
const style = window.getComputedStyle(node);
const durationMs = Math.max(
Expand All @@ -1032,6 +1036,7 @@ test.describe("Clinical KB tools launcher", () => {
);
return { durationMs, property: style.transitionProperty };
});
await page.emulateMedia({ reducedMotion: "reduce" });
expect(transition.property).toMatch(/transform|all/);
expect(transition.durationMs).toBeGreaterThanOrEqual(100);

Expand Down