Files
bruno/tests/websockets/headers.spec.ts
Siddharth Gelera 2a674786e2 test(websocket): add headers handling in tests
- Implemented logic to send headers in websocket messages.
- Added tests for websocket connections and message handling.
- Created locators for common elements in websocket tests.
2025-09-18 17:21:53 +05:30

19 lines
708 B
TypeScript

import { test, expect, Page } from '../../playwright';
import { buildCommonLocators } from './lib/locators';
const BRU_FILE_NAME = 'ws-test-request-with-headers';
test.describe.serial('headers', () => {
test.setTimeout(2 * 10 * 1000);
test('headers are returned if passed', async ({ pageWithUserData: page, restartApp }) => {
const locators = buildCommonLocators(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\"/)
});
});