test(desktop): settle hover surfaces before comparing colors

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
Logan Johnson
2026-09-08 15:47:16 -04:00
parent a6fb55dde4
commit 3825f894d0

View File

@@ -101,10 +101,12 @@ test("profile hover uses the channel hover surface", async ({ page }) => {
const profile = page.getByTestId("sidebar-profile-card");
const channel = page.getByTestId("channel-random");
await channel.hover();
await waitForAnimations(page);
const channelHoverColor = await channel.evaluate(
(element) => getComputedStyle(element).backgroundColor,
);
await profile.hover();
await waitForAnimations(page);
await expect(profile).toHaveCSS("background-color", channelHoverColor);
await waitForAnimations(page);