insomnia/packages/insomnia-smoke-test/playwright.config.ts
David Marby 5af79c7486
Create smoketests for oauth flows (#4511)
* Move basic auth routes to a separate file

* Stop slowing requests down artificially

* Add initial oauth routes

* Mount oidc routes under /oidc

* Enable all forms of oauth that Insomnia supports

* Add oauth request collection fixture

* Update playwright config

* Use 127.0.0.1 instead of localhost

* simple oauth2 test

* Make the playwright extension work

* Move oauth tests to a separate file

* Test all oauth flows

* Mark test as slow

* Wait for load state for new pages

* Use locators consistently

* Add playwright to recommended extensions

* Add instructions for how to use the playwright extension

* update selectors and use fill

* Fix markdown lint

Co-authored-by: jackkav <jackkav@gmail.com>
Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-02-28 16:28:02 +01:00

28 lines
764 B
TypeScript

/* eslint-disable filenames/match-exported */
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run serve',
url: 'http://127.0.0.1:4010/oidc/.well-known/openid-configuration',
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
},
use: {
trace: {
mode: 'retain-on-failure',
screenshots: true,
snapshots: true,
},
},
reporter: process.env.CI ? 'github' : 'list',
timeout: process.env.CI ? 60 * 1000 : 20 * 1000,
forbidOnly: !!process.env.CI,
outputDir: 'screenshots',
testDir: 'tests',
expect: {
timeout: process.env.CI ? 25 * 1000 : 10 * 1000,
},
workers: process.env.CI ? 1 : undefined,
};
export default config;