Skip to content

Commit ad09f0b

Browse files
committed
Updated for 3.4.0
1 parent f1f12db commit ad09f0b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lib/api/new-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = async (req, res) => {
1717

1818
const code = eval(req.body.code);
1919
const test = scenario.test(new Test('new test', code));
20-
test.id = 'new-test';
20+
test.uid = 'new-test';
2121

2222
const suite = Suite.create(mocha.suite, 'new test');
2323

lib/api/run-scenario.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = async (req, res) => {
1212

1313
if (id) {
1414
mocha.suite.eachTest(test => {
15-
if (test.id === decodeURIComponent(id)) {
15+
if (test.uid === decodeURIComponent(id)) {
1616
test.parent.appendOnlyTest(test);
1717
}
1818
});

lib/codeceptjs/realtime-reporter.helper.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {
1717
const mapSuiteAndTest = (startedAt, suite, test) => {
1818
return {
1919
startedAt,
20-
id: test && test.id || suite && suite.id,
20+
id: test && test.uid || suite && suite.id,
2121
suite: suite && suite.title,
2222
title: test && test.title,
2323
file: test && test.file,
@@ -81,7 +81,7 @@ class RealtimeReporterHelper extends Helper {
8181
stepId: this.test.steps.length,
8282
step: this.step,
8383
testStartedAt: this.testStartedAt,
84-
testId: this.test.id,
84+
testId: this.test.uid,
8585
duration: (Date.now() - this.testStartedAt) / 1000,
8686
error: toError(err),
8787
// snapshot,
@@ -102,7 +102,7 @@ class RealtimeReporterHelper extends Helper {
102102
recorder.add('send test failed event', () => {
103103
wsEvents.rtr.testFailed({
104104
testStartedAt,
105-
testId: test.id,
105+
testId: test.uid,
106106
duration: (Date.now() - testStartedAt) / 1000,
107107
error: toError(err),
108108
});
@@ -238,7 +238,7 @@ class RealtimeReporterHelper extends Helper {
238238

239239
return {
240240
id: step.id,
241-
testId: this.test && this.test.id || this.suite && this.suite.id,
241+
testId: this.test && this.test.uid || this.suite && this.suite.id,
242242
at: Date.now() - testStartedAt,
243243
startedAt: step.startTime,
244244
duration: Date.now() - step.startTime,
@@ -325,11 +325,11 @@ class RealtimeReporterHelper extends Helper {
325325

326326
wsEvents.rtr.testPassed({
327327
testStartedAt: this.testStartedAt,
328-
testId: this.test.id,
328+
testId: this.test.uid,
329329
duration: (Date.now() - this.testStartedAt) / 1000,
330330
});
331331

332-
scenarioStatusRepository.setStatus(this.test.id, {
332+
scenarioStatusRepository.setStatus(this.test.uid, {
333333
status: 'passed',
334334
startedAt: this.test.testStartedAt,
335335
duration: this.test.duration,

lib/model/scenario-repository.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const getFeatures = (searchQuery, opts = {}) => {
134134
}
135135

136136
feature.scenarios.push({
137-
id: test.id,
137+
uid: test.uid,
138138
pending: test.pending,
139139
file: test.file,
140140
title: stripTags(test.title),

0 commit comments

Comments
 (0)