@vizzly-testing/cli 0.29.4 → 0.29.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/services/test-runner.js +13 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import { createBuild as createApiBuild, createApiClient, finalizeBuild as finali
|
|
|
13
13
|
import { VizzlyError } from '../errors/vizzly-error.js';
|
|
14
14
|
import { cancelTests, createBuild, finalizeBuild, initializeDaemon, runTests } from '../test-runner/index.js';
|
|
15
15
|
import * as output from '../utils/output.js';
|
|
16
|
+
import { writeSession as defaultWriteSession } from '../utils/session.js';
|
|
16
17
|
import { createBuildObject } from './build-manager.js';
|
|
17
18
|
export class TestRunner extends EventEmitter {
|
|
18
19
|
constructor(config, serverManager, options = {}) {
|
|
@@ -34,6 +35,7 @@ export class TestRunner extends EventEmitter {
|
|
|
34
35
|
getBuild,
|
|
35
36
|
finalizeApiBuild,
|
|
36
37
|
output,
|
|
38
|
+
writeSession: defaultWriteSession,
|
|
37
39
|
createError: (message, code) => new VizzlyError(message, code)
|
|
38
40
|
};
|
|
39
41
|
}
|
|
@@ -79,7 +81,7 @@ export class TestRunner extends EventEmitter {
|
|
|
79
81
|
return result;
|
|
80
82
|
}
|
|
81
83
|
async createBuild(options, tdd) {
|
|
82
|
-
|
|
84
|
+
let buildId = await createBuild({
|
|
83
85
|
runOptions: options,
|
|
84
86
|
tdd,
|
|
85
87
|
config: this.config,
|
|
@@ -90,6 +92,16 @@ export class TestRunner extends EventEmitter {
|
|
|
90
92
|
output: this.deps.output
|
|
91
93
|
}
|
|
92
94
|
});
|
|
95
|
+
if (!tdd && buildId) {
|
|
96
|
+
let writeSession = this.deps.writeSession || defaultWriteSession;
|
|
97
|
+
writeSession({
|
|
98
|
+
buildId,
|
|
99
|
+
branch: options?.branch,
|
|
100
|
+
commit: options?.commit,
|
|
101
|
+
parallelId: options?.parallelId
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return buildId;
|
|
93
105
|
}
|
|
94
106
|
async finalizeBuild(buildId, isTddMode, success, executionTime) {
|
|
95
107
|
await finalizeBuild({
|