diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a1dd16d49..24aad5125 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -103,6 +103,7 @@ jobs: path: | packages/tests/playwright-report packages/tests/test-results + packages/tests/src/_playwright/projects/dist retention-days: 3 lint: diff --git a/packages/tests/src/_playwright/globalSetup.ts b/packages/tests/src/_playwright/globalSetup.ts index 39f40975e..7c643c01d 100644 --- a/packages/tests/src/_playwright/globalSetup.ts +++ b/packages/tests/src/_playwright/globalSetup.ts @@ -7,7 +7,7 @@ import { rm } from '@dd/core/helpers'; import type { BundlerFullName, Options } from '@dd/core/types'; import { allBundlers } from '@dd/tools/bundlers'; import { ROOT } from '@dd/tools/constants'; -import { blue, buildPlugins, dim, green, red, yellow } from '@dd/tools/helpers'; +import { blue, buildPlugins, debugFilesPlugins, dim, green, red, yellow } from '@dd/tools/helpers'; import { allPlugins } from '@dd/tools/plugins'; import type { FullConfig } from '@playwright/test'; import path from 'path'; @@ -78,7 +78,7 @@ const globalSetup = async (config: FullConfig) => { const buildProjectPfx = getSubPfx('Build Project'); console.time(buildProjectPfx); // Clean the dist folders. - // await rm(path.resolve(ROOT, 'packages/tests/src/_playwright/projects/dist')); + await rm(path.resolve(ROOT, 'packages/tests/src/_playwright/projects/dist')); console.log( `${buildProjectPfx}Building the project with ${green(requestedBundlers.join(', '))}.`, ); @@ -94,6 +94,7 @@ const globalSetup = async (config: FullConfig) => { clientToken: '123', }, }, + customPlugins: (opts, context) => debugFilesPlugins(context), }; const cwd = path.resolve(__dirname, './projects');