mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
13b732f905
fixes https://github.com/TryGhost/Product/issues/3723 This also fixes usage of localhost instead of 127.0.0.1 as a test URL for playwright. This caused issues for cookies because the member impersonation navigated to 127.0.0.1 instead of localhost, meaning that the next page.goto call would go to localhost and lose the cookies.
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
|
timeout: 60 * 1000,
|
|
expect: {
|
|
timeout: 10000
|
|
},
|
|
workers: 1,
|
|
reporter: [['list', {printSteps: true}]],
|
|
use: {
|
|
// Use a single browser since we can't simultaneously test multiple browsers
|
|
browserName: 'chromium',
|
|
headless: !process.env.PLAYWRIGHT_DEBUG,
|
|
baseURL: process.env.TEST_URL ?? 'http://127.0.0.1:2369',
|
|
// TODO: Where to put this
|
|
storageState: 'playwright-state.json'
|
|
},
|
|
// 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'
|
|
}
|
|
],
|
|
globalSetup: './test/e2e-browser/utils/global-setup',
|
|
globalTeardown: './test/e2e-browser/utils/global-teardown'
|
|
};
|
|
|
|
module.exports = config;
|