@dionlarson/playwright-orchestrator-core 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/test-runner.js +22 -2
- package/package.json +1 -1
package/dist/test-runner.js
CHANGED
|
@@ -119,7 +119,6 @@ export class TestRunner {
|
|
|
119
119
|
buildParams(test, config, testHash) {
|
|
120
120
|
const args = [...config.args];
|
|
121
121
|
args.push('--workers', '1');
|
|
122
|
-
args.push('--reporter', 'list,blob,@dionlarson/playwright-orchestrator-core/test-result-reporter');
|
|
123
122
|
args.push('--project', `"${test.project}"`);
|
|
124
123
|
args.push('--output', `"${this.outputFolder}/${testHash}"`);
|
|
125
124
|
if (config.configFile) {
|
|
@@ -130,10 +129,31 @@ export class TestRunner {
|
|
|
130
129
|
async createTempConfig(file) {
|
|
131
130
|
if (!file)
|
|
132
131
|
return;
|
|
133
|
-
//
|
|
132
|
+
// Modify config: remove webServer, clear project dependencies, add our reporters
|
|
134
133
|
const content = `
|
|
135
134
|
import config from '${path.resolve(file)}';
|
|
135
|
+
|
|
136
|
+
// Remove webServer - not supported in orchestrator (server should already be running)
|
|
136
137
|
delete config.webServer;
|
|
138
|
+
|
|
139
|
+
// Clear project dependencies - setup projects should be run separately before orchestrator
|
|
140
|
+
// Each orchestrator test runs in a fresh playwright process, and we don't want
|
|
141
|
+
// setup projects re-running for every test
|
|
142
|
+
if (config.projects) {
|
|
143
|
+
for (const project of config.projects) {
|
|
144
|
+
project.dependencies = [];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Add our reporters while preserving existing reporters from config
|
|
149
|
+
const existingReporters = Array.isArray(config.reporter) ? config.reporter :
|
|
150
|
+
config.reporter ? [[config.reporter]] : [];
|
|
151
|
+
config.reporter = [
|
|
152
|
+
...existingReporters,
|
|
153
|
+
['blob'],
|
|
154
|
+
['@dionlarson/playwright-orchestrator-core/test-result-reporter'],
|
|
155
|
+
];
|
|
156
|
+
|
|
137
157
|
export default config;`;
|
|
138
158
|
const tempFile = `.playwright-${uuid.v7()}.config.tmp.ts`;
|
|
139
159
|
await writeFile(tempFile, content);
|