mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 00:14:54 +00:00
test(sidebar): wait for hover card transitions to settle
Keyboard focus traversal briefly retains the previous card during its exit animation. Wait for a single card before asserting visibility so the test still catches persistent duplicates.
This commit is contained in:
@@ -81,7 +81,10 @@ export async function scrollWorkspaceList(page: Page): Promise<void> {
|
||||
}
|
||||
|
||||
export async function expectWorkspaceHoverCardOpen(page: Page): Promise<void> {
|
||||
await expect(page.getByTestId("workspace-hover-card")).toBeVisible();
|
||||
const card = page.getByTestId("workspace-hover-card");
|
||||
// Moving keyboard focus can leave the previous card mounted during its exit animation.
|
||||
await expect(card).toHaveCount(1);
|
||||
await expect(card).toBeVisible();
|
||||
}
|
||||
|
||||
export async function expectWorkspaceHoverCardStaysOpen(page: Page): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user