mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
fe4df702dd
* Always generate base environment id when importing * add unit test * fix lint Co-authored-by: Filipe Freire <livrofubia@gmail.com>
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { expect } from '@playwright/test';
|
|
|
|
import { loadFixture } from '../../playwright/paths';
|
|
import { test } from '../../playwright/test';
|
|
|
|
test('can send gRPC requests', async ({ app, page }) => {
|
|
test.slow(process.platform === 'darwin' || process.platform === 'win32', 'Slow app start on these platforms');
|
|
const statusTag = page.locator('[data-testid="response-status-tag"]:visible');
|
|
const responseBody = page.locator('[data-testid="response-pane"] >> [data-testid="CodeEditor"]:visible', {
|
|
has: page.locator('.CodeMirror-activeline'),
|
|
});
|
|
|
|
await page.click('[data-testid="project"]');
|
|
await page.click('text=Create');
|
|
|
|
const text = await loadFixture('grpc.yaml');
|
|
await app.evaluate(async ({ clipboard }, text) => clipboard.writeText(text), text);
|
|
|
|
await page.click('button:has-text("Clipboard")');
|
|
await page.click('div[role="dialog"] button:has-text("New")');
|
|
await page.click('text=CollectionSmoke gRPCjust now');
|
|
|
|
await page.click('button:has-text("gRPCsay hi!")');
|
|
await page.click('text=Send');
|
|
await expect(statusTag).toContainText('0 OK');
|
|
await expect(responseBody).toContainText('"reply": "hi"');
|
|
});
|