Files
notesnook/apps/web/playwright.config.js

53 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-06-09 23:50:04 +05:00
const IS_CI = !!process.env.CI;
module.exports = {
2021-09-13 11:08:28 +05:00
webServer: {
command: "npm run debug",
port: 3000,
timeout: 120 * 1000,
reuseExistingServer: false, //!IS_CI,
},
// Look for test files in thcleare "tests" directory, relative to this configuration file
2021-06-09 23:50:04 +05:00
testDir: "__e2e__",
// Each test is given 30 seconds
timeout: 30000,
2021-07-08 12:41:06 +05:00
workers: IS_CI ? 3 : 4,
2021-07-07 14:22:11 +05:00
reporter: "list",
2021-07-09 01:13:26 +05:00
retries: IS_CI ? 3 : 0,
2021-06-09 23:50:04 +05:00
use: {
headless: true,
2021-07-09 01:13:26 +05:00
acceptDownloads: true,
2021-06-09 23:50:04 +05:00
// Artifacts
2021-07-08 12:41:06 +05:00
trace: IS_CI ? "off" : "retain-on-failure",
screenshot: IS_CI ? "off" : "only-on-failure",
video: IS_CI ? "off" : "retry-with-video",
2021-07-25 09:32:42 +05:00
viewport: {
width: 1280,
height: 720,
},
screen: {
width: 1280,
height: 720,
},
2021-06-09 23:50:04 +05:00
},
projects: [
{
name: "Chromium",
use: {
browserName: "chromium",
},
},
{
name: "Firefox",
use: { browserName: "firefox" },
},
{
name: "WebKit",
use: { browserName: "webkit" },
},
],
};