Skip to content

Commit

Permalink
test(tools): 21 fix missing html reports in CI
Browse files Browse the repository at this point in the history
With 2c4ec72 the html report was not uploaded anymore.
  • Loading branch information
MrGreenTea committed Feb 10, 2024
1 parent d8711d5 commit 76d9920
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import type { PlaywrightTestConfig, ReporterDescription } from '@playwright/test';
import { devices } from '@playwright/test';

const webServer = process.env.PLAYWRIGHT_TEST_BASE_URL
? undefined
: {
command: 'pnpm run build && pnpm run preview',
port: 4321,
};
command: 'pnpm run build && pnpm run preview',
port: 4321,
};

const reporter: ReporterDescription[] = process.env.CI
? [
['github', { outputMode: 'summary' }],
['html', { outputFolder: 'playwright-report', open: 'never' }],
['junit', { outputFile: 'playwright-results.xml' }],
]
: [['list']];

const config: PlaywrightTestConfig = {
retries: 3,
Expand Down Expand Up @@ -38,7 +46,7 @@ const config: PlaywrightTestConfig = {
],
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
reporter: [[process.env.CI ? 'github' : 'list'], ['html']],
reporter,
};

export default config;

0 comments on commit 76d9920

Please sign in to comment.