mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
90b9516d55
* make all migration functions non-async * migrate is not a promise * simplify scope migration * remove apispec and fix test * fix tests * fix tests, for real this time * removed api spec from collection * default doc name to my-spec.yaml again * fix apispec typing * remove pointless generic * fix type * Create an api spec on first launch * Remove flaky firstLaunch data creation * fix test * create apispec only when scope is deisgn * oauth test left * gitlab test --------- Co-authored-by: gatzjames <jamesgatzos@gmail.com>
21 lines
905 B
TypeScript
21 lines
905 B
TypeScript
import { expect } from '@playwright/test';
|
|
|
|
import { test } from '../../playwright/test';
|
|
|
|
test('can render Spectral OpenAPI lint errors', async ({ page }) => {
|
|
await page.getByRole('button', { name: 'New Document' }).click();
|
|
await page.getByRole('dialog').getByRole('button', { name: 'Create' }).click();
|
|
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');
|
|
// TODO - fix the locator so we don't rely on `.nth(1)` https://linear.app/insomnia/issue/INS-2255/revisit-codemirror-playwright-selectorfill
|
|
|
|
await expect(codeEditor).toContainText('oas3-schema Object must have required property "info"');
|
|
});
|