Files
bruno/tests/response/response-actions.spec.ts
Pooja 5e6444b8b5 feat: Set JavaScript sandbox to safe mode by default for new collections (#4824)
* feat: Set JavaScript sandbox to safe mode by default for new collections

* rm: sandbox code in playwright test

* rm: safe mode code in var interpolation test

* rm: sandbox modal code

* fix

* fix

* fix

* fix

* improve

* improvement

* fix

* fix
2025-12-18 17:27:38 +05:30

35 lines
1.2 KiB
TypeScript

import { test, expect } from '../../playwright';
import {
clickResponseAction,
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));
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 clickResponseAction(page, 'response-copy-btn');
await expect(page.getByText('Response copied to clipboard')).toBeVisible();
});
});
});