Skip to content

Commit

Permalink
chore: Fixed browser launch sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Oct 29, 2023
1 parent 752329b commit 1bd6ead
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/tools/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export async function preparePage(page: playwright.Page) {
setInterval(() => {
window.onerror = console.error;
window.onunhandledrejection = console.error;
(window as any).wppForceMainLoad = true;
}, 500);
});

Expand Down
6 changes: 6 additions & 0 deletions src/tools/updateModuleID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ dirs.push(
async function start() {
const { browser, page } = await getPage();

page.addInitScript(() => {
setInterval(() => {
(window as any).wppForceMainLoad = true;
}, 500);
});

await page.waitForFunction(() => window.WPP?.isFullReady, null, {
timeout: 0,
});
Expand Down

0 comments on commit 1bd6ead

Please sign in to comment.