Files
bruno/tests/websockets/headers.spec.ts
2025-10-01 13:28:58 +05:30

18 lines
689 B
TypeScript

import { test, expect } from '../../playwright';
import { buildWebsocketCommonLocators } from '../utils/page/locators';
const BRU_FILE_NAME = /^ws-test-request-with-headers$/;
test.describe.serial('headers', () => {
test('headers are returned if passed', async ({ pageWithUserData: page, restartApp }) => {
const locators = buildWebsocketCommonLocators(page);
await page.locator('#sidebar-collection-name').click();
await page.getByTitle(BRU_FILE_NAME).click();
await locators.runner().click();
const messages = await locators.messages();
expect(await messages[2].locator('.text-ellipsis').innerText()).toMatch(/\"(authorization)\"\:\s+\"Dummy\"/);
});
});