@testomatio/reporter 1.2.1-beta.codecept-id → 1.2.1
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 +4 -4
- package/lib/pipe/testomatio.js +2 -2
- package/lib/utils/utils.js +2 -2
- package/package.json +1 -1
package/lib/adapter/codecept.js
CHANGED
|
@@ -142,7 +142,7 @@ function CodeceptReporter(config) {
|
|
|
142
142
|
if (id && failedTests.includes(id)) {
|
|
143
143
|
failedTests = failedTests.filter(failed => id !== failed);
|
|
144
144
|
}
|
|
145
|
-
const testId = parseTest(tags);
|
|
145
|
+
const testId = parseTest(`${title} ${tags.join(' ')}`);
|
|
146
146
|
const testObj = getTestAndMessage(title);
|
|
147
147
|
|
|
148
148
|
const logs = getTestLogs(test);
|
|
@@ -176,7 +176,7 @@ function CodeceptReporter(config) {
|
|
|
176
176
|
for (const test of suite.tests) {
|
|
177
177
|
const { id, tags, title } = test;
|
|
178
178
|
failedTests.push(id || title);
|
|
179
|
-
const testId = parseTest(tags);
|
|
179
|
+
const testId = parseTest(`${title} ${tags.join(' ')}`);
|
|
180
180
|
|
|
181
181
|
client.addTestRun(STATUS.FAILED, {
|
|
182
182
|
...stripExampleFromTitle(title),
|
|
@@ -194,7 +194,7 @@ function CodeceptReporter(config) {
|
|
|
194
194
|
if (test.err) error = test.err;
|
|
195
195
|
const { id, tags, title, artifacts } = test;
|
|
196
196
|
failedTests.push(id || title);
|
|
197
|
-
let testId = parseTest(tags);
|
|
197
|
+
let testId = parseTest(`${title} ${tags.join(' ')}`);
|
|
198
198
|
const testObj = getTestAndMessage(title);
|
|
199
199
|
|
|
200
200
|
const files = [];
|
|
@@ -240,7 +240,7 @@ function CodeceptReporter(config) {
|
|
|
240
240
|
const { id, tags, title } = test;
|
|
241
241
|
if (failedTests.includes(id || title)) return;
|
|
242
242
|
|
|
243
|
-
const testId = parseTest(tags);
|
|
243
|
+
const testId = parseTest(`${title} ${tags.join(' ')}`);
|
|
244
244
|
const testObj = getTestAndMessage(title);
|
|
245
245
|
client.addTestRun(STATUS.SKIPPED, {
|
|
246
246
|
...stripExampleFromTitle(title),
|
package/lib/pipe/testomatio.js
CHANGED
|
@@ -187,8 +187,8 @@ class TestomatioPipe {
|
|
|
187
187
|
} catch (err) {
|
|
188
188
|
console.error(
|
|
189
189
|
APP_PREFIX,
|
|
190
|
-
'Error creating Testomat.io report, please check if your API key is valid. Skipping report',
|
|
191
|
-
err,
|
|
190
|
+
'Error creating Testomat.io report, please check if your API key is valid. Skipping report | ',
|
|
191
|
+
err?.response?.statusText || err?.status || err.message,
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
194
|
debug('"createRun" function finished');
|
package/lib/utils/utils.js
CHANGED
|
@@ -13,7 +13,7 @@ const debug = require('debug')('@testomatio/reporter:util');
|
|
|
13
13
|
const parseTest = testTitle => {
|
|
14
14
|
if (!testTitle) return null;
|
|
15
15
|
|
|
16
|
-
const captures = testTitle.match(
|
|
16
|
+
const captures = testTitle.match(/@T[\w\d]{8}/);
|
|
17
17
|
|
|
18
18
|
if (captures) {
|
|
19
19
|
return captures[1];
|
|
@@ -28,7 +28,7 @@ const parseTest = testTitle => {
|
|
|
28
28
|
* @returns {String|null} suiteId
|
|
29
29
|
*/
|
|
30
30
|
const parseSuite = suiteTitle => {
|
|
31
|
-
const captures = suiteTitle.match(
|
|
31
|
+
const captures = suiteTitle.match(/@S[\w\d]{8}/);
|
|
32
32
|
if (captures) {
|
|
33
33
|
return captures[1];
|
|
34
34
|
}
|