Skip to content

Commit

Permalink
update expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Oct 2, 2024
1 parent e43ab26 commit 64e24f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void setupWS(Frame target, int port, String binaryType) {
" window.ws = new WebSocket('ws://localhost:' + port + '/ws');\n" +
" window.ws.binaryType = binaryType;\n" +
" window.ws.addEventListener('open', () => window.log.push('open'));\n" +
" window.ws.addEventListener('close', event => window.log.push(`close code=${event.code} reason=${event.reason} wasClean=${event.wasClean}`));\n" +
" window.ws.addEventListener('close', event => window.log.push(`close code=${event.code} reason=${event.reason}`));\n" +
" window.ws.addEventListener('error', event => window.log.push(`error`));\n" +
" window.ws.addEventListener('message', async event => {\n" +
" let data;\n" +
Expand Down Expand Up @@ -127,7 +127,7 @@ public void shouldWorkWithTextMessage(String mock, Page page) throws Exception {

assertEquals(
asList("open", "message: data=hello origin=ws://localhost:" + webSocketServer.getPort() + " lastEventId=",
"close code=1008 reason=oops wasClean=true"),
"close code=1008 reason=oops"),
page.evaluate("window.log"));
}

Expand Down Expand Up @@ -316,7 +316,7 @@ public void shouldWorkWithoutServer(Page page) {
"message: data=response origin=ws://localhost:" + webSocketServer.getPort() + " lastEventId=",
"message: data=response origin=ws://localhost:" + webSocketServer.getPort() + " lastEventId=",
"message: data=another origin=ws://localhost:" + webSocketServer.getPort() + " lastEventId=",
"close code=3008 reason=oops wasClean=true"),
"close code=3008 reason=oops"),
page.evaluate("window.log"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ private int browserMajorVersion() {
}

@Test
@DisabledIf(value="com.microsoft.playwright.TestBase#isChromium", disabledReason="Started failing since last driver roll, flaky upstream")
void pageWorkers() {
Worker worker = page.waitForWorker(() -> page.navigate(server.PREFIX + "/worker/worker.html"));
assertTrue(worker.url().contains("worker.js"));
Expand Down

0 comments on commit 64e24f6

Please sign in to comment.