File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,26 @@ if (!suiteName) {
82
82
83
83
// Run specific suite
84
84
clearWebpackCache ( )
85
- const suitePath : string | undefined = path
86
- . resolve ( dirname , inputSuitePath , 'e2e.spec.ts' )
85
+ const suiteFolderPath : string | undefined = path
86
+ . resolve ( dirname , inputSuitePath )
87
87
. replaceAll ( '__' , '/' )
88
88
89
+ const allSuitesInFolder = await globby ( `${ suiteFolderPath . replace ( / \\ / g, '/' ) } /**/*e2e.spec.ts` )
90
+
89
91
const baseTestFolder = inputSuitePath . split ( '__' ) [ 0 ]
90
92
91
- if ( ! suitePath || ! baseTestFolder ) {
93
+ if ( ! baseTestFolder || ! allSuitesInFolder ?. length ) {
92
94
throw new Error ( `No test suite found for ${ suiteName } ` )
93
95
}
94
96
95
- executePlaywright ( suitePath , baseTestFolder , false , suiteConfigPath )
97
+ console . log ( `\n\nExecuting all ${ allSuitesInFolder . length } E2E tests...\n\n` )
98
+
99
+ console . log ( `${ allSuitesInFolder . join ( '\n' ) } \n` )
100
+
101
+ for ( const file of allSuitesInFolder ) {
102
+ clearWebpackCache ( )
103
+ executePlaywright ( file , baseTestFolder , false , suiteConfigPath )
104
+ }
96
105
}
97
106
98
107
console . log ( '\nRESULTS:' )
You can’t perform that action at this time.
0 commit comments