File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
- import { defineConfig } from '@playwright/test'
1
+ import { defineConfig , type PlaywrightTestConfig } from '@playwright/test'
2
2
import { createPlaywrightConfig } from '@sanity/test'
3
3
4
4
import { loadEnvFiles } from './scripts/utils/loadEnvFiles'
@@ -8,12 +8,24 @@ loadEnvFiles()
8
8
9
9
const CI = readBoolEnv ( 'CI' , false )
10
10
11
+ /**
12
+ * Excludes the GitHub reporter until https://github.com/microsoft/playwright/issues/19817 is resolved, since it creates a lot of noise in our PRs.
13
+ * @param reporters - The reporters config to exclude the github reporter from
14
+ */
15
+ function excludeGithub ( reporters : PlaywrightTestConfig [ 'reporter' ] ) {
16
+ if ( Array . isArray ( reporters ) ) {
17
+ return reporters . filter ( ( reporterDescription ) => reporterDescription [ 0 ] !== 'github' )
18
+ }
19
+ return reporters === 'github' ? undefined : reporters
20
+ }
21
+
11
22
const playwrightConfig = createPlaywrightConfig ( {
12
23
projectId : readEnv ( 'SANITY_E2E_PROJECT_ID' ) ,
13
24
token : readEnv ( 'SANITY_E2E_SESSION_TOKEN' ) ,
14
25
playwrightOptions ( config ) {
15
26
return {
16
27
...config ,
28
+ reporter : excludeGithub ( config . reporter ) ,
17
29
use : {
18
30
...config . use ,
19
31
baseURL : 'http://localhost:3339' ,
You can’t perform that action at this time.
0 commit comments