Skip to content

Commit be9380d

Browse files
committed
fix(e2e): update reporter configuration in Playwright tests
- Replace single reporter with array format to support additional options. - Add `testMetadataArtifacts` and `logConfig` parameters to TeamCity reporter for enhanced test metadata handling.
1 parent 20121c7 commit be9380d

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ generated
4848

4949
/reports*
5050
/data/page_views_map.json
51-
test-results
51+
/test-results
52+
/playwright-report
5253

5354
public/data
5455
test/storage-state.json

.teamcity/common/E2ERunner.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package common
22

3-
import jetbrains.buildServer.configs.kotlin.BuildStep
43
import jetbrains.buildServer.configs.kotlin.BuildType
5-
import jetbrains.buildServer.configs.kotlin.buildSteps.ScriptBuildStep
64

75
open class E2ERunner(init: BuildType.() -> Unit) : BuildType({
86
artifactRules = """
9-
+:test-results/* => test-results.zip
7+
+:playwright-report/** => playwright-report.zip
108
""".trimIndent()
119

1210
params {

playwright.config.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
import { defineConfig, devices } from '@playwright/test';
1+
import { defineConfig, devices, ReporterDescription } from '@playwright/test';
22

33
const MAX_DIFF_PIXEL_RATIO = 0.025 as const;
44

55
const isDevelopment = !process.env.CI;
66

7-
const reporter = isDevelopment ? 'list' : 'playwright-teamcity-reporter';
7+
const reporter: ReporterDescription[] = isDevelopment ? [['list']] : [
8+
['html', { open: 'never' }],
9+
['playwright-teamcity-reporter', {
10+
'testMetadataArtifacts': 'test-results',
11+
logConfig: false
12+
}]
13+
];
14+
815
const retries = isDevelopment ? 0 : 2;
916
const timeout = isDevelopment ? 10000 : 5000;
1017

0 commit comments

Comments
 (0)