mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-02 17:08:32 +00:00
feat: add copy and paste functionality for requests (#5907)
This commit is contained in:
@@ -45,4 +45,16 @@ const openCollectionAndAcceptSandbox = async (page, collectionName: string, sand
|
||||
});
|
||||
};
|
||||
|
||||
export { closeAllCollections, openCollectionAndAcceptSandbox };
|
||||
const createCollection = async (page, collectionName: string, createDir: (tag?: string | undefined) => Promise<string>) => {
|
||||
await page.locator('.dropdown-icon').click();
|
||||
await page.locator('.dropdown-item').filter({ hasText: 'Create Collection' }).click();
|
||||
await page.getByLabel('Name').fill(collectionName);
|
||||
await page.getByLabel('Location').fill(await createDir(collectionName));
|
||||
await page.getByRole('button', { name: 'Create', exact: true }).click();
|
||||
await expect(page.locator('#sidebar-collection-name').filter({ hasText: collectionName })).toBeVisible();
|
||||
await page.locator('#sidebar-collection-name').filter({ hasText: collectionName }).click();
|
||||
await page.getByLabel('Safe Mode').check();
|
||||
await page.getByRole('button', { name: 'Save' }).click();
|
||||
};
|
||||
|
||||
export { closeAllCollections, openCollectionAndAcceptSandbox, createCollection };
|
||||
|
||||
Reference in New Issue
Block a user