mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 13:15:40 +00:00
- Implemented logic to send headers in websocket messages. - Added tests for websocket connections and message handling. - Created locators for common elements in websocket tests.
23 lines
776 B
TypeScript
23 lines
776 B
TypeScript
import { Page } from '../../../playwright';
|
|
|
|
export const buildCommonLocators = (page: Page) => ({
|
|
runner: () => page.getByTestId('run-button'),
|
|
connectionControls: {
|
|
connect: () =>
|
|
page
|
|
.locator('div.connection-controls')
|
|
.locator('.infotip')
|
|
.filter({ hasText: /^Connect$/ }),
|
|
disconnect: () =>
|
|
page
|
|
.locator('div.connection-controls')
|
|
.locator('.infotip')
|
|
.filter({ hasText: /^Close Connection$/ })
|
|
},
|
|
messages: () => page.locator('.ws-message').all(),
|
|
toolbar: {
|
|
latestFirst:() => page.getByRole('button', { name: 'Latest First' }),
|
|
latestLast:() => page.getByRole('button', { name: 'Latest Last' }),
|
|
clearResponse: () => page.getByRole('button', { name: 'Clear Response' })
|
|
}
|
|
}); |