2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-16 17:56:30 +00:00
Files
InvenTree/src/frontend/playwright.config.ts
Matthias Mair 0d59f6e8a9 [CI] Re-add playwright reporting (#6992)
* re-add playwright reporting
now a bit more ressource optimised

* only upload if the tests faild
2024-04-11 01:00:30 +10:00

51 lines
1.1 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI ? [['html', { open: 'never' }], ['github']] : 'list',
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome']
}
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox']
}
}
],
/* Run your local dev server before starting the tests */
webServer: [
{
command: 'yarn run dev',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
timeout: 120 * 1000
},
{
command: 'invoke server -a 127.0.0.1:8000',
url: 'http://127.0.0.1:8000/api/',
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
timeout: 120 * 1000
}
],
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry'
}
});