Skip to content

Commit a6b06fb

Browse files
navin772diemol
andauthored
[js][bidi]: fix flaky bidi network test - can request cookies (#16141)
fix flaky cookie bidi test Co-authored-by: Diego Molina <[email protected]>
1 parent 7a56a48 commit a6b06fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

javascript/selenium-webdriver/test/bidi/network_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ suite(
6969
await driver.navigate().refresh()
7070

7171
assert.equal(beforeRequestEvent.request.method, 'GET')
72+
await driver.wait(() => beforeRequestEvent.request.cookies.length > 0, 2000)
7273
assert.equal(beforeRequestEvent.request.cookies[0].name, 'north')
7374
assert.equal(beforeRequestEvent.request.cookies[0].value.value, 'biryani')
7475
const url = beforeRequestEvent.request.url
@@ -80,6 +81,7 @@ suite(
8081
})
8182
await driver.navigate().refresh()
8283

84+
await driver.wait(() => beforeRequestEvent.request.cookies.length > 1, 2000)
8385
assert.equal(beforeRequestEvent.request.cookies[1].name, 'south')
8486
assert.equal(beforeRequestEvent.request.cookies[1].value.value, 'dosa')
8587
})

0 commit comments

Comments
 (0)