2022-09-28 10:13:33 -05:00
|
|
|
// NOTE: Sometimes, tests fail with `TypeError: process.stdout.clearLine is not a function`
|
|
|
|
// for some reason. This comes from Vite, and is conditionally called based on `isTTY`.
|
|
|
|
// We set it to false here to skip this odd behavior.
|
|
|
|
process.stdout.isTTY = false;
|
2022-05-23 11:56:45 -05:00
|
|
|
|
|
|
|
const config = {
|
|
|
|
testMatch: 'e2e/*.test.js',
|
|
|
|
/* Maximum time one test can run for. */
|
2022-10-06 15:32:37 -05:00
|
|
|
timeout: 40 * 1000,
|
2022-05-23 11:57:55 -05:00
|
|
|
expect: {
|
|
|
|
/**
|
|
|
|
* Maximum time expect() should wait for the condition to be met.
|
|
|
|
* For example in `await expect(locator).toHaveText();`
|
|
|
|
*/
|
2022-10-06 15:32:37 -05:00
|
|
|
timeout: 4 * 1000,
|
2022-05-23 11:57:55 -05:00
|
|
|
},
|
|
|
|
/* Fail the build on CI if you accidentally left test in the source code. */
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
/* Retry on CI only */
|
2022-07-19 16:47:31 -05:00
|
|
|
retries: process.env.CI ? 3 : 0,
|
2022-05-23 11:57:55 -05:00
|
|
|
/* Opt out of parallel tests on CI. */
|
2022-06-06 13:39:48 -05:00
|
|
|
workers: 1,
|
2022-05-23 11:57:55 -05:00
|
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
|
|
use: {
|
|
|
|
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
|
|
|
actionTimeout: 0,
|
|
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
|
|
trace: 'on-first-retry',
|
|
|
|
},
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'Chrome Stable',
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
channel: 'chrome',
|
2022-07-19 16:49:29 -05:00
|
|
|
args: ['--use-gl=egl'],
|
2022-05-23 11:57:55 -05:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2022-05-23 11:56:45 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|