qase-javascript-commons 2.0.0-beta.1 → 2.0.0-beta.2

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.
Files changed (52) hide show
  1. package/changelog.md +23 -0
  2. package/dist/config/config-validation-schema.js +22 -6
  3. package/dist/env/env-enum.d.ts +14 -7
  4. package/dist/env/env-enum.js +14 -6
  5. package/dist/env/env-to-config.js +6 -3
  6. package/dist/env/env-type.d.ts +7 -4
  7. package/dist/env/env-validation-schema.js +15 -4
  8. package/dist/formatter/index.d.ts +1 -0
  9. package/dist/formatter/index.js +3 -1
  10. package/dist/formatter/jsonp-formatter.d.ts +13 -0
  11. package/dist/formatter/jsonp-formatter.js +28 -0
  12. package/dist/models/attachment.d.ts +8 -0
  13. package/dist/models/attachment.js +2 -0
  14. package/dist/models/execution-sum.d.ts +6 -0
  15. package/dist/models/execution-sum.js +2 -0
  16. package/dist/models/host-data.d.ts +11 -0
  17. package/dist/models/host-data.js +2 -0
  18. package/dist/models/index.d.ts +6 -2
  19. package/dist/models/index.js +4 -4
  20. package/dist/models/report.d.ts +14 -0
  21. package/dist/models/report.js +2 -0
  22. package/dist/models/short-result.d.ts +7 -0
  23. package/dist/models/short-result.js +2 -0
  24. package/dist/models/stats.d.ts +8 -0
  25. package/dist/models/stats.js +2 -0
  26. package/dist/models/step-data.d.ts +4 -0
  27. package/dist/models/step-data.js +2 -0
  28. package/dist/models/step-execution.d.ts +11 -0
  29. package/dist/models/step-execution.js +9 -0
  30. package/dist/models/test-execution.d.ts +19 -0
  31. package/dist/models/test-execution.js +15 -0
  32. package/dist/models/test-result.d.ts +14 -20
  33. package/dist/models/test-result.js +0 -13
  34. package/dist/models/test-step.d.ts +9 -11
  35. package/dist/models/test-step.js +0 -7
  36. package/dist/options/options-type.d.ts +1 -0
  37. package/dist/qase.d.ts +22 -2
  38. package/dist/qase.js +103 -25
  39. package/dist/reporters/abstract-reporter.d.ts +18 -7
  40. package/dist/reporters/abstract-reporter.js +37 -2
  41. package/dist/reporters/report-reporter.d.ts +24 -12
  42. package/dist/reporters/report-reporter.js +152 -13
  43. package/dist/reporters/testops-reporter.d.ts +26 -49
  44. package/dist/reporters/testops-reporter.js +87 -155
  45. package/dist/writer/driver-enum.d.ts +7 -0
  46. package/dist/writer/driver-enum.js +9 -1
  47. package/dist/writer/fs-writer.d.ts +17 -8
  48. package/dist/writer/fs-writer.js +55 -8
  49. package/dist/writer/index.d.ts +1 -1
  50. package/dist/writer/index.js +2 -1
  51. package/dist/writer/writer-interface.d.ts +4 -2
  52. package/package.json +4 -3
