mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-23 12:45:38 +00:00
* fix: only get the values if the settings exist * Apply suggestion from @Copilot * refactor: move status line to the query bar --------- Co-authored-by: Bijin A B <bijin@usebruno.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
31 lines
957 B
TypeScript
31 lines
957 B
TypeScript
import { Page } from '../../../playwright';
|
|
|
|
export const buildCommonLocators = (page: Page) => ({
|
|
runner: () => page.getByTestId('run-button'),
|
|
saveButton: () => page
|
|
.locator('.infotip')
|
|
.filter({ hasText: /^Save/ })
|
|
});
|
|
|
|
export const buildWebsocketCommonLocators = (page: Page) => ({
|
|
...buildCommonLocators(page),
|
|
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'),
|
|
toolbar: {
|
|
latestFirst: () => page.getByRole('button', { name: 'Latest First' }),
|
|
latestLast: () => page.getByRole('button', { name: 'Latest Last' }),
|
|
clearResponse: () => page.getByRole('button', { name: 'Clear Response' })
|
|
}
|
|
});
|