Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions tests/collection/open/open-collection.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import path from 'path';
import { test, expect, Page } from '../../../playwright';
import { buildCommonLocators } from '../../utils/page/locators';
import { createCollection } from '../../utils/page';

const openCollectionActionsMenu = async (page: Page, collectionName: string) => {
await test.step(`Open actions menu for collection "${collectionName}"`, async () => {
const locators = buildCommonLocators(page);
await locators.sidebar.collectionRow(collectionName).hover();
await locators.actions.collectionActions(collectionName).click();
});
};

const clickRemoveInCollectionMenu = async (page: Page) => {
const locators = buildCommonLocators(page);
await locators.dropdown.item('Remove').click();
await locators.modal.removeCollection.modal().waitFor({ state: 'visible', timeout: 5000 });
};

const confirmRemoveCollection = async (page: Page) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above actions are generic enough to be moved to pages/<component>

const locators = buildCommonLocators(page);
const removeModal = locators.modal.removeCollection;

const hasDiscardButton = await removeModal.discardAllAndRemoveButton().isVisible().catch(() => false);

if (hasDiscardButton) {
await removeModal.discardAllAndRemoveButton().click();
} else {
await removeModal.removeButton().click();
}

await removeModal.modal().waitFor({ state: 'hidden', timeout: 5000 });

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this timeout if not remove it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really required. Added just for time when application might be slow. Removed.

};

test.describe('Open collection sanity testcases', () => {
test('TC-2614: Verify user able to Remove the Opened collection from the sidebar', { tag: '@sanity' }, async ({ page, createTmpDir }) => {
const collectionName = 'remove-test-collection';
const collectionLocation = await createTmpDir(collectionName);
const collectionPath = path.join(collectionLocation, collectionName);
const locators = buildCommonLocators(page);

await test.step('create collection', async () => {
await createCollection(page, collectionName, collectionLocation);
});

await test.step('open collection actions menu and verify Remove option is shown', async () => {
await openCollectionActionsMenu(page, collectionName);
await expect(locators.dropdown.item('Remove')).toBeVisible();
});

await test.step('click Remove and verify confirmation modal shows path and CTAs', async () => {
await clickRemoveInCollectionMenu(page);
const removeModal = locators.modal.removeCollection;
await expect(removeModal.modal()).toBeVisible();
await expect(removeModal.removeButton()).toBeVisible();
await expect(removeModal.cancelButton()).toBeVisible();
await expect(removeModal.path()).toContainText(collectionPath);
});

await test.step('confirm removal and verify success toast', async () => {
await confirmRemoveCollection(page);
await expect(locators.toast.collectionRemovedFromWorkspace()).toBeVisible();
await expect(locators.sidebar.collection(collectionName)).not.toBeVisible();
});
});
});
35 changes: 14 additions & 21 deletions tests/utils/page/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,44 +44,37 @@
*/
const closeAllCollections = async (page) => {

@pooja-bruno pooja-bruno Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert back changes done in closeAllCollections. don't touch old actions do changes if necessary.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.
This change was made because I have added few locator in locator.ts and wanted to reuse it here also, to avoid any duplicate locators.I will not make any changes on current methods moving forward

await test.step('Close all collections', async () => {
const numberOfCollections = await page.locator('[data-testid="collections"] .collection-name').count();
const locators = buildCommonLocators(page);
const collectionsContainer = locators.sidebar.collectionsContainer();
const numberOfCollections = await collectionsContainer.locator('.collection-name').count();

for (let i = 0; i < numberOfCollections; i++) {
const firstCollection = page.locator('[data-testid="collections"] .collection-name').first();
const firstCollection = collectionsContainer.locator('.collection-name').first();
await firstCollection.scrollIntoViewIfNeeded();

const removeMenuItem = page.locator('.dropdown-item').getByText('Remove');
const removeMenuItem = locators.dropdown.item('Remove');
await expect(async () => {
await firstCollection.hover();
await firstCollection.locator('.collection-actions .icon').click({ force: true });
await expect(removeMenuItem).toBeVisible({ timeout: 2000 });
}).toPass({ timeout: 15000 });
await removeMenuItem.click();

// Wait for modal to appear - could be either regular remove or drafts confirmation
const removeModal = page.locator('.bruno-modal').filter({ hasText: 'Remove Collection' });
await removeModal.waitFor({ state: 'visible', timeout: 5000 });
const removeModal = locators.modal.removeCollection;
await removeModal.modal().waitFor({ state: 'visible', timeout: 5000 });

// Check if it's the drafts confirmation modal (has "Discard All and Remove" button)
const hasDiscardButton = await page.getByRole('button', { name: 'Discard All and Remove' }).isVisible().catch(() => false);
const hasDiscardButton = await removeModal.discardAllAndRemoveButton().isVisible().catch(() => false);

if (hasDiscardButton) {
// Drafts modal - the modal animates in and the footer can shift mid-frame,
// causing Playwright's "element is stable" actionability check to fail
// intermittently on slower machines. Use force to skip the stability check;
// visibility is already verified above via waitFor.
await page.getByRole('button', { name: 'Discard All and Remove' }).click({ force: true });
await removeModal.discardAllAndRemoveButton().click({ force: true });
} else {
// Regular modal - click the submit button
await page.locator('.bruno-modal-footer .submit').click();
await removeModal.removeButton().click();
}

// Wait for modal to close
await removeModal.waitFor({ state: 'hidden', timeout: 5000 });
await removeModal.modal().waitFor({ state: 'hidden', timeout: 5000 });
}

// Wait until no collections are left open (check sidebar only)
await expect(page.getByTestId('collections').locator('.collection-name')).toHaveCount(0);
await expect(collectionsContainer.locator('.collection-name')).toHaveCount(0);
});
};

