mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 17:19:42 -04:00
[INS-2022] Initial exploration multiple test projects (#5244)
* Initial exploration multiple test projects * Replace duplicate scenario with one to be filled in * Simplify number of playwright project configs * Fix testMatch setting on playwright config * Edit github actions to distinguish between CI and Release runs
This commit is contained in:
1 parent
7ef73dfb2e
commit
5bba2e9545
12 files changed
+48
-18
No files matched your search
@@ -53,8 +53,15 @@ jobs:
|
||||
NODE_OPTIONS: '--max_old_space_size=6144'
|
||||
run: npm run app-build
|
||||
|
||||
- name: Run app smoke tests
|
||||
run: npm run test:smoke:build
|
||||
- name: Run Smoke tests (CI)
|
||||
# Partial Smoke test run, for regular CI triggers
|
||||
if: "!startsWith(github.head_ref, 'release/')"
|
||||
run: npm run test:build --prefix packages/insomnia-smoke-test -- --project=Smoke
|
||||
|
||||
- name: Run Smoke tests (Release)
|
||||
# Full Smoke test run, for Release PRs
|
||||
if: "startsWith(github.head_ref, 'release/')"
|
||||
run: npm run test:build --prefix packages/insomnia-smoke-test
|
||||
|
||||
- name: Set Inso CLI variables
|
||||
id: inso-variables
|
||||
|
||||
+3
-3
@@ -29,9 +29,9 @@
|
||||
"app-package": "npm run build --prefix packages/insomnia && npm run package --prefix packages/insomnia",
|
||||
"app-bump-version": "npm run bump-version --prefix packages/insomnia",
|
||||
"preinstall": "node ./scripts/check-version.js",
|
||||
"test:smoke:dev": "npm run test:dev --prefix packages/insomnia-smoke-test",
|
||||
"test:smoke:build": "npm run test:build --prefix packages/insomnia-smoke-test",
|
||||
"test:smoke:package": "npm run test:package --prefix packages/insomnia-smoke-test",
|
||||
"test:smoke:dev": "npm run test:dev --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
||||
"test:smoke:build": "npm run test:build --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
||||
"test:smoke:package": "npm run test:package --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
||||
"test:smoke:cli": "npm run test:cli --prefix packages/insomnia-smoke-test",
|
||||
"hard-reset": "npm run clean && npm run bootstrap && npm run app-start",
|
||||
"type-check": "lerna run type-check",
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/* eslint-disable filenames/match-exported */
|
||||
import { PlaywrightTestConfig } from '@playwright/test';
|
||||
const config: PlaywrightTestConfig = {
|
||||
projects: [
|
||||
{
|
||||
// Run all tests
|
||||
name: 'Default',
|
||||
testMatch: /.*.test.ts/,
|
||||
retries: 0,
|
||||
},
|
||||
{
|
||||
// High-confidence smoke/sanity checks
|
||||
name: 'Smoke',
|
||||
testMatch: /smoke\/.*.test.ts/,
|
||||
retries: 0,
|
||||
},
|
||||
],
|
||||
webServer: {
|
||||
command: 'npm run serve',
|
||||
url: 'http://127.0.0.1:4010',
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
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();
|
||||
});
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { loadFixture } from '../playwright/paths';
|
||||
import { test } from '../playwright/test';
|
||||
import { loadFixture } from '../../playwright/paths';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('can send requests', async ({ app, page }) => {
|
||||
test.slow(process.platform === 'darwin' || process.platform === 'win32', 'Slow app start on these platforms');
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { test } from '../playwright/test';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('Sign in with GitHub', async ({ app, page }) => {
|
||||
await page.locator('text=Setup Git Sync').click();
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { loadFixture } from '../playwright/paths';
|
||||
import { test } from '../playwright/test';
|
||||
import { loadFixture } from '../../playwright/paths';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('can render schema and send GraphQL requests', async ({ app, page }) => {
|
||||
test.slow(process.platform === 'darwin' || process.platform === 'win32', 'Slow app start on these platforms');
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { loadFixture } from '../playwright/paths';
|
||||
import { test } 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');
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { test } from '../playwright/test';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('Sign in with Gitlab', async ({ app, page }) => {
|
||||
await page.locator('text=Setup Git Sync').click();
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { loadFixture } from '../playwright/paths';
|
||||
import { test } from '../playwright/test';
|
||||
import { loadFixture } from '../../playwright/paths';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('can make oauth2 requests', async ({ app, page }) => {
|
||||
if (process.platform === 'darwin') {
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { test } from '../playwright/test';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('can render Spectral OpenAPI lint errors', async ({ page }) => {
|
||||
await page.click('text=Design');
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { loadFixture } from '../playwright/paths';
|
||||
import { test } from '../playwright/test';
|
||||
import { loadFixture } from '../../playwright/paths';
|
||||
import { test } from '../../playwright/test';
|
||||
|
||||
test('can make websocket connection', async ({ app, page }) => {
|
||||
test.slow(process.platform === 'darwin' || process.platform === 'win32', 'Slow app start on these platforms');
|
||||
Reference in new issue
Block a user