diff --git a/packages/insomnia-smoke-test/tests/prerelease/debug-head.test.ts b/packages/insomnia-smoke-test/tests/prerelease/debug-head.test.ts deleted file mode 100644 index a71a55ab99..0000000000 --- a/packages/insomnia-smoke-test/tests/prerelease/debug-head.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { expect } from '@playwright/test'; - -import { test } from '../../playwright/test'; - -test('Basic interactions', async ({ }) => { - // TODO(filfreire): add a few scenarios ported from the release checklist - - await expect(true).toBeTruthy(); -}); diff --git a/packages/insomnia-smoke-test/tests/prerelease/request-pane-tab.test.ts b/packages/insomnia-smoke-test/tests/prerelease/request-pane-tab.test.ts new file mode 100644 index 0000000000..689866d458 --- /dev/null +++ b/packages/insomnia-smoke-test/tests/prerelease/request-pane-tab.test.ts @@ -0,0 +1,76 @@ +import { test } from '../../playwright/test'; + +test('Select body dropdown', async ({ page }) => { + await page.locator('div[role="tab"]:has-text("Body")').click(); + await page.locator('button:has-text("JSON")').click(); + +}); + +test('Select auth dropdown', async ({ page }) => { + await page.locator('div[role="tab"]:has-text("Auth")').click(); + await page.locator('[aria-label="Request pane tabs"] >> text=Auth').click(); + await page.locator('button:has-text("OAuth 1.0")').click(); +}); +test('Open query parameters', async ({ page }) => { + await page.locator('[data-testid="request-pane"] >> text=Query').click(); + await page.locator('text=Headers').click(); +}); + +test('Open headers', async ({ page }) => { + await page.locator('text=Headers').click(); + +}); + +test('Open docs', async ({ page }) => { + await page.locator('text=Docs').click(); +}); + +test('Add description to docs', async ({ page }) => { + await page.locator('text=Docs').click(); + await page.locator('text=Add Description').click(); + await page.locator('[data-testid="CodeEditor"] pre[role="presentation"]:has-text("")').click(); + await page.locator('textarea').nth(1).fill('new request'); // this works + // TODO - fix the locator so we don't rely on `.nth(1)` https://linear.app/insomnia/issue/INS-2255/revisit-codemirror-playwright-selectorfill +}); + +test('WS select body type dropdown', async ({ page }) => { + await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click(); + await page.locator('button:has-text("WebSocket Request")').first().click(); + await page.locator('[aria-label="Websocket request pane tabs"] >> text=JSON').click(); + await page.locator('#dropdowns-container button:has-text("JSON")').click(); +}); + +test('WS select auth type dropdown', async ({ page }) => { + await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click(); + await page.locator('button:has-text("WebSocket Request")').first().click(); + await page.locator('div[role="tab"]:has-text("Auth")').click(); +}); + +test('WS open query parameters', async ({ page }) => { + await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click(); + await page.locator('button:has-text("WebSocket Request")').first().click(); + await page.locator('text=Query').click(); +}); + +test('WS open headers', async ({ page }) => { + await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click(); + await page.locator('button:has-text("WebSocket Request")').first().click(); + await page.locator('text=Headers').click(); +}); + +test('WS open docs', async ({ page }) => { + await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click(); + await page.locator('button:has-text("WebSocket Request")').first().click(); + await page.locator('text=Docs').click(); + +}); + +test('WS add description', async ({ page }) => { + await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click(); + await page.locator('button:has-text("WebSocket Request")').first().click(); + await page.locator('text=Docs').click(); + await page.locator('text=Add Description').click(); + await page.locator('[data-testid="CodeEditor"] pre[role="presentation"]:has-text("")').click(); + await page.locator('textarea').nth(1).fill('new wss'); + // TODO - fix the locator so we don't rely on `.nth(1)` https://linear.app/insomnia/issue/INS-2255/revisit-codemirror-playwright-selectorfill +}); diff --git a/packages/insomnia-smoke-test/tests/smoke/openapi.test.ts b/packages/insomnia-smoke-test/tests/smoke/openapi.test.ts index a7cb1ce7a4..38c0441119 100644 --- a/packages/insomnia-smoke-test/tests/smoke/openapi.test.ts +++ b/packages/insomnia-smoke-test/tests/smoke/openapi.test.ts @@ -12,6 +12,7 @@ test('can render Spectral OpenAPI lint errors', async ({ page }) => { // 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"'); });