chore(e2e): limit traces to CI environments

This commit is contained in:
Gustav Hansen 2023-09-28 11:47:43 +02:00
parent 4b145c82d5
commit 67ef868b91

View File

@ -36,8 +36,11 @@ const createConfig = ({ port, testDir, appDir }) => ({
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Collect trace when a test failed. See https://playwright.dev/docs/trace-viewer */
trace: 'retain-on-failure',
/* Collect trace when a test failed on the CI. See https://playwright.dev/docs/trace-viewer
Until https://github.com/strapi/strapi/issues/18196 is fixed we can't enable this locally,
because the Strapi server restarts every time a new file (trace) is created.
*/
trace: process.env.CI ? 'retain-on-failure' : 'off',
},
/* Configure projects for major browsers */