mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
* revamp: collection and global env selector dropdown --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Pragadesh-45 <54320162+Pragadesh-45@users.noreply.github.com> Co-authored-by: Anoop M D <anoop.md1421@gmail.com> Co-authored-by: sanish-bruno <sanish@usebruno.com> Co-authored-by: bernborgess <bernborgesse@outlook.com> Co-authored-by: lohit <lohit@usebruno.com> Co-authored-by: Its-Treason <39559178+Its-treason@users.noreply.github.com> Co-authored-by: jayakrishnancn <jayakrishnancn@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
import { test, expect } from '../../../playwright';
|
|
import * as path from 'path';
|
|
|
|
test.describe('Invalid Postman Collection - Missing Info', () => {
|
|
const testDataDir = path.join(__dirname, '../test-data');
|
|
|
|
test('Handle Postman collection missing required info field', async ({ page }) => {
|
|
const postmanFile = path.join(testDataDir, 'postman-invalid-missing-info.json');
|
|
|
|
await page.getByRole('button', { name: 'Import Collection' }).click();
|
|
|
|
// Wait for import collection modal to be ready
|
|
const importModal = page.getByRole('dialog');
|
|
await importModal.waitFor({ state: 'visible' });
|
|
await expect(importModal.locator('.bruno-modal-header-title')).toContainText('Import Collection');
|
|
|
|
await page.setInputFiles('input[type="file"]', postmanFile);
|
|
|
|
// Wait for the loader to disappear
|
|
await page.locator('#import-collection-loader').waitFor({ state: 'hidden' });
|
|
|
|
// Check for error message
|
|
const hasError = await page.getByText('Import collection failed').first().isVisible();
|
|
expect(hasError).toBe(true);
|
|
|
|
// Cleanup: close any open modals
|
|
await page.locator('[data-test-id="modal-close-button"]').click();
|
|
});
|
|
});
|