testit-js-commons 3.7.1 → 3.7.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.
@@ -52,12 +52,20 @@ class BaseConverter {
52
52
  description: step.description,
53
53
  parameters: step.parameters,
54
54
  attachments: step.attachments,
55
- outcome: step.outcome ? this.toOriginOutcome(step.outcome) : undefined,
55
+ outcome: step.outcome ? step.outcome : undefined,
56
56
  stepResults: (_a = step.steps) === null || _a === void 0 ? void 0 : _a.map((step) => this.toOriginStep(step)),
57
57
  };
58
58
  if (step.duration !== undefined) {
59
59
  model.duration = step.duration;
60
60
  }
61
+ if (step.startedOn !== undefined) {
62
+ // @ts-ignore
63
+ model.startedOn = step.startedOn;
64
+ }
65
+ if (step.completedOn !== undefined) {
66
+ // @ts-ignore
67
+ model.completedOn = step.completedOn;
68
+ }
61
69
  return model;
62
70
  }
63
71
  }
@@ -22,7 +22,9 @@ class TestResultsConverter extends common_1.BaseConverter {
22
22
  startedOn: undefined,
23
23
  completedOn: undefined,
24
24
  duration: undefined,
25
- resultReasons: undefined
25
+ resultReasons: undefined,
26
+ autoTestTags: undefined,
27
+ excludeAutoTestTags: undefined
26
28
  };
27
29
  return model;
28
30
  }
@@ -1,4 +1,4 @@
1
1
  export declare class TestRunErrorHandler {
2
- static handleErrorStartTestRun(err: any): void;
3
- static handleErrorCompletedTestRun(err: any): void;
2
+ static handleErrorStartTestRun(err: any, message?: string): void;
3
+ static handleErrorCompletedTestRun(err: any, message?: string): void;
4
4
  }
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TestRunErrorHandler = void 0;
4
4
  class TestRunErrorHandler {
5
- static handleErrorStartTestRun(err) {
6
- console.error(`Error ${err.statusCode}. Failed start test run in system.`, `Message: ${err.message}`);
5
+ static handleErrorStartTestRun(err, message = "") {
6
+ console.error(`HttpError ${err.statusCode}. Failed start test run in system. Message: ${message}. Error body:\n`, err.body);
7
7
  }
8
- static handleErrorCompletedTestRun(err) {
9
- console.error(`Error ${err.statusCode}. Failed completed test run in system.`, `Message: ${err.message}`);
8
+ static handleErrorCompletedTestRun(err, message = "") {
9
+ console.error(`HttpError ${err.statusCode}. Failed completed test run in system. Message: ${message}. Error body:\n`, err.body);
10
10
  }
11
11
  }
12
12
  exports.TestRunErrorHandler = TestRunErrorHandler;
@@ -116,7 +116,7 @@ class TestRunsService extends common_1.BaseService {
116
116
  return __awaiter(this, void 0, void 0, function* () {
117
117
  try {
118
118
  const testRun = yield this.getTestRun(testRunId);
119
- if (testRun.stateName !== "Completed" && testRun.stateName !== "InProgress") {
119
+ if (testRun.stateName === "NotStarted") {
120
120
  yield this._client.startTestRun(testRunId);
121
121
  }
122
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-js-commons",
3
- "version": "3.7.1",
3
+ "version": "3.7.3",
4
4
  "description": "JavaScript commons for Test IT",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "dotenv": "^16.0.3",
40
- "testit-api-client": "7.2.0"
40
+ "testit-api-client": "7.2.1"
41
41
  },
42
42
  "files": [
43
43
  "lib"