- aggiunge configurazione playwright.config.cjs per compatibilita runtime - aggiorna playwright.config.ts con progetto Mobile Chrome - migra i test E2E da .js a .spec.cjs - rimuove i vecchi file E2E non piu usati - allinea i test visual con snapshot baseline aggiornate
39 lines
773 B
JavaScript
39 lines
773 B
JavaScript
const { defineConfig, devices } = require('@playwright/test');
|
|
|
|
/**
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
*/
|
|
module.exports = defineConfig({
|
|
testDir: './tests/e2e',
|
|
fullyParallel: false,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: 1,
|
|
reporter: 'html',
|
|
use: {
|
|
trace: 'on-first-retry',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: { ...devices['Pixel 5'] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: 'npm run serve',
|
|
url: 'http://localhost:3000',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120 * 1000,
|
|
},
|
|
});
|