mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
4815aa6e7f
refs: https://github.com/TryGhost/DevOps/issues/78 Re-introduce parallel browser tests These were adding in a previous PR, but the difference between local running tests and using CI introduced failures. Added additional fixes to ensure the Stripe API key is used in the CLI when running in CI.
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
|
timeout: 60 * 1000,
|
|
expect: {
|
|
timeout: 10000
|
|
},
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? '100%' : (process.env.PLAYWRIGHT_SLOWMO ? 1 : undefined),
|
|
reporter: process.env.CI ? [['list', {printSteps: true}], ['html']] : [['list', {printSteps: true}]],
|
|
use: {
|
|
// Use a single browser since we can't simultaneously test multiple browsers
|
|
browserName: 'chromium',
|
|
headless: !process.env.PLAYWRIGHT_DEBUG,
|
|
// Port doesn't matter, overriden by baseURL fixture for each worker
|
|
baseURL: 'http://127.0.0.1:2368'
|
|
},
|
|
// separated tests to projects for better logging to console
|
|
// portal tests are much more stable when running in the separate DB from admin tests
|
|
projects: [
|
|
{
|
|
name: 'admin',
|
|
testDir: 'test/e2e-browser/admin'
|
|
},
|
|
{
|
|
name: 'portal',
|
|
testDir: 'test/e2e-browser/portal',
|
|
fullyParallel: true
|
|
}
|
|
]
|
|
};
|
|
|
|
module.exports = config;
|