Ghost/ghost/core/playwright.config.js
Sam Lord 60b924f173 Use headless mode by default for Playwright tests
no issue

The setting `headless: false` is superceded by using `PWDEBUG=1` as an
environment variable during debug sessions / while working on tests.
2022-11-28 10:52:38 +00:00

26 lines
648 B
JavaScript

/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
timeout: 60 * 1000,
workers: 1,
use: {
// Use a single browser since we can't simultaneously test multiple browsers
browserName: 'chromium',
baseURL: process.env.TEST_URL ?? 'http://localhost:2368'
}
};
if (!process.env.TEST_URL) {
config.webServer = {
command: 'yarn start',
env: {
// TODO: Use `testing` when starting a server
NODE_ENV: 'development'
},
reuseExistingServer: !process.env.CI,
url: 'http://localhost:2368'
};
}
module.exports = config;