insomnia/packages/insomnia-smoke-test/tests/smoke/openapi.test.ts
Jack Kavanagh f81bfd68fa
removes right pane swagger preview (#5457)
* removes right pane swagger preview

* package lock

* remove preview from smoke tests
2022-11-24 14:11:09 +00:00

18 lines
611 B
TypeScript

import { expect } from '@playwright/test';
import { test } from '../../playwright/test';
test('can render Spectral OpenAPI lint errors', async ({ page }) => {
await page.click('text=Design');
await page.click('text=start from an example');
const codeEditor = page.locator('.pane-one');
await expect(codeEditor).toContainText('openapi: 3.0.0');
// Cause a lint error
await page.locator('[data-testid="CodeEditor"] >> text=info').click();
await page.locator('textarea').nth(1).press('Tab');
await expect(codeEditor).toContainText('oas3-schema Object must have required property "info"');
});