Skip to content

Commit

Permalink
✅ Fix flaky pageAction tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trickypr committed Apr 26, 2024
1 parent 5baa6c7 commit 401befb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps/tests/integrations/extensions/pageAction.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ async function spinLock(predicate) {
}

await TestManager.withBrowser(['http://example.com/'], async (window) => {
await spinLock(() =>
window
?.windowTabs()
.map(
(tab) =>
tab.view.browser?.mInitialized &&
tab.view.websiteState === 'complete',
)
.reduce((p, c) => p && c, true),
)

await TestManager.test('pageAction - Icon & Panel', async (test) => {
const extension = ExtensionTestUtils.loadExtension(
{
Expand Down

0 comments on commit 401befb

Please sign in to comment.