@testomatio/reporter 1.0.7 → 1.0.8
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/lib/adapter/codecept.js +8 -6
- package/package.json +1 -1
package/lib/adapter/codecept.js
CHANGED
|
@@ -73,6 +73,8 @@ function CodeceptReporter(config) {
|
|
|
73
73
|
stepShift = 0;
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
+
if (!global.testomatioDataStore) global.testomatioDataStore = {};
|
|
77
|
+
// reset steps
|
|
76
78
|
global.testomatioDataStore.steps = [];
|
|
77
79
|
});
|
|
78
80
|
|
|
@@ -162,7 +164,7 @@ function CodeceptReporter(config) {
|
|
|
162
164
|
message: testObj.message,
|
|
163
165
|
time: getDuration(test),
|
|
164
166
|
files,
|
|
165
|
-
steps: global.testomatioDataStore
|
|
167
|
+
steps: global.testomatioDataStore?.steps?.join('\n') || null,
|
|
166
168
|
})
|
|
167
169
|
.then(pipes => {
|
|
168
170
|
testId = pipes.filter(p => p.pipe.includes('Testomatio'))[0]?.result?.data?.test_id;
|
|
@@ -219,12 +221,12 @@ function CodeceptReporter(config) {
|
|
|
219
221
|
if (!metaSteps[i]) continue;
|
|
220
222
|
if (metaSteps[i].isBDD()) {
|
|
221
223
|
// output.push(repeat(stepShift) + chalk.bold(metaSteps[i].toString()) + metaSteps[i].comment);
|
|
222
|
-
global.testomatioDataStore
|
|
224
|
+
global.testomatioDataStore?.steps?.push(
|
|
223
225
|
repeat(stepShift) + chalk.bold(metaSteps[i].toString()) + metaSteps[i].comment,
|
|
224
226
|
);
|
|
225
227
|
} else {
|
|
226
228
|
// output.push(repeat(stepShift) + chalk.green.bold(metaSteps[i].toString()));
|
|
227
|
-
global.testomatioDataStore
|
|
229
|
+
global.testomatioDataStore?.steps?.push(repeat(stepShift) + chalk.green.bold(metaSteps[i].toString()));
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
232
|
}
|
|
@@ -239,16 +241,16 @@ function CodeceptReporter(config) {
|
|
|
239
241
|
|
|
240
242
|
if (step.status === STATUS.FAILED) {
|
|
241
243
|
// output.push(repeat(stepShift) + chalk.red(step.toString()) + duration);
|
|
242
|
-
global.testomatioDataStore
|
|
244
|
+
global.testomatioDataStore?.steps?.push(repeat(stepShift) + chalk.red(step.toString()) + duration);
|
|
243
245
|
} else {
|
|
244
246
|
// output.push(repeat(stepShift) + step.toString() + duration);
|
|
245
|
-
global.testomatioDataStore
|
|
247
|
+
global.testomatioDataStore?.steps?.push(repeat(stepShift) + step.toString() + duration);
|
|
246
248
|
}
|
|
247
249
|
});
|
|
248
250
|
|
|
249
251
|
event.dispatcher.on(event.step.comment, step => {
|
|
250
252
|
// output.push(chalk.cyan.bold(step.toString()));
|
|
251
|
-
global.testomatioDataStore
|
|
253
|
+
global.testomatioDataStore?.steps?.push(chalk.cyan.bold(step.toString()));
|
|
252
254
|
});
|
|
253
255
|
}
|
|
254
256
|
|