-
Notifications
You must be signed in to change notification settings - Fork 261
test: unflake TestPageClock #1699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,8 +290,9 @@ void shouldRunTimeBeforePopup(Page page, Server server) { | |
| Page popup = page.waitForPopup(() -> { | ||
| page.evaluate("url => window.open(url)", server.PREFIX + "/popup.html"); | ||
| }); | ||
| popup.waitForURL(server.PREFIX + "/popup.html"); | ||
| Double popupTime = (Double) popup.evaluate("time"); | ||
| assertTrue(popupTime >= 2000); | ||
| assertTrue(popupTime >= 2000, "popupTime = " + popupTime); | ||
| } | ||
|
|
||
| @Test | ||
|
|
@@ -310,6 +311,7 @@ void shouldNotRunTimeBeforePopupOnPause(Page page, Server server) { | |
| Page popup = page.waitForPopup(() -> { | ||
| page.evaluate("url => window.open(url)", server.PREFIX + "/popup.html"); | ||
| }); | ||
| popup.waitForURL(server.PREFIX + "/popup.html"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like upstream does waitForLoadState? https://github.com/microsoft/playwright/blob/77dee44984af1cd5b7c1ec4f6ed6fe022c7c55e6/tests/library/page-clock.spec.ts#L357
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait for url does wait for load state too by default and also ensures we are not on about:blank (unlikely). |
||
| Object popupTime = popup.evaluate("time"); | ||
| assertEquals(1000, popupTime); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.