diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c10f16ec16..8fe8032c37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -244,7 +244,7 @@ jobs: if: '!cancelled()' uses: trunk-io/analytics-uploader@main with: - junit-paths: test-apps/e2e/test-results/**/junit.xml + junit-paths: test-apps/junit-reports/*.xml org-slug: strapi token: ${{ secrets.TRUNK_API_TOKEN }} continue-on-error: true @@ -296,7 +296,7 @@ jobs: if: '!cancelled()' uses: trunk-io/analytics-uploader@main with: - junit-paths: test-apps/e2e/test-results/**/junit.xml + junit-paths: test-apps/junit-reports/*.xml org-slug: strapi token: ${{ secrets.TRUNK_API_TOKEN }} continue-on-error: true diff --git a/playwright.base.config.js b/playwright.base.config.js index d0b8f0b6c3..5cabbfddba 100644 --- a/playwright.base.config.js +++ b/playwright.base.config.js @@ -28,14 +28,14 @@ const getEnvBool = (envVar, defaultValue) => { /** * @typedef ConfigOptions - * @type {{ port: number; testDir: string; appDir: string }} + * @type {{ port: number; testDir: string; appDir: string; reportFileName: string }} */ /** * @see https://playwright.dev/docs/test-configuration * @type {(options: ConfigOptions) => import('@playwright/test').PlaywrightTestConfig} */ -const createConfig = ({ port, testDir, appDir }) => ({ +const createConfig = ({ port, testDir, appDir, reportFileName }) => ({ testDir, /* default timeout for a jest test */ @@ -64,8 +64,8 @@ const createConfig = ({ port, testDir, appDir }) => ({ 'junit', { outputFile: path.join( - getEnvString(process.env.PLAYWRIGHT_OUTPUT_DIR, '../test-results/'), - 'junit.xml' + getEnvString(process.env.PLAYWRIGHT_OUTPUT_DIR, '../../junit-reports/'), + reportFileName ), }, ], diff --git a/tests/scripts/run-e2e-tests.js b/tests/scripts/run-e2e-tests.js index 181dddf18d..590b7e4b4e 100644 --- a/tests/scripts/run-e2e-tests.js +++ b/tests/scripts/run-e2e-tests.js @@ -212,6 +212,7 @@ yargs testDir: path.join(testDomainRoot, domain), port, appDir: testAppPath, + reportFileName: `playwright-${domain}-${port}.xml`, }); const configFileTemplate = `