mirror of
https://github.com/block/buzz.git
synced 2026-10-28 21:11:48 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user