qase-javascript-commons 2.0.1 → 2.0.3
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/changelog.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# qase-javascript-commons@2.0.3
|
|
2
|
+
|
|
3
|
+
## What's new
|
|
4
|
+
|
|
5
|
+
Fixed an issue when the reporter would run tests before creating a test run.
|
|
6
|
+
Now the reporter will create a test run before running tests.
|
|
7
|
+
|
|
8
|
+
# qase-javascript-commons@2.0.2
|
|
9
|
+
|
|
10
|
+
## What's new
|
|
11
|
+
|
|
12
|
+
Add new step status `skipped` to the test result data.
|
|
13
|
+
Before this fix, the reporter didn't support the `skipped` status for test steps.
|
|
14
|
+
|
|
15
|
+
For ApiV1 the `skipped` status will be converted to `blocked` status.
|
|
16
|
+
For ApiV2 the `skipped` status will be converted to `skipped` status.
|
|
17
|
+
|
|
1
18
|
# qase-javascript-commons@2.0.1
|
|
2
19
|
|
|
3
20
|
## What's new
|
|
@@ -339,6 +339,7 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
339
339
|
description,
|
|
340
340
|
is_autotest: true,
|
|
341
341
|
cases: [],
|
|
342
|
+
start_time: this.getDate(),
|
|
342
343
|
};
|
|
343
344
|
if (environment !== undefined) {
|
|
344
345
|
runObject.environment_id = environment;
|
|
@@ -350,6 +351,21 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
350
351
|
throw new qase_error_1.QaseError('Cannot create run', { cause: error });
|
|
351
352
|
}
|
|
352
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* @returns {string}
|
|
356
|
+
* @private
|
|
357
|
+
*/
|
|
358
|
+
getDate() {
|
|
359
|
+
const date = new Date();
|
|
360
|
+
date.setSeconds(-10);
|
|
361
|
+
const year = date.getUTCFullYear();
|
|
362
|
+
const month = ('0' + (date.getUTCMonth() + 1).toString()).slice(-2); // Months are zero indexed, so we add 1
|
|
363
|
+
const day = ('0' + date.getUTCDate().toString()).slice(-2);
|
|
364
|
+
const hours = date.getUTCHours().toString();
|
|
365
|
+
const minutes = date.getUTCMinutes().toString();
|
|
366
|
+
const seconds = date.getUTCSeconds().toString();
|
|
367
|
+
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
368
|
+
}
|
|
353
369
|
/**
|
|
354
370
|
* @returns {Promise<void>}
|
|
355
371
|
* @private
|
|
@@ -404,6 +420,7 @@ TestOpsReporter.stepStatusMap = {
|
|
|
404
420
|
[models_1.StepStatusEnum.passed]: qaseio_1.ResultStepStatus.PASSED,
|
|
405
421
|
[models_1.StepStatusEnum.failed]: qaseio_1.ResultStepStatus.FAILED,
|
|
406
422
|
[models_1.StepStatusEnum.blocked]: qaseio_1.ResultStepStatus.BLOCKED,
|
|
423
|
+
[models_1.StepStatusEnum.skipped]: qaseio_1.ResultStepStatus.SKIPPED,
|
|
407
424
|
};
|
|
408
425
|
/**
|
|
409
426
|
* @type {Record<StepStatusEnum, ResultStepStatus>}
|
|
@@ -412,4 +429,5 @@ TestOpsReporter.stepStatusMapV1 = {
|
|
|
412
429
|
[models_1.StepStatusEnum.passed]: qaseio_1.TestStepResultCreateStatusEnum.PASSED,
|
|
413
430
|
[models_1.StepStatusEnum.failed]: qaseio_1.TestStepResultCreateStatusEnum.FAILED,
|
|
414
431
|
[models_1.StepStatusEnum.blocked]: qaseio_1.TestStepResultCreateStatusEnum.BLOCKED,
|
|
432
|
+
[models_1.StepStatusEnum.skipped]: qaseio_1.TestStepResultCreateStatusEnum.BLOCKED,
|
|
415
433
|
};
|