Skip to content

Commit 8489936

Browse files
committed
test(messages): stabilize sidebar tooltip reveal
Signed-off-by: klopez4212 <[email protected]>
1 parent 778457d commit 8489936

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

‎tests/browser/navigation-sidebar.spec.mjs‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,21 @@ test("channel sidebar resizes from the full gutter and persists", async ({
7575
"data-tooltip",
7676
"Drag to resize · Double-click to reset",
7777
);
78-
await page.mouse.move(grip.x + grip.width / 2, grip.y + grip.height / 2);
7978
const tooltip = () =>
8079
handle.evaluate((element) => {
8180
const style = getComputedStyle(element, "::before");
82-
return { delay: style.transitionDelay, opacity: style.opacity };
81+
return {
82+
delay: style.transitionDelay,
83+
opacity: style.opacity,
84+
visibility: style.visibility,
85+
};
8386
});
84-
await expect.poll(tooltip).toEqual({ delay: "0.6s", opacity: "0" });
85-
await page.addStyleTag({
86-
content: `[aria-label="Resize channel sidebar"]:hover::before {
87-
transition: none !important;
88-
}`,
87+
await page.mouse.move(grip.x + grip.width / 2, grip.y + grip.height / 2);
88+
await expect.poll(async () => (await tooltip()).delay).toBe("0.6s");
89+
await expect.poll(tooltip).toMatchObject({
90+
opacity: "1",
91+
visibility: "visible",
8992
});
90-
await expect.poll(async () => (await tooltip()).opacity).toBe("1");
9193

9294
await handle.press("ArrowRight");
9395
await expect

0 commit comments

Comments
 (0)