Skip to content

Commit

Permalink
Fix page goto tests for async
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed May 8, 2024
1 parent 099a6a4 commit 5cdfa61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/browser_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ func TestK6Object(t *testing.T) {
got, err := vu.TestRT.RunOnEventLoop(`
(async function() {
const p = await browser.newPage();
p.goto("about:blank");
await p.goto("about:blank");
const o = p.evaluate(() => window.k6);
return JSON.stringify(o);
})();
Expand All @@ -675,7 +675,7 @@ func TestK6Object(t *testing.T) {
await browser.closeContext();
const c = await browser.newContext();
const p2 = await c.newPage();
p2.goto("about:blank");
await p2.goto("about:blank");
const o2 = p2.evaluate(() => window.k6);
return JSON.stringify(o2);
})();
Expand Down Expand Up @@ -714,10 +714,10 @@ func TestNewTab(t *testing.T) {
_, err := vu.TestRT.RunOnEventLoop(fmt.Sprintf(`
(async function() {
const p = await browser.newPage()
p.goto("%s/%s/ping.html")
await p.goto("%s/%s/ping.html")
const p2 = browser.context().newPage()
p2.goto("%s/%s/ping.html")
await p2.goto("%s/%s/ping.html")
})()`, s.URL, testBrowserStaticDir, s.URL, testBrowserStaticDir))
require.NoError(t, err)
}
Expand Down

0 comments on commit 5cdfa61

Please sign in to comment.