-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.js
39 lines (36 loc) · 944 Bytes
/
playwright.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const { defineConfig } = require("@playwright/test");
module.exports = defineConfig({
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? 1 : undefined,
webServer: {
command: "npx serverest --nodoc",
port: 3000,
timeout: 60 * 1000,
reuseExistingServer: !process.env.CI,
cwd: ".",
},
reporter: [ ['allure-playwright'], ['list'], ['html', { open: 'never', outputFolder: 'playwright-report' }]],
projects: [
{
name: 'api',
testMatch: '**/*.api.test.js',
use: {
baseURL: 'http://localhost:3000'
}
},
{
name: "e2e",
outputDir: "test-results",
testMatch: '**/*.e2e.test.js',
use: {
baseURL: "https://front.serverest.dev",
browsers: ["chromium"],
screenshot: "only-on-failure",
trace: "retain-on-failure",
headless: true
},
},
],
});