38 lines
956 B
JavaScript
38 lines
956 B
JavaScript
|
|
const path = require('path');
|
||
|
|
const { defineConfig } = require('@playwright/test');
|
||
|
|
|
||
|
|
const authFile = path.join(__dirname, 'tests/live-site/.auth/user.json');
|
||
|
|
|
||
|
|
module.exports = defineConfig({
|
||
|
|
testDir: './tests/live-site',
|
||
|
|
timeout: 2 * 60 * 1000,
|
||
|
|
expect: {
|
||
|
|
timeout: 20 * 1000
|
||
|
|
},
|
||
|
|
fullyParallel: false,
|
||
|
|
workers: 1,
|
||
|
|
reporter: [['list'], ['html', { open: 'never', outputFolder: 'playwright-report/live-site' }]],
|
||
|
|
outputDir: 'test-results/live-site',
|
||
|
|
use: {
|
||
|
|
baseURL: process.env.LIVE_SITE_BASE_URL || 'https://www.regalamiunsorriso.it',
|
||
|
|
browserName: 'chromium',
|
||
|
|
headless: true,
|
||
|
|
trace: 'retain-on-failure',
|
||
|
|
screenshot: 'only-on-failure',
|
||
|
|
video: 'retain-on-failure'
|
||
|
|
},
|
||
|
|
projects: [
|
||
|
|
{
|
||
|
|
name: 'setup',
|
||
|
|
testMatch: /.*\.setup\.js/
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'live-chromium',
|
||
|
|
dependencies: ['setup'],
|
||
|
|
testIgnore: /.*\.setup\.js/,
|
||
|
|
use: {
|
||
|
|
storageState: authFile
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
});
|