diff --git a/tests/websockets/headers.spec.ts b/tests/websockets/headers.spec.ts index 638851492..aa04624e2 100644 --- a/tests/websockets/headers.spec.ts +++ b/tests/websockets/headers.spec.ts @@ -4,6 +4,10 @@ import { buildWebsocketCommonLocators } from '../utils/page/locators'; const BRU_FILE_NAME = /^ws-test-request-with-headers$/; test.describe.serial('headers', () => { + test.afterAll(async ({ electronApp }) => { + electronApp.close(); + }); + test('headers are returned if passed', async ({ pageWithUserData: page, restartApp }) => { const locators = buildWebsocketCommonLocators(page); diff --git a/tests/websockets/connection.spec.ts b/tests/websockets/index.spec.ts similarity index 96% rename from tests/websockets/connection.spec.ts rename to tests/websockets/index.spec.ts index 6e7fcd16a..b1cd22a31 100644 --- a/tests/websockets/connection.spec.ts +++ b/tests/websockets/index.spec.ts @@ -5,7 +5,11 @@ const MAX_CONNECTION_TIME = 3000; const BRU_FILE_NAME = /^ws-test-request$/; test.describe.serial('websockets', () => { - test('websocket requests are visible', async ({ pageWithUserData: page, restartApp }) => { + test.afterAll(async ({ electronApp }) => { + electronApp.close(); + }); + + test('websocket requests are visible', async ({ pageWithUserData: page }) => { await page.locator('#sidebar-collection-name').click(); expect(page.locator('span.item-name').filter({ hasText: BRU_FILE_NAME })).toBeVisible(); diff --git a/tests/websockets/persistence.spec.ts b/tests/websockets/persistence.spec.ts index d81592d4f..a5ad29ddb 100644 --- a/tests/websockets/persistence.spec.ts +++ b/tests/websockets/persistence.spec.ts @@ -27,8 +27,9 @@ test.describe.serial('persistence', () => { originalUrl = originalUrlMatch[0].replace(/url\:/, ''); }); - test.afterAll(async () => { + test.afterAll(async ({ electronApp }) => { await writeFile(originalContext.path, originalContext.data, 'utf8'); + electronApp.close(); }); test('save new websocket url', async ({ pageWithUserData: page }) => { diff --git a/tests/websockets/subproto.spec.ts b/tests/websockets/subproto.spec.ts index bd77dcfe3..825b05b60 100644 --- a/tests/websockets/subproto.spec.ts +++ b/tests/websockets/subproto.spec.ts @@ -4,6 +4,11 @@ import { buildWebsocketCommonLocators } from '../utils/page/locators'; const BRU_FILE_NAME = /^ws-test-request-with-subproto$/; test.describe.serial('headers', () => { + + test.afterAll(async ({ electronApp }) => { + electronApp.close(); + }); + test('headers are returned if passed', async ({ pageWithUserData: page, restartApp }) => { const locators = buildWebsocketCommonLocators(page); const clearText = async (text: string) => {