mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
chore: close app for each test to start afresh
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
@@ -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 }) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user