mirror of
https://github.com/Kong/insomnia
synced 2024-11-12 17:26:32 +00:00
a8c1da727a
* add path parameters to the request/ws-request model * render path params * show path params on the ui * fix rendering of params * cleanup params ui in ws * cleanup request model * add empty state info * update styles * certificate-styles * fix tests * cleanup code * fix e2e tests
40 lines
2.1 KiB
TypeScript
40 lines
2.1 KiB
TypeScript
import { test } from '../../playwright/test';
|
|
|
|
test('Request tabs', async ({ page }) => {
|
|
await page.getByRole('button', { name: 'New Collection' }).click();
|
|
await page.getByRole('dialog').getByRole('button', { name: 'Create' }).click();
|
|
|
|
await page.getByLabel('Create in collection').click();
|
|
await page.getByRole('menuitemradio', { name: 'HTTP Request' }).press('Enter');
|
|
await page.getByRole('tab', { name: 'Body' }).click();
|
|
await page.getByRole('button', { name: 'Body' }).click();
|
|
await page.getByRole('menuitem', { name: 'JSON' }).click();
|
|
await page.getByRole('tab', { name: 'Auth' }).click();
|
|
await page.getByRole('button', { name: 'Auth' }).click();
|
|
await page.getByRole('menuitem', { name: 'OAuth 1.0' }).click();
|
|
await page.getByRole('tab', { name: 'Parameters' }).click();
|
|
await page.getByRole('tab', { name: 'Headers' }).click();
|
|
await page.getByRole('tab', { name: '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');
|
|
});
|
|
|
|
test('WS tabs', async ({ page }) => {
|
|
await page.getByRole('button', { name: 'New Collection' }).click();
|
|
await page.getByRole('dialog').getByRole('button', { name: 'Create' }).click();
|
|
|
|
await page.getByLabel('Create in collection').click();
|
|
await page.getByRole('menuitemradio', { name: 'WebSocket Request' }).click();
|
|
await page.getByRole('tab', { name: 'JSON' }).click();
|
|
await page.getByLabel('Websocket request pane tabs').getByRole('button', { name: 'JSON' }).click();
|
|
await page.getByRole('menuitem', { name: 'JSON' }).click();
|
|
await page.getByRole('tab', { name: 'Auth' }).click();
|
|
await page.getByRole('tab', { name: 'Parameters' }).click();
|
|
await page.getByRole('tab', { name: 'Headers' }).click();
|
|
await page.getByRole('tab', { name: 'Docs' }).click();
|
|
await page.getByRole('button', { name: 'Add Description' }).click();
|
|
await page.locator('[data-testid="CodeEditor"] pre[role="presentation"]:has-text("")').click();
|
|
await page.locator('textarea').nth(1).fill('new wss');
|
|
});
|