Skip to content

Commit 401befb

Browse files
committed
✅ Fix flaky pageAction tests
1 parent 5baa6c7 commit 401befb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

apps/tests/integrations/extensions/pageAction.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ async function spinLock(predicate) {
1717
}
1818

1919
await TestManager.withBrowser(['http://example.com/'], async (window) => {
20+
await spinLock(() =>
21+
window
22+
?.windowTabs()
23+
.map(
24+
(tab) =>
25+
tab.view.browser?.mInitialized &&
26+
tab.view.websiteState === 'complete',
27+
)
28+
.reduce((p, c) => p && c, true),
29+
)
30+
2031
await TestManager.test('pageAction - Icon & Panel', async (test) => {
2132
const extension = ExtensionTestUtils.loadExtension(
2233
{

0 commit comments

Comments
 (0)