mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-01 00:24:08 +00:00
* feat: toolbar design updates * chore: addressed coderabbit review comments * fix: update unit tests --------- Co-authored-by: Bijin A B <bijin@usebruno.com>
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { test, expect } from '../../playwright';
|
|
import {
|
|
closeAllCollections,
|
|
createCollection,
|
|
createRequest,
|
|
sendRequest
|
|
} from '../utils/page/actions';
|
|
import { buildCommonLocators } from '../utils/page/locators';
|
|
|
|
test.describe('Response Pane Actions', () => {
|
|
test.afterAll(async ({ page }) => {
|
|
await closeAllCollections(page);
|
|
});
|
|
|
|
test('should copy response to clipboard', async ({ page, createTmpDir }) => {
|
|
const collectionName = 'response-copy-test';
|
|
const locators = buildCommonLocators(page);
|
|
|
|
await test.step('Create collection and request', async () => {
|
|
await createCollection(page, collectionName, await createTmpDir(collectionName), { openWithSandboxMode: 'safe' });
|
|
await createRequest(page, 'copy-test', collectionName, { url: 'https://testbench-sanity.usebruno.com/ping' });
|
|
});
|
|
|
|
await test.step('Send request and wait for response', async () => {
|
|
await sendRequest(page, 200);
|
|
});
|
|
|
|
await test.step('Copy response to clipboard', async () => {
|
|
await expect(locators.response.copyButton()).toBeVisible();
|
|
await locators.response.copyButton().click();
|
|
await expect(page.getByText('Response copied to clipboard')).toBeVisible();
|
|
});
|
|
});
|
|
});
|