Skip to content

Commit 0b93b8b

Browse files
committed
Ignore icons that are not visible yet (flakies)
1 parent a73a456 commit 0b93b8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/gitbook/e2e/util.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ async function waitForIcons(page: Page) {
340340
return false;
341341
}
342342

343+
// Ignore icons that are not visible.
344+
if (!icon.checkVisibility()) {
345+
return true;
346+
}
347+
343348
// url("https://ka-p.fontawesome.com/releases/v6.6.0/svgs/light/moon.svg?v=2&token=a463935e93")
344349
const maskImage = window.getComputedStyle(icon).getPropertyValue('mask-image');
345350
const urlMatch = maskImage.match(/url\("([^"]+)"\)/);

0 commit comments

Comments
 (0)