Expand Down Expand Up @@ -390,7 +383,7 @@
if (inFolder) {
await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible();
} else {
await expect(locators.sidebar.request(requestName)).toBeVisible();
await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible();

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-select.spec.ts:59:7 › Multipart Form - File Select Without Key › file select should work on empty row without a key

4) [default] › tests/request/multipart-form/multipart-form-file-select.spec.ts:59:7 › Multipart Form - File Select Without Key › file select should work on empty row without a key Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-file-select' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-file-select' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-select.spec.ts:39:7 at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-select.spec.ts:37:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually

3) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually

3) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually

3) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file

2) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file

2) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file

2) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces

1) [default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:15:7 at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:13:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces

1) [default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:15:7 at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:13:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Detect Flaky Tests

[default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces

1) [default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:15:7 at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:13:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-select.spec.ts:59:7 › Multipart Form - File Select Without Key › file select should work on empty row without a key

4) [default] › tests/request/multipart-form/multipart-form-file-select.spec.ts:59:7 › Multipart Form - File Select Without Key › file select should work on empty row without a key Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-file-select' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-file-select' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-select.spec.ts:39:7 at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-select.spec.ts:37:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually

3) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually

3) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually

3) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:155:7 › Multipart Form - Multiple File Upload › each file can be removed individually Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file

2) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file

2) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file

2) [default] › tests/request/multipart-form/multipart-form-file-chips.spec.ts:148:7 › Multipart Form - Multiple File Upload › uploading multiple files registers one entry per file Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-multi-upload' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/multipart-form/multipart-form-file-chips.spec.ts:46:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces

1) [default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:15:7 at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:13:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces

1) [default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:15:7 at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:13:5

Check failure on line 386 in tests/utils/page/actions.ts

View workflow job for this annotation

GitHub Actions / Playwright E2E Tests (Linux)

[default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces

1) [default] › tests/request/headers/header-validation.spec.ts:27:7 › Header Validation › should show error icon when header name contains spaces Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for locator('#collection-').locator('.collection-item-name').filter({ hasText: 'test-headers' }) at tests/utils/page/actions.ts:386 384 | await expect(locators.sidebar.folderRequest(parentName, requestName)).toBeVisible(); 385 | } else { > 386 | await expect(locators.sidebar.scopedRequest(parentName, requestName)).toBeVisible(); | ^ 387 | } 388 | }); 389 | }; at /home/runner/work/bruno/bruno/tests/utils/page/actions.ts:386:77 at createRequest (/home/runner/work/bruno/bruno/tests/utils/page/actions.ts:341:3) at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:15:7 at /home/runner/work/bruno/bruno/tests/request/headers/header-validation.spec.ts:13:5

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this line back to locators.sidebar.request(requestName).
Changing the post-create assertion to scopedRequest(parentName, requestName) breaks existing tests

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.
This was added to make the assertion more robust.
Incase we have multiple collection expanded and all collection have same request name then the "await expect(locators.sidebar.request(requestName)).toBeVisible();" will fail. Tried making it more robust.

}
});
};
Expand Down Expand Up @@ -683,7 +676,7 @@
* Add an environment variable to the currently open environment. Variables and
* secrets live on separate tabs, so a secret is routed to the Secrets tab and a
* plain variable to the Variables tab before the row is added.
* @param page - The page object
* @param page - The page object

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the space again

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

* @param variable - The variable to add (name, value, and optional secret flag)
* @returns void
*/
Expand Down
Loading
Loading