package/changelog.md ADDED
@@ -0,0 +1,23 @@
1
+ # qase-javascript-commons@2.0.0-beta.2
2
+
3
+ ## Overview
4
+
5
+ Package `qase-javascript-commons` contains common functions, used by all Qase JavaScript reporters.
6
+
7
+ This is a beta channel release.
8
+ Don't install this package explicitly.
9
+ Instead, install the test reporter for your framework, for example:
10
+
11
+ ```bash
12
+ npm install playwright-qase-reporter@beta
13
+ ```
14
+
15
+ ## What's new
16
+
17
+ * Set a fallback reporter when the primary reporter can't be used,
18
+ such as when the `testops` reporter can't authenticate with the Qase API.
19
+ * Rename some environment variables to keep naming consistent between reporters in all languages.
20
+ * Add several environment variables for new config options.
21
+ * Write outputs in JSONP format, which can be used with
22
+ [Qase Report](https://github.com/qase-tms/qase-report).
23
+ * Logic for handling test with multiple case IDs moved to the commons package.
@@ -14,6 +14,11 @@ exports.configValidationSchema = {
14
14
  enum: [options_1.ModeEnum.report, options_1.ModeEnum.testops, options_1.ModeEnum.off],
15
15
  nullable: true,
16
16
  },
17
+ fallback: {
18
+ type: 'string',
19
+ enum: [options_1.ModeEnum.report, options_1.ModeEnum.testops, options_1.ModeEnum.off],
20
+ nullable: true,
21
+ },
17
22
  debug: {
18
23
  type: 'boolean',
19
24
  nullable: true,
@@ -66,10 +71,6 @@ exports.configValidationSchema = {
66
71
  type: 'boolean',
67
72
  nullable: true,
68
73
  },
69
- baseUrl: {
70
- type: 'string',
71
- nullable: true,
72
- },
73
74
  run: {
74
75
  type: 'object',
75
76
  nullable: true,
@@ -90,12 +91,26 @@ exports.configValidationSchema = {
90
91
  type: 'boolean',
91
92
  nullable: true,
92
93
  },
93
- environment: {
94
+ },
95
+ },
96
+ plan: {
97
+ type: 'object',
98
+ nullable: true,
99
+ properties: {
100
+ id: {
94
101
  type: 'number',
95
102
  nullable: true,
96
103
  },
97
104
  },
98
105
  },
106
+ chunk: {
107
+ type: 'number',
108
+ nullable: true,
109
+ },
110
+ defect: {
111
+ type: 'boolean',
112
+ nullable: true,
113
+ },
99
114
  },
100
115
  },
