2023-01-11 16:06:46 +00:00
|
|
|
import { test } from '../../playwright/test';
|
|
|
|
|
2023-08-18 08:38:19 +00:00
|
|
|
test('Request tabs', async ({ page }) => {
|
2023-07-05 16:51:55 +00:00
|
|
|
await page.getByRole('button', { name: 'New Collection' }).click();
|
|
|
|
await page.getByRole('dialog').getByRole('button', { name: 'Create' }).click();
|
|
|
|
|
2023-08-22 16:12:29 +00:00
|
|
|
await page.getByLabel('Create in collection').click();
|
|
|
|
await page.getByRole('menuitemradio', { name: 'HTTP Request' }).press('Enter');
|
2023-01-20 14:49:52 +00:00
|
|
|
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: 'Query' }).click();
|
|
|
|
await page.getByRole('tab', { name: 'Headers' }).click();
|
|
|
|
await page.getByRole('tab', { name: 'Docs' }).click();
|
2023-01-11 16:06:46 +00:00
|
|
|
await page.locator('text=Add Description').click();
|
|
|
|
await page.locator('[data-testid="CodeEditor"] pre[role="presentation"]:has-text("")').click();
|
2023-08-17 14:18:48 +00:00
|
|
|
await page.locator('textarea').nth(1).fill('new request');
|
2023-01-11 16:06:46 +00:00
|
|
|
});
|
|
|
|
|
2023-07-28 08:08:35 +00:00
|
|
|
test('WS tabs', async ({ page }) => {
|
2023-08-18 08:38:19 +00:00
|
|
|
await page.getByRole('button', { name: 'New Collection' }).click();
|
|
|
|
await page.getByRole('dialog').getByRole('button', { name: 'Create' }).click();
|
|
|
|
|
2023-08-22 16:12:29 +00:00
|
|
|
await page.getByLabel('Create in collection').click();
|
|
|
|
await page.getByRole('menuitemradio', { name: 'WebSocket Request' }).click();
|
2023-01-20 14:49:52 +00:00
|
|
|
await page.getByRole('tab', { name: 'JSON' }).click();
|
|
|
|
await page.getByRole('menuitem', { name: 'JSON' }).click();
|
|
|
|
await page.getByRole('tab', { name: 'Auth' }).click();
|
|
|
|
await page.getByRole('tab', { name: 'Query' }).click();
|
|
|
|
await page.getByRole('tab', { name: 'Headers' }).click();
|
|
|
|
await page.getByRole('tab', { name: 'Docs' }).click();
|
|
|
|
await page.getByRole('button', { name: 'Add Description' }).click();
|
2023-01-11 16:06:46 +00:00
|
|
|
await page.locator('[data-testid="CodeEditor"] pre[role="presentation"]:has-text("")').click();
|
|
|
|
await page.locator('textarea').nth(1).fill('new wss');
|
|
|
|
});
|