Skip to content

Commit

Permalink
Improved page-ready detection on slow networks
Browse files Browse the repository at this point in the history
  • Loading branch information
franrou committed Oct 21, 2024
1 parent 9a4fad2 commit e1ebb72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/backstop.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"--disable-setuid-sandbox",
"--font-render-hinting=none"
],
"gotoParameters": { "waitUntil": "networkidle0" }
"gotoParameters": { "waitUntil": ["load", "networkidle0"] }
},
"debug": false,
"debugWindow": false,
Expand Down
4 changes: 2 additions & 2 deletions loginAndNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ module.exports = async(page, scenario, config) => {
await page.type(scenario.loginWrapperSelector + ' input[name="name"]', user);
await page.type(scenario.loginWrapperSelector + ' input[name="pass"]', pass);
await page.keyboard.press('Enter'); // Enter Key
await page.waitForNavigation({ waitUntil: 'networkidle0'});
await page.waitForNavigation({ waitUntil: ['load', 'networkidle0']});

if (scenario.loginRedirectTo) {
await page.goto(scenario.loginRedirectTo, {
waitUntil: 'networkidle0'
waitUntil: ['load', 'networkidle0']
});
}

Expand Down

0 comments on commit e1ebb72

Please sign in to comment.