mirror of
https://github.com/microsoft/playwright-java.git
synced 2025-09-08 21:01:00 +00:00
test: unflake shouldWorkWithClickingOnLinksWhichDoNotCommitNavigation (#96)
This commit is contained in:
parent
8d7bbe38d6
commit
7b5d5b1771
@ -24,6 +24,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import static com.microsoft.playwright.Page.EventType.FRAMENAVIGATED;
|
||||
import static com.microsoft.playwright.Utils.expectedSSLError;
|
||||
import static com.microsoft.playwright.Utils.getOS;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class TestPageWaitForNavigation extends TestBase {
|
||||
@ -76,10 +77,10 @@ public class TestPageWaitForNavigation extends TestBase {
|
||||
event.get();
|
||||
fail("did not throw");
|
||||
} catch (PlaywrightException e) {
|
||||
if (!e.getMessage().contains(expectedSSLError(browserType.name()))) {
|
||||
e.printStackTrace(System.err);
|
||||
fail("Unexpected exception: '" + e.getMessage() + "'");
|
||||
}
|
||||
// TODO: figure out why it is inconsistent on Linux WebKit.
|
||||
assertTrue(e.getMessage().contains(expectedSSLError(browserType.name())) ||
|
||||
(isWebKit() && getOS() == Utils.OS.LINUX && "Server required TLS certificate".equals(e.getMessage())),
|
||||
"Unexpected exception: '" + e.getMessage() + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user