Files
bruno/tests/import/openapi/security-schemes-import.spec.ts
Sanjai Kumar 395aa4246e fix: OpenAPI import fails when securitySchemes are not defined (#6429)
* feat: enhance OpenAPI security scheme handling

* refactor: revert test changes and update openapi-to-bruno
2025-12-17 16:52:54 +05:30

26 lines
1012 B
TypeScript

import { test } from '../../../playwright';
import * as path from 'path';
import { closeAllCollections, importCollection } from '../../utils/page';
test.describe('OpenAPI Security Schemes Import', () => {
test.afterEach(async ({ page }) => {
await closeAllCollections(page);
});
test('Import OpenAPI spec with security schemes', async ({ page, createTmpDir }) => {
const openApiFile = path.resolve(__dirname, 'fixtures', 'openapi-with-security-schemes.json');
await importCollection(page, openApiFile, await createTmpDir('openapi-with-security'), {
expectedCollectionName: 'API with Security Schemes'
});
});
test('Import OpenAPI spec without security schemes', async ({ page, createTmpDir }) => {
const openApiFile = path.resolve(__dirname, 'fixtures', 'openapi-without-security-schemes.json');
await importCollection(page, openApiFile, await createTmpDir('openapi-without-security'), {
expectedCollectionName: 'API without Security Schemes'
});
});
});