mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-22 20:25:38 +00:00
Await the websocket visibility assertion so it actually runs (#8317)
The 'websocket requests are visible' test calls expect(page.locator(...)).toBeVisible() without awaiting it. A Playwright web-first matcher returns a Promise that polls and retries until the element matches or the timeout elapses. When the expect is not awaited the Promise is created and immediately discarded, so the assertion never runs and the test passes whether or not the request is visible in the sidebar. This is the sole assertion in that test, so the test gave no real coverage. The six other expect calls in the same file are already awaited, so this brings the line in line with the file's own idiom. Signed-off-by: YONGJAE LEE <dev.yongjaelee@gmail.com>
This commit is contained in:
committed by
GitHub
parent
fd30eaeccf
commit
21efded2bf
@@ -8,7 +8,7 @@ test.describe.serial('websockets', () => {
|
||||
test('websocket requests are visible', async ({ pageWithUserData: page, restartApp }) => {
|
||||
await page.locator('#sidebar-collection-name').click();
|
||||
|
||||
expect(page.locator('span.item-name').filter({ hasText: BRU_REQ_NAME })).toBeVisible();
|
||||
await expect(page.locator('span.item-name').filter({ hasText: BRU_REQ_NAME })).toBeVisible();
|
||||
});
|
||||
|
||||
test('websocket connects', async ({ pageWithUserData: page, restartApp }) => {
|
||||
|
||||
Reference in New Issue
Block a user