@dev-blinq/cucumber-js 1.0.103-dev → 1.0.103

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 (31) hide show
  1. package/bin/download-install.js +22 -2
  2. package/lib/configuration/axios_client.js +1 -1
  3. package/lib/configuration/axios_client.js.map +1 -1
  4. package/lib/formatter/api.js +7 -1
  5. package/lib/formatter/api.js.map +1 -1
  6. package/lib/formatter/bvt_analysis_formatter.d.ts +11 -0
  7. package/lib/formatter/bvt_analysis_formatter.js +149 -52
  8. package/lib/formatter/bvt_analysis_formatter.js.map +1 -1
  9. package/lib/formatter/feature_data_format.js +4 -1
  10. package/lib/formatter/feature_data_format.js.map +1 -1
  11. package/lib/formatter/helpers/constants.d.ts +50 -0
  12. package/lib/formatter/helpers/constants.js +60 -0
  13. package/lib/formatter/helpers/constants.js.map +1 -0
  14. package/lib/formatter/helpers/report_generator.d.ts +28 -13
  15. package/lib/formatter/helpers/report_generator.js +286 -71
  16. package/lib/formatter/helpers/report_generator.js.map +1 -1
  17. package/lib/formatter/helpers/test_case_attempt_formatter.js +1 -1
  18. package/lib/formatter/helpers/test_case_attempt_formatter.js.map +1 -1
  19. package/lib/formatter/helpers/upload_serivce.d.ts +15 -3
  20. package/lib/formatter/helpers/upload_serivce.js +111 -37
  21. package/lib/formatter/helpers/upload_serivce.js.map +1 -1
  22. package/lib/formatter/helpers/uploader.d.ts +2 -1
  23. package/lib/formatter/helpers/uploader.js +16 -1
  24. package/lib/formatter/helpers/uploader.js.map +1 -1
  25. package/lib/runtime/test_case_runner.d.ts +1 -0
  26. package/lib/runtime/test_case_runner.js +10 -1
  27. package/lib/runtime/test_case_runner.js.map +1 -1
  28. package/lib/version.d.ts +1 -1
  29. package/lib/version.js +1 -1
  30. package/lib/version.js.map +1 -1
  31. package/package.json +4 -2
