Files
bruno/tests/utils/page/actions.ts
Jayakrishnan C N 14966f6e6c feat: import multiple collections from a parent folder (#5431)
* feat: import multiple collections from a parent folder
* feat: open collections in parallel, revert plural labels, and update playwright tests

---------

Co-authored-by: Bijin Bruno <bijin@usebruno.com>
2025-09-30 13:27:20 +05:30

12 lines
438 B
TypeScript

const closeAllCollections = async (page) => {
const numberOfCollections = await page.locator('.collection-name').count();
for (let i = 0; i < numberOfCollections; i++) {
await page.locator('.collection-name').first().locator('.collection-actions').click();
await page.locator('.dropdown-item').getByText('Close').click();
await page.getByRole('button', { name: 'Close' }).click();
}
};
export { closeAllCollections };