Add prerelease test for #5664 / INS-2267 (#5668)

* Add prerelease tests for #5664 / INS-2267

* Add note on how to run non recurring tests

* improve copy
This commit is contained in:
Filipe Freire 2023-01-13 16:17:01 +00:00 committed by GitHub
parent bdbc884a48
commit 7168d01cf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

View File

@ -16,6 +16,7 @@ This project contains the smoke testing suite for Insomnia App.
- [Reproducing CI Failures](#reproducing-ci-failures) - [Reproducing CI Failures](#reproducing-ci-failures)
- [Getting traces from CI](#getting-traces-from-ci) - [Getting traces from CI](#getting-traces-from-ci)
- [Build and package methods](#build-and-package-methods) - [Build and package methods](#build-and-package-methods)
- [Non recurring tests](#non-recurring-tests)
## Quick-start ## Quick-start
@ -119,3 +120,11 @@ npm run test:smoke:package
``` ```
Each of the above commands will automatically run the Express server, so you do not need to take any extra steps. Each of the above commands will automatically run the Express server, so you do not need to take any extra steps.
### Non recurring tests
Non recurring / non-CI tests, like pre-release ones, can be run using [Playwright VS Code extension](#playwright-vs-code-extension) or by running `test:dev` against the desired test file:
```shell
npm run test:dev --prefix packages/insomnia-smoke-test -- preferences-interactions
```

View File

@ -1,3 +1,4 @@
import { loadFixture } from '../../playwright/paths';
import { test } from '../../playwright/test'; import { test } from '../../playwright/test';
test('Preferences through click', async ({ page }) => { test('Preferences through click', async ({ page }) => {
@ -13,3 +14,30 @@ test('Preferences through keyboard shortcut', async ({ page }) => {
} }
await page.locator('text=Insomnia Preferences').first().click(); await page.locator('text=Insomnia Preferences').first().click();
}); });
// Quick reproduction for Kong/insomnia#5664 and INS-2267
test('Check filter responses by environment preference', async ({ app, page }) => {
await page.click('[data-testid="project"] >> text=Insomnia');
await page.click('text=Create');
const text = await loadFixture('simple.yaml');
await app.evaluate(async ({ clipboard }, text) => clipboard.writeText(text), text);
await page.click('button:has-text("Clipboard")');
await page.click('text=Collectionsimplejust now');
// Send a request
await page.click('button:has-text("GETexample http")');
await page.click('[data-testid="request-pane"] button:has-text("Send")');
await page.click('text=Timeline');
await page.locator('text=HTTP/1.1 200 OK').click();
// Set filter responses by environment
await page.locator('[data-testid="settings-button"]').click();
await page.locator('text=Insomnia Preferences').first().click();
await page.locator('text=Filter responses by environment').click();
await page.locator('.app').press('Escape');
// Re-send the request and check timeline
await page.locator('[data-testid="request-pane"] button:has-text("Send")').click();
await page.click('text=Timeline');
await page.locator('text=HTTP/1.1 200 OK').click();
});