@@ -0,0 +1,50 @@
1
+ export declare const LOCAL: {
2
+ SSO: string;
3
+ WORKSPACE: string;
4
+ RUNS: string;
5
+ STORAGE: string;
6
+ };
7
+ export declare const DEV: {
8
+ SSO: string;
9
+ WORKSPACE: string;
10
+ RUNS: string;
11
+ STORAGE: string;
12
+ };
13
+ export declare const PROD: {
14
+ SSO: string;
15
+ WORKSPACE: string;
16
+ RUNS: string;
17
+ STORAGE: string;
18
+ };
19
+ export declare const STAGE: {
20
+ SSO: string;
21
+ WORKSPACE: string;
22
+ RUNS: string;
23
+ STORAGE: string;
24
+ };
25
+ export declare const CUSTOM: {
26
+ SSO: string;
27
+ WORKSPACE: string;
28
+ RUNS: string;
29
+ STORAGE: string;
30
+ };
31
+ export declare const SERVICES_URI: {
32
+ SSO: string;
33
+ WORKSPACE: string;
34
+ RUNS: string;
35
+ STORAGE: string;
36
+ };
37
+ export declare enum ActionEvents {
38
+ record_scenario = "record_scenario",
39
+ download_editor = "download_editor",
40
+ launch_editor = "launch_editor",
41
+ click_start_recording = "click_start_recording",
42
+ click_run_scenario = "click_run_scenario",
43
+ publish_scenario = "publish_scenario",
44
+ click_ai_generate = "click_ai_generate",
45
+ click_run_all = "click_run_all",
46
+ click_open_vscode = "click_open_vscode",
47
+ error_open_vscode = "error_open_vscode",
48
+ cli_run_tests = "cli_run_tests",
49
+ upload_report = "upload_report"
50
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionEvents = exports.SERVICES_URI = exports.CUSTOM = exports.STAGE = exports.PROD = exports.DEV = exports.LOCAL = void 0;
4
+ exports.LOCAL = {
5
+ SSO: 'http://localhost:5000/api/auth',
6
+ WORKSPACE: 'http://localhost:6000/api/workspace',
7
+ RUNS: 'http://localhost:5001/api/runs',
8
+ STORAGE: 'http://localhost:5050/api/storage',
9
+ };
10
+ exports.DEV = {
11
+ SSO: 'https://dev.api.blinq.io/api/auth',
12
+ WORKSPACE: 'https://dev.api.blinq.io/api/workspace',
13
+ RUNS: 'https://dev.api.blinq.io/api/runs',
14
+ STORAGE: 'https://dev.api.blinq.io/api/storage',
15
+ };
16
+ exports.PROD = {
17
+ SSO: 'https://api.blinq.io/api/auth',
18
+ WORKSPACE: 'https://api.blinq.io/api/workspace',
19
+ RUNS: 'https://api.blinq.io/api/runs',
20
+ STORAGE: 'https://api.blinq.io/api/storage',
21
+ };
22
+ exports.STAGE = {
23
+ SSO: 'https://stage.api.blinq.io/api/auth',
24
+ WORKSPACE: 'https://stage.api.blinq.io/api/workspace',
25
+ RUNS: 'https://stage.api.blinq.io/api/runs',
26
+ STORAGE: 'https://stage.api.blinq.io/api/storage',
27
+ };
28
+ exports.CUSTOM = {
29
+ SSO: `${process.env.NODE_ENV_BLINQ}/api/auth`,
30
+ WORKSPACE: `${process.env.NODE_ENV_BLINQ}/api/workspace`,
31
+ RUNS: `${process.env.NODE_ENV_BLINQ}/api/runs`,
32
+ STORAGE: `${process.env.NODE_ENV_BLINQ}/api/storage`,
33
+ };
34
+ exports.SERVICES_URI = process.env.NODE_ENV_BLINQ === 'local'
35
+ ? exports.LOCAL // eslint-disable-line
36
+ : process.env.NODE_ENV_BLINQ === 'dev'
37
+ ? exports.DEV // eslint-disable-line
38
+ : process.env.NODE_ENV_BLINQ === 'stage'
39
+ ? exports.STAGE // eslint-disable-line
40
+ : process.env.NODE_ENV_BLINQ === 'prod'
41
+ ? exports.PROD // eslint-disable-line
42
+ : !process.env.NODE_ENV_BLINQ
43
+ ? exports.PROD // eslint-disable-line
44
+ : exports.CUSTOM; // eslint-disable-line
45
+ var ActionEvents;
46
+ (function (ActionEvents) {
47
+ ActionEvents["record_scenario"] = "record_scenario";
48
+ ActionEvents["download_editor"] = "download_editor";
49
+ ActionEvents["launch_editor"] = "launch_editor";
50
+ ActionEvents["click_start_recording"] = "click_start_recording";
51
+ ActionEvents["click_run_scenario"] = "click_run_scenario";
52
+ ActionEvents["publish_scenario"] = "publish_scenario";
53
+ ActionEvents["click_ai_generate"] = "click_ai_generate";
54
+ ActionEvents["click_run_all"] = "click_run_all";
55
+ ActionEvents["click_open_vscode"] = "click_open_vscode";
56
+ ActionEvents["error_open_vscode"] = "error_open_vscode";
57
+ ActionEvents["cli_run_tests"] = "cli_run_tests";
58
+ ActionEvents["upload_report"] = "upload_report";
59
+ })(ActionEvents = exports.ActionEvents || (exports.ActionEvents = {}));
60
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/formatter/helpers/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAG;IACnB,GAAG,EAAE,gCAAgC;IACrC,SAAS,EAAE,qCAAqC;IAChD,IAAI,EAAE,gCAAgC;IACtC,OAAO,EAAE,mCAAmC;CAC7C,CAAA;AACY,QAAA,GAAG,GAAG;IACjB,GAAG,EAAE,mCAAmC;IACxC,SAAS,EAAE,wCAAwC;IACnD,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,sCAAsC;CAChD,CAAA;AACY,QAAA,IAAI,GAAG;IAClB,GAAG,EAAE,+BAA+B;IACpC,SAAS,EAAE,oCAAoC;IAC/C,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAA;AACY,QAAA,KAAK,GAAG;IACnB,GAAG,EAAE,qCAAqC;IAC1C,SAAS,EAAE,0CAA0C;IACrD,IAAI,EAAE,qCAAqC;IAC3C,OAAO,EAAE,wCAAwC;CAClD,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,WAAW;IAC7C,SAAS,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,gBAAgB;IACxD,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,WAAW;IAC9C,OAAO,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,cAAc;CACrD,CAAA;AAEY,QAAA,YAAY,GACvB,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,OAAO;IACpC,CAAC,CAAC,aAAK,CAAC,sBAAsB;IAC9B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,KAAK;QACtC,CAAC,CAAC,WAAG,CAAC,sBAAsB;QAC5B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,OAAO;YACxC,CAAC,CAAC,aAAK,CAAC,sBAAsB;YAC9B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM;gBACvC,CAAC,CAAC,YAAI,CAAC,sBAAsB;gBAC7B,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc;oBAC7B,CAAC,CAAC,YAAI,CAAC,sBAAsB;oBAC7B,CAAC,CAAC,cAAM,CAAA,CAAC,sBAAsB;AAEnC,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,mDAAmC,CAAA;IACnC,mDAAmC,CAAA;IACnC,+CAA+B,CAAA;IAC/B,+DAA+C,CAAA;IAC/C,yDAAyC,CAAA;IACzC,qDAAqC,CAAA;IACrC,uDAAuC,CAAA;IACvC,+CAA+B,CAAA;IAC/B,uDAAuC,CAAA;IACvC,uDAAuC,CAAA;IACvC,+CAA+B,CAAA;IAC/B,+CAA+B,CAAA;AACjC,CAAC,EAbW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAavB","sourcesContent":["export const LOCAL = {\n SSO: 'http://localhost:5000/api/auth',\n WORKSPACE: 'http://localhost:6000/api/workspace',\n RUNS: 'http://localhost:5001/api/runs',\n STORAGE: 'http://localhost:5050/api/storage',\n}\nexport const DEV = {\n SSO: 'https://dev.api.blinq.io/api/auth',\n WORKSPACE: 'https://dev.api.blinq.io/api/workspace',\n RUNS: 'https://dev.api.blinq.io/api/runs',\n STORAGE: 'https://dev.api.blinq.io/api/storage',\n}\nexport const PROD = {\n SSO: 'https://api.blinq.io/api/auth',\n WORKSPACE: 'https://api.blinq.io/api/workspace',\n RUNS: 'https://api.blinq.io/api/runs',\n STORAGE: 'https://api.blinq.io/api/storage',\n}\nexport const STAGE = {\n SSO: 'https://stage.api.blinq.io/api/auth',\n WORKSPACE: 'https://stage.api.blinq.io/api/workspace',\n RUNS: 'https://stage.api.blinq.io/api/runs',\n STORAGE: 'https://stage.api.blinq.io/api/storage',\n}\n\nexport const CUSTOM = {\n SSO: `${process.env.NODE_ENV_BLINQ}/api/auth`,\n WORKSPACE: `${process.env.NODE_ENV_BLINQ}/api/workspace`,\n RUNS: `${process.env.NODE_ENV_BLINQ}/api/runs`,\n STORAGE: `${process.env.NODE_ENV_BLINQ}/api/storage`,\n}\n\nexport const SERVICES_URI =\n process.env.NODE_ENV_BLINQ === 'local'\n ? LOCAL // eslint-disable-line\n : process.env.NODE_ENV_BLINQ === 'dev'\n ? DEV // eslint-disable-line\n : process.env.NODE_ENV_BLINQ === 'stage'\n ? STAGE // eslint-disable-line\n : process.env.NODE_ENV_BLINQ === 'prod'\n ? PROD // eslint-disable-line\n : !process.env.NODE_ENV_BLINQ\n ? PROD // eslint-disable-line\n : CUSTOM // eslint-disable-line\n\nexport enum ActionEvents {\n record_scenario = 'record_scenario',\n download_editor = 'download_editor',\n launch_editor = 'launch_editor',\n click_start_recording = 'click_start_recording',\n click_run_scenario = 'click_run_scenario',\n publish_scenario = 'publish_scenario',\n click_ai_generate = 'click_ai_generate',\n click_run_all = 'click_run_all',\n click_open_vscode = 'click_open_vscode',\n error_open_vscode = 'error_open_vscode',\n cli_run_tests = 'cli_run_tests',\n upload_report = 'upload_report',\n}\n"]}
@@ -1,40 +1,40 @@
1
- import * as messages from '@cucumber/messages';
1
+ import * as messages from "@cucumber/messages";
2
2
  type JsonTimestamp = number;
3
- type JsonStepType = 'Unknown' | 'Context' | 'Action' | 'Outcome' | 'Conjunction';
3
+ type JsonStepType = "Unknown" | "Context" | "Action" | "Outcome" | "Conjunction";
4
4
  export type JsonResultUnknown = {
5
- status: 'UNKNOWN';
5
+ status: "UNKNOWN";
6
6
  };
7
7
  type JsonResultSkipped = {
8
- status: 'SKIPPED';
8
+ status: "SKIPPED";
9
9
  };
10
10
  type JsonResultUndefined = {
11
- status: 'UNDEFINED';
11
+ status: "UNDEFINED";
12
12
  };
13
13
  type JsonResultAmbiguous = {
14
- status: 'AMBIGUOUS';
14
+ status: "AMBIGUOUS";
15
15
  };
16
16
  export type JsonResultStarted = {
17
- status: 'STARTED';
17
+ status: "STARTED";
18
18
  startTime: JsonTimestamp;
19
19
  };
20
20
  type JsonResultPending = {
21
- status: 'PENDING';
21
+ status: "PENDING";
22
22
  startTime: JsonTimestamp;
23
23
  endTime: JsonTimestamp;
24
24
  };
25
25
  export type JsonResultPassed = {
26
- status: 'PASSED';
26
+ status: "PASSED";
27
27
  startTime: JsonTimestamp;
28
28
  endTime: JsonTimestamp;
29
29
  };
30
30
  export type JsonResultFailed = {
31
- status: 'FAILED';
31
+ status: "FAILED";
32
32
  startTime: JsonTimestamp;
33
33
  endTime: JsonTimestamp;
34
34
  message?: string;
35
35
  };
36
36
  export type JsonFixedByAi = {
37
- status: 'FIXED_BY_AI';
37
+ status: "FIXED_BY_AI";
38
38
  startTime: JsonTimestamp;
39
39
  endTime: JsonTimestamp;
40
40
  };
@@ -48,7 +48,6 @@ type JsonCommand = {
48
48
  text: string;
49
49
  screenshotId?: string;
50
50
  result: JsonCommandResult;
51
- webLog?: webLog[];
52
51
  netWorkLog?: any[];
53
52
  };
54
53
  type webLog = {
@@ -63,7 +62,12 @@ export type JsonStep = {
63
62
  text: string;
64
63
  commands: JsonCommand[];
65
64
  result: JsonStepResult;
65
+ webLog: webLog[];
66
+ networkData: any[];
66
67
  data?: any;
68
+ ariaSnapshot: string;
69
+ traceFilePath?: string;
70
+ brunoData?: any;
67
71
  };
68
72
  export type RetrainStats = {
69
73
  result: JsonTestResult;
@@ -80,8 +84,13 @@ export type JsonTestProgress = {
80
84
  steps: JsonStep[];
81
85
  result: JsonTestResult;
82
86
  retrainStats?: RetrainStats;
87
+ initialAriaSnapshot?: string;
83
88
  webLog: any;
84
89
  networkLog: any;
90
+ env: {
91
+ name: string;
92
+ baseUrl: string;
93
+ };
85
94
  };
86
95
  export type JsonReport = {
87
96
  testCases: JsonTestProgress[];
@@ -109,10 +118,14 @@ export default class ReportGenerator {
109
118
  private scenarioIterationCountMap;
110
119
  private logs;
111
120
  private networkLog;
121
+ private stepLogs;
122
+ private stepNetworkLogs;
112
123
  private runName;
124
+ private ariaSnapshot;
125
+ private initialAriaSnapshot;
113
126
  reportFolder: null | string;
114
127
  private uploadService;
115
- handleMessage(envelope: EnvelopeWithMetaMessage): Promise<void>;
128
+ handleMessage(envelope: EnvelopeWithMetaMessage | messages.Envelope, reRunId?: string): Promise<any>;
116
129
  getReport(): JsonReport;
117
130
  private handleParseError;
118
131
  private onGherkinDocument;
@@ -125,11 +138,13 @@ export default class ReportGenerator {
125
138
  private onTestCaseStarted;
126
139
  private onTestStepStarted;
127
140
  private onAttachment;
141
+ private getFailedTestStepResult;
128
142
  private onTestStepFinished;
129
143
  getLogFileContent(): any;
130
144
  private getTestCaseResult;
131
145
  private onTestCaseFinished;
132
146
  private uploadTestCase;
147
+ private writeTestCaseReportToDisk;
133
148
  private onTestRunFinished;
134
149
  }
135
150
  export {};