mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 13:22:39 +03:00
02edc5ad4f
no refs - Offers browser tests were subject to a race condition. I'm guessing this dates back to when we moved to Settings X (and React), as it seems the url for the offer is not present on the first render of the page - despite being returned in the `POST` request of the offer creation, the component does a `GET` on render to get the link. This is now awaited. - The Publishing timezone test also seemed to suffer from a race condition. This is less sure of a fix as it's a much less frequent failure. The date time picker input is now validated in the test before continuing. - Offers browser tests often timed out so the timeout has been moved to 90s for these tests. - All tests were bumped to 75s timeout as we generally would occasionally hit the timeout.
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
|
timeout: 75 * 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: {
|
|
// trace: 'retain-on-failure',
|
|
// 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;
|