101
116
  report: {
@@ -119,8 +134,9 @@ exports.configValidationSchema = {
119
134
  type: 'string',
120
135
  nullable: true,
121
136
  },
122
- ext: {
137
+ format: {
123
138
  type: 'string',
139
+ enum: [writer_1.FormatEnum.json, writer_1.FormatEnum.jsonp],
124
140
  nullable: true,
125
141
  },
126
142
  },
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export declare enum EnvEnum {
5
5
  mode = "QASE_MODE",
6
+ fallback = "QASE_FALLBACK",
6
7
  debug = "QASE_DEBUG",
7
8
  environment = "QASE_ENVIRONMENT"
8
9
  }
@@ -11,15 +12,16 @@ export declare enum EnvEnum {
11
12
  */
12
13
  export declare enum EnvTestOpsEnum {
13
14
  project = "QASE_TESTOPS_PROJECT",
14
- baseUrl = "QASE_TESTOPS_BASE_URL",
15
- uploadAttachments = "QASE_TESTOPS_UPLOAD_ATTACHMENTS"
15
+ uploadAttachments = "QASE_TESTOPS_UPLOAD_ATTACHMENTS",
16
+ chunk = "QASE_TESTOPS_CHUNK",
17
+ defect = "QASE_TESTOPS_DEFECT"
16
18
  }
17
19
  /**
18
20
  * @enum {string}
19
21
  */
20
22
  export declare enum EnvApiEnum {
21
23
  token = "QASE_TESTOPS_API_TOKEN",
22
- baseUrl = "QASE_TESTOPS_API_BASE_URL"
24
+ baseUrl = "QASE_TESTOPS_API_HOST"
23
25
  }
24
26
  /**
25
27
  * @enum {string}
@@ -28,13 +30,18 @@ export declare enum EnvRunEnum {
28
30
  id = "QASE_TESTOPS_RUN_ID",
29
31
  title = "QASE_TESTOPS_RUN_TITLE",
30
32
  description = "QASE_TESTOPS_RUN_DESCRIPTION",
31
- complete = "QASE_TESTOPS_RUN_COMPLETE",
32
- environment = "QASE_TESTOPS_ENVIRONMENT"
33
+ complete = "QASE_TESTOPS_RUN_COMPLETE"
34
+ }
35
+ /**
36
+ * @enum {string}
37
+ */
38
+ export declare enum EnvPlanEnum {
39
+ id = "QASE_TESTOPS_PLAN_ID"
33
40
  }
34
41
  /**
35
42
  * @enum {string}
36
43
  */
37
44
  export declare enum EnvLocalEnum {
38
- path = "QASE_REPORT_CONNECTIONS_LOCAL_PATH",
39
- ext = "QASE_REPORT_CONNECTIONS_LOCAL_EXT"
45
+ path = "QASE_REPORT_CONNECTION_PATH",
46
+ format = "QASE_REPORT_CONNECTION_FORMAT"
40
47
  }
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnvLocalEnum = exports.EnvRunEnum = exports.EnvApiEnum = exports.EnvTestOpsEnum = exports.EnvEnum = void 0;
3
+ exports.EnvLocalEnum = exports.EnvPlanEnum = exports.EnvRunEnum = exports.EnvApiEnum = exports.EnvTestOpsEnum = exports.EnvEnum = void 0;
4
4
  /**
5
5
  * @enum {string}
6
6
  */
7
7
  var EnvEnum;
8
8
  (function (EnvEnum) {
9
9
  EnvEnum["mode"] = "QASE_MODE";
10
+ EnvEnum["fallback"] = "QASE_FALLBACK";
10
11
  EnvEnum["debug"] = "QASE_DEBUG";
11
12
  EnvEnum["environment"] = "QASE_ENVIRONMENT";
12
13
  })(EnvEnum || (exports.EnvEnum = EnvEnum = {}));
@@ -16,8 +17,9 @@ var EnvEnum;
16
17
  var EnvTestOpsEnum;
17
18
  (function (EnvTestOpsEnum) {
18
19
  EnvTestOpsEnum["project"] = "QASE_TESTOPS_PROJECT";
19
- EnvTestOpsEnum["baseUrl"] = "QASE_TESTOPS_BASE_URL";
20
20
  EnvTestOpsEnum["uploadAttachments"] = "QASE_TESTOPS_UPLOAD_ATTACHMENTS";
21
+ EnvTestOpsEnum["chunk"] = "QASE_TESTOPS_CHUNK";
22
+ EnvTestOpsEnum["defect"] = "QASE_TESTOPS_DEFECT";
21
23
  })(EnvTestOpsEnum || (exports.EnvTestOpsEnum = EnvTestOpsEnum = {}));
22
24
  /**
23
25
  * @enum {string}
@@ -25,7 +27,7 @@ var EnvTestOpsEnum;
25
27
  var EnvApiEnum;
26
28
  (function (EnvApiEnum) {
27
29
  EnvApiEnum["token"] = "QASE_TESTOPS_API_TOKEN";
28
- EnvApiEnum["baseUrl"] = "QASE_TESTOPS_API_BASE_URL";
30
+ EnvApiEnum["baseUrl"] = "QASE_TESTOPS_API_HOST";
29
31
  })(EnvApiEnum || (exports.EnvApiEnum = EnvApiEnum = {}));
30
32
  /**
31
33
  * @enum {string}
@@ -36,13 +38,19 @@ var EnvRunEnum;
36
38
  EnvRunEnum["title"] = "QASE_TESTOPS_RUN_TITLE";
37
39
  EnvRunEnum["description"] = "QASE_TESTOPS_RUN_DESCRIPTION";
38
40
  EnvRunEnum["complete"] = "QASE_TESTOPS_RUN_COMPLETE";
39
- EnvRunEnum["environment"] = "QASE_TESTOPS_ENVIRONMENT";
40
41
  })(EnvRunEnum || (exports.EnvRunEnum = EnvRunEnum = {}));
42
+ /**
43
+ * @enum {string}
44
+ */
45
+ var EnvPlanEnum;
46
+ (function (EnvPlanEnum) {
47
+ EnvPlanEnum["id"] = "QASE_TESTOPS_PLAN_ID";
48
+ })(EnvPlanEnum || (exports.EnvPlanEnum = EnvPlanEnum = {}));
41
49
  /**
42
50
  * @enum {string}
43
51
  */
44
52
  var EnvLocalEnum;
45
53
  (function (EnvLocalEnum) {
46
- EnvLocalEnum["path"] = "QASE_REPORT_CONNECTIONS_LOCAL_PATH";
47
- EnvLocalEnum["ext"] = "QASE_REPORT_CONNECTIONS_LOCAL_EXT";
54
+ EnvLocalEnum["path"] = "QASE_REPORT_CONNECTION_PATH";
55
+ EnvLocalEnum["format"] = "QASE_REPORT_CONNECTION_FORMAT";
48
56
  })(EnvLocalEnum || (exports.EnvLocalEnum = EnvLocalEnum = {}));
@@ -13,7 +13,6 @@ const envToConfig = (env) => ({
13
13
  environment: env[env_enum_1.EnvEnum.environment],
14
14
  testops: {
15
15
  project: env[env_enum_1.EnvTestOpsEnum.project],
16
- baseUrl: env[env_enum_1.EnvTestOpsEnum.baseUrl],
17
16
  uploadAttachments: env[env_enum_1.EnvTestOpsEnum.uploadAttachments],
18
17
  api: {
19
18
  token: env[env_enum_1.EnvApiEnum.token],
@@ -24,14 +23,18 @@ const envToConfig = (env) => ({
24
23
  title: env[env_enum_1.EnvRunEnum.title],
25
24
  description: env[env_enum_1.EnvRunEnum.description],
26
25
  complete: env[env_enum_1.EnvRunEnum.complete],
27
- environment: env[env_enum_1.EnvRunEnum.environment],
28
26
  },
27
+ plan: {
28
+ id: env[env_enum_1.EnvPlanEnum.id],
29
+ },
30
+ chunk: env[env_enum_1.EnvTestOpsEnum.chunk],
31
+ defect: env[env_enum_1.EnvTestOpsEnum.defect],
29
32
  },
30
33
  report: {
31
34
  connections: {
32
35
  [writer_1.DriverEnum.local]: {
33
36
  path: env[env_enum_1.EnvLocalEnum.path],
34
- ext: env[env_enum_1.EnvLocalEnum.ext],
37
+ format: env[env_enum_1.EnvLocalEnum.format],
35
38
  },
36
39
  },
37
40
  },
@@ -1,19 +1,22 @@
1
- import { EnvEnum, EnvTestOpsEnum, EnvApiEnum, EnvRunEnum, EnvLocalEnum } from './env-enum';
1
+ import { EnvEnum, EnvTestOpsEnum, EnvApiEnum, EnvRunEnum, EnvLocalEnum, EnvPlanEnum } from './env-enum';
2
2
  import { ModeEnum } from '../options';
3
+ import { FormatEnum } from '../writer';
3
4
  export type EnvType = {
4
5
  [EnvEnum.mode]?: `${ModeEnum}`;
6
+ [EnvEnum.fallback]?: `${ModeEnum}`;
5
7
  [EnvEnum.debug]?: boolean;
6
8
  [EnvEnum.environment]?: string | number;
7
9
  [EnvTestOpsEnum.project]?: string;
8
- [EnvTestOpsEnum.baseUrl]?: string;
9
10
  [EnvTestOpsEnum.uploadAttachments]?: boolean;
11
+ [EnvTestOpsEnum.chunk]?: number;
12
+ [EnvTestOpsEnum.defect]?: boolean;
10
13
  [EnvApiEnum.token]?: string;
11
14
  [EnvApiEnum.baseUrl]?: string;
12
15
  [EnvRunEnum.id]?: number;
13
16
  [EnvRunEnum.title]?: string;
14
17
  [EnvRunEnum.description]?: string;
15
18
  [EnvRunEnum.complete]?: boolean;
16
- [EnvRunEnum.environment]?: number;
19
+ [EnvPlanEnum.id]?: number;
17
20
  [EnvLocalEnum.path]?: string;
18
- [EnvLocalEnum.ext]?: string;
21
+ [EnvLocalEnum.format]?: `${FormatEnum}`;
19
22
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.envValidationSchema = void 0;
4
4
  const env_enum_1 = require("./env-enum");
5
5
  const options_1 = require("../options");
6
+ const writer_1 = require("../writer");
6
7
  /**
7
8
  * @type {JSONSchemaType<EnvType>}
8
9
  */
@@ -14,6 +15,11 @@ exports.envValidationSchema = {
14
15
  enum: [options_1.ModeEnum.report, options_1.ModeEnum.testops, options_1.ModeEnum.off],
15
16
  nullable: true,
16
17
  },
18
+ [env_enum_1.EnvEnum.fallback]: {
19
+ type: 'string',
20
+ enum: [options_1.ModeEnum.report, options_1.ModeEnum.testops, options_1.ModeEnum.off],
21
+ nullable: true,
22
+ },
17
23
  [env_enum_1.EnvEnum.debug]: {
18
24
  type: 'boolean',
19
25
  nullable: true,
@@ -30,8 +36,12 @@ exports.envValidationSchema = {
30
36
  type: 'boolean',
31
37
  nullable: true,
32
38
  },
33
- [env_enum_1.EnvTestOpsEnum.baseUrl]: {
34
- type: 'string',
39
+ [env_enum_1.EnvTestOpsEnum.chunk]: {
40
+ type: 'number',
41
+ nullable: true,
42
+ },
43
+ [env_enum_1.EnvTestOpsEnum.defect]: {
44
+ type: 'boolean',
35
45
  nullable: true,
36
46
  },
37
47
  [env_enum_1.EnvApiEnum.token]: {
@@ -58,7 +68,7 @@ exports.envValidationSchema = {
58
68
  type: 'boolean',
59
69
  nullable: true,
60
70
  },
61
- [env_enum_1.EnvRunEnum.environment]: {
71
+ [env_enum_1.EnvPlanEnum.id]: {
62
72
  type: 'number',
63
73
  nullable: true,
64
74
  },
@@ -66,8 +76,9 @@ exports.envValidationSchema = {
66
76
  type: 'string',
67
77
  nullable: true,
68
78
  },
69
- [env_enum_1.EnvLocalEnum.ext]: {
79
+ [env_enum_1.EnvLocalEnum.format]: {
70
80
  type: 'string',
81
+ enum: [writer_1.FormatEnum.json, writer_1.FormatEnum.jsonp],
71
82
  nullable: true,
72
83
  },
73
84
  },
@@ -1,2 +1,3 @@
1
1
  export { type FormatterInterface } from './formatter-interface';
2
2
  export { JsonFormatter } from './json-formatter';
3
+ export { JsonpFormatter } from './jsonp-formatter';
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JsonFormatter = void 0;
3
+ exports.JsonpFormatter = exports.JsonFormatter = void 0;
4
4
  var json_formatter_1 = require("./json-formatter");
5
5
  Object.defineProperty(exports, "JsonFormatter", { enumerable: true, get: function () { return json_formatter_1.JsonFormatter; } });
6
+ var jsonp_formatter_1 = require("./jsonp-formatter");
7
+ Object.defineProperty(exports, "JsonpFormatter", { enumerable: true, get: function () { return jsonp_formatter_1.JsonpFormatter; } });
@@ -0,0 +1,13 @@
1
+ import { FormatterInterface } from './formatter-interface';
2
+ export type JsonpFormatterOptionsType = {
3
+ space?: number | undefined;
4
+ };
5
+ /**
6
+ * @class JsonFormatter
7
+ * @implements FormatterInterface
8
+ */
9
+ export declare class JsonpFormatter implements FormatterInterface {
10
+ private space;
11
+ constructor(options?: JsonpFormatterOptionsType);
12
+ format(object: unknown): Promise<string>;
13
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.JsonpFormatter = void 0;
7
+ const strip_ansi_1 = __importDefault(require("strip-ansi"));
8
+ /**
9
+ * @class JsonFormatter
10
+ * @implements FormatterInterface
11
+ */
12
+ class JsonpFormatter {
13
+ constructor(options = {}) {
14
+ const { space = 4 } = options;
15
+ this.space = space;
16
+ }
17
+ // eslint-disable-next-line @typescript-eslint/require-await
18
+ async format(object) {
19
+ const json = JSON.stringify(object, (key, value) => {
20
+ if (key === 'error' && value instanceof Error) {
21
+ return (0, strip_ansi_1.default)(String(value));
22
+ }
23
+ return value;
24
+ }, this.space);
25
+ return `qaseJsonp(${json});`;
26
+ }
27
+ }
28
+ exports.JsonpFormatter = JsonpFormatter;
@@ -0,0 +1,8 @@
1
+ export type Attachment = {
2
+ file_name: string;
3
+ mime_type: string;
4
+ file_path: string | null;
5
+ content: any;
6
+ size: number;
7
+ id: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export type ExecutionSum = {
2
+ start_time: number;
3
+ end_time: number;
4
+ duration: number;
5
+ cumulative_duration: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export type HostData = {
2
+ system: string;
3
+ node: string;
4
+ release: string;
5
+ version: string;
6
+ machine: string;
7
+ python: string;
8
+ pip: string;
9
+ node_version: string;
10
+ npm: string;
11
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,6 @@
1
- export { type TestResultType, TestStatusEnum as TestStatusEnum, } from './test-result';
2
- export { type TestStepType, StepStatusEnum } from './test-step';
1
+ export { type TestResultType } from './test-result';
2
+ export { TestExecution, TestStatusEnum } from './test-execution';
3
+ export { type TestStepType } from './test-step';
4
+ export { StepStatusEnum } from './step-execution';
5
+ export { Attachment } from './attachment';
6
+ export { Report } from './report';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StepStatusEnum = exports.TestStatusEnum = void 0;
4
- var test_result_1 = require("./test-result");
5
- Object.defineProperty(exports, "TestStatusEnum", { enumerable: true, get: function () { return test_result_1.TestStatusEnum; } });
6
- var test_step_1 = require("./test-step");
7
- Object.defineProperty(exports, "StepStatusEnum", { enumerable: true, get: function () { return test_step_1.StepStatusEnum; } });
4
+ var test_execution_1 = require("./test-execution");
5
+ Object.defineProperty(exports, "TestStatusEnum", { enumerable: true, get: function () { return test_execution_1.TestStatusEnum; } });
6
+ var step_execution_1 = require("./step-execution");
7
+ Object.defineProperty(exports, "StepStatusEnum", { enumerable: true, get: function () { return step_execution_1.StepStatusEnum; } });
@@ -0,0 +1,14 @@
1
+ import { HostData } from './host-data';
2
+ import { ShortResult } from './short-result';
3
+ import { Stats } from './stats';
4
+ import { ExecutionSum } from './execution-sum';
5
+ export type Report = {
6
+ environment: string;
7
+ execution: ExecutionSum;
8
+ host_data: HostData;
9
+ results: ShortResult[];
10
+ stats: Stats;
11
+ suites: any[];
12
+ threads: string[];
13
+ title: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export type ShortResult = {
2
+ id: string;
3
+ title: string;
4
+ status: string;
5
+ duration: number;
6
+ thread: string | null;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export type Stats = {
2
+ passed: number;
3
+ failed: number;
4
+ skipped: number;
5
+ broken: number;
6
+ muted: number;
7
+ total: number;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface StepData {
2
+ action: string;
3
+ expected_result: string | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export declare enum StepStatusEnum {
2
+ passed = "passed",
3
+ failed = "failed",
4
+ blocked = "blocked"
5
+ }
6
+ export interface StepExecution {
7
+ start_time: number | null;
8
+ status: StepStatusEnum;
9
+ end_time: number | null;
10
+ duration: number | null;
11
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StepStatusEnum = void 0;
4
+ var StepStatusEnum;
5
+ (function (StepStatusEnum) {
6
+ StepStatusEnum["passed"] = "passed";
7
+ StepStatusEnum["failed"] = "failed";
8
+ StepStatusEnum["blocked"] = "blocked";
9
+ })(StepStatusEnum || (exports.StepStatusEnum = StepStatusEnum = {}));
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @enum {string}
3
+ */
4
+ export declare enum TestStatusEnum {
5
+ passed = "passed",
6
+ failed = "failed",
7
+ skipped = "skipped",
8
+ disabled = "disabled",
9
+ blocked = "blocked",
10
+ invalid = "invalid"
11
+ }
12
+ export interface TestExecution {
13
+ start_time: number | null;
14
+ status: TestStatusEnum;
15
+ end_time: number | null;
16
+ duration: number | null;
17
+ stacktrace: string | null;
18
+ thread: string | null;
19
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestStatusEnum = void 0;
4
+ /**
5
+ * @enum {string}
6
+ */
7
+ var TestStatusEnum;
8
+ (function (TestStatusEnum) {
9
+ TestStatusEnum["passed"] = "passed";
10
+ TestStatusEnum["failed"] = "failed";
11
+ TestStatusEnum["skipped"] = "skipped";
12
+ TestStatusEnum["disabled"] = "disabled";
13
+ TestStatusEnum["blocked"] = "blocked";
14
+ TestStatusEnum["invalid"] = "invalid";
15
+ })(TestStatusEnum || (exports.TestStatusEnum = TestStatusEnum = {}));
@@ -1,25 +1,19 @@
1
1
  import { TestStepType } from './test-step';
2
- /**
3
- * @enum {string}
4
- */
5
- export declare enum TestStatusEnum {
6
- passed = "passed",
7
- failed = "failed",
8
- skipped = "skipped",
9
- disabled = "disabled",
10
- blocked = "blocked",
11
- invalid = "invalid"
12
- }
2
+ import { Attachment } from './attachment';
3
+ import { TestExecution } from './test-execution';
13
4
  export type TestResultType = {
14
5
  id: string;
15
- testOpsId: number[];
16
6
  title: string;
17
- status: `${TestStatusEnum}`;
18
- suiteTitle?: string | string[] | undefined;
19
- error?: Error | undefined;
20
- startTime?: number | undefined;
21
- duration?: number | undefined;
22
- endTime?: number | undefined;
23
- steps?: TestStepType[] | undefined;
24
- attachments?: string[] | undefined;
7
+ signature: string;
8
+ run_id: number | null;
9
+ testops_id: number | number[] | null;
10
+ execution: TestExecution;
11
+ fields: Map<string, string>;
12
+ attachments: Attachment[];
13
+ steps: TestStepType[];
14
+ params: Map<string, string>;
15
+ author: string | null;
16
+ relations: any[];
17
+ muted: boolean;
18
+ message: string | null;
25
19
  };
@@ -1,15 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestStatusEnum = void 0;
4
- /**
5
- * @enum {string}
6
- */
7
- var TestStatusEnum;
8
- (function (TestStatusEnum) {
9
- TestStatusEnum["passed"] = "passed";
10
- TestStatusEnum["failed"] = "failed";
11
- TestStatusEnum["skipped"] = "skipped";
12
- TestStatusEnum["disabled"] = "disabled";
13
- TestStatusEnum["blocked"] = "blocked";
14
- TestStatusEnum["invalid"] = "invalid";
15
- })(TestStatusEnum || (exports.TestStatusEnum = TestStatusEnum = {}));
@@ -1,14 +1,12 @@
1
- export declare enum StepStatusEnum {
2
- passed = "passed",
3
- failed = "failed",
4
- blocked = "blocked"
5
- }
1
+ import { StepData } from './step-data';
2
+ import { StepExecution } from './step-execution';
3
+ import { Attachment } from './attachment';
6
4
  export type TestStepType = {
7
5
  id: string;
8
- title: string;
9
- status: `${StepStatusEnum}`;
10
- duration?: number | undefined;
11
- error?: Error | undefined;
12
- steps?: TestStepType[] | undefined;
13
- attachments?: string[] | undefined;
6
+ step_type: string;
7
+ data: StepData;
8
+ parent_id: string | null;
9
+ execution: StepExecution;
10
+ attachments: Attachment[];
11
+ steps: TestStepType[];
14
12
  };
@@ -1,9 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StepStatusEnum = void 0;
4
- var StepStatusEnum;
5
- (function (StepStatusEnum) {
6
- StepStatusEnum["passed"] = "passed";
7
- StepStatusEnum["failed"] = "failed";
8
- StepStatusEnum["blocked"] = "blocked";
9
- })(StepStatusEnum || (exports.StepStatusEnum = StepStatusEnum = {}));
@@ -20,6 +20,7 @@ export type OptionsType = {
20
20
  frameworkName: string;
21
21
  reporterName: string;
22
22
  mode?: `${ModeEnum}` | undefined;
23
+ fallback?: `${ModeEnum}` | undefined;
23
24
  debug?: boolean | undefined;
24
25
  environment?: string | number | undefined;
25
26
  testops?: (RecursivePartial<TestOpsOptionsType> & AdditionalTestOpsOptionsType) | undefined;