2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-11 09:48:50 +00:00
InvenTree/src/frontend/playwright.config.ts
Oliver ce617b7792
[Documentation] Remove package credits (#8811)
* Remove hard-coded credits from docs

- Extract *actual* package credits
- Auto-build into docs

* Include URLs when generating python license data

* Update readthedocs process

* Better URL extraction

* Adjust build process for RTD

* Spelling fixes

* Install node and yarn

* Command fix

* Improved library sorting

* Improved error message

* Remove credits.md

* Cleanup

* Further cleanup

* Tweak playwright test

* Handle uncaught exception in fetchIcons

* Fix for CORS settings in playwright testing

* Enhance login check

* Fix for barcode test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-01-06 14:14:38 +11:00

60 lines
1.4 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: true,
timeout: 90000,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 3 : 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 dev.server -a 127.0.0.1:8000',
env: {
INVENTREE_DEBUG: 'True',
INVENTREE_PLUGINS_ENABLED: 'True',
INVENTREE_ADMIN_URL: 'test-admin',
INVENTREE_SITE_URL: 'http://localhost:8000',
INVENTREE_CORS_ORIGIN_ALLOW_ALL: 'True',
INVENTREE_COOKIE_SAMESITE: 'Lax'
},
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'
}
});