askui 0.10.5 → 0.11.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.
Files changed (38) hide show
  1. package/dist/cjs/core/reporting/default-step.js +5 -1
  2. package/dist/cjs/core/reporting/instruction.d.ts +1 -1
  3. package/dist/cjs/execution/dsl.d.ts +27 -3
  4. package/dist/cjs/execution/dsl.js +54 -6
  5. package/dist/cjs/execution/index.d.ts +0 -1
  6. package/dist/cjs/execution/index.js +1 -3
  7. package/dist/cjs/execution/ui-control-client-dependency-builder.js +2 -3
  8. package/dist/cjs/execution/ui-control-client.d.ts +0 -2
  9. package/dist/cjs/execution/ui-control-client.js +4 -18
  10. package/dist/cjs/execution/ui-controller-client-error.d.ts +3 -0
  11. package/dist/cjs/execution/ui-controller-client-error.js +10 -0
  12. package/dist/cjs/execution/ui-controller-client-interface.d.ts +1 -11
  13. package/dist/cjs/execution/ui-controller-client.js +7 -8
  14. package/dist/cjs/lib/download-binaries.js +1 -1
  15. package/dist/cjs/main.d.ts +3 -1
  16. package/dist/cjs/main.js +5 -2
  17. package/dist/esm/core/reporting/default-step.js +5 -1
  18. package/dist/esm/core/reporting/instruction.d.ts +1 -1
  19. package/dist/esm/execution/dsl.d.ts +27 -3
  20. package/dist/esm/execution/dsl.js +54 -6
  21. package/dist/esm/execution/index.d.ts +0 -1
  22. package/dist/esm/execution/index.js +0 -1
  23. package/dist/esm/execution/ui-control-client-dependency-builder.js +2 -3
  24. package/dist/esm/execution/ui-control-client-error.d.ts +1 -0
  25. package/dist/esm/execution/ui-control-client-error.js +4 -0
  26. package/dist/esm/execution/ui-control-client.d.ts +0 -2
  27. package/dist/esm/execution/ui-control-client.js +4 -18
  28. package/dist/esm/execution/ui-controller-client-error.d.ts +3 -0
  29. package/dist/esm/execution/ui-controller-client-error.js +6 -0
  30. package/dist/esm/execution/ui-controller-client-interface.d.ts +1 -11
  31. package/dist/esm/execution/ui-controller-client.js +7 -8
  32. package/dist/esm/lib/download-binaries.js +1 -1
  33. package/dist/esm/main.d.ts +3 -1
  34. package/dist/esm/main.js +3 -1
  35. package/dist/example_projects_templates/typescript_jest/test/README.md +6 -6
  36. package/dist/example_projects_templates/typescript_jest/test/helper/jest.setup.ts +14 -1
  37. package/dist/example_projects_templates/typescript_jest/test/jest.config.ts +1 -1
  38. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DefaultStep = void 0;
4
+ const control_command_error_1 = require("../../execution/control-command-error");
4
5
  class DefaultStep {
5
6
  constructor(instruction) {
6
7
  this.instruction = instruction;
@@ -66,9 +67,12 @@ class DefaultStep {
66
67
  return this;
67
68
  }
68
69
  static determineLastRunStatus(error) {
69
- if (error !== undefined) {
70
+ if (error instanceof control_command_error_1.ControlCommandError) {
70
71
  return 'failed';
71
72
  }
73
+ if (error !== undefined) {
74
+ return 'erroneous';
75
+ }
72
76
  return 'passed';
73
77
  }
74
78
  }
@@ -1,4 +1,4 @@
1
- import { CustomElement } from '@/core/model/custom-element';
1
+ import { CustomElement } from '../model/custom-element';
2
2
  export interface Instruction {
3
3
  readonly value: string;
4
4
  readonly valueHumanReadable: string;
@@ -104,7 +104,15 @@ export declare class FluentFilters extends FluentBase {
104
104
  *
105
105
  * @return {FluentFiltersOrRelations}
106
106
  */
107
- col(index: number): FluentFiltersOrRelations;
107
+ column(index: number): FluentFiltersOrRelations;
108
+ /**
109
+ *
110
+ * @param {number} row_index - row index
111
+ * @param {number} column_index - column index
112
+ *
113
+ * @return {FluentFiltersOrRelations}
114
+ */
115
+ cell(row_index: number, column_index: number): FluentFiltersOrRelations;
108
116
  /**
109
117
  *
110
118
  * @return {FluentFiltersOrRelations}
@@ -652,7 +660,15 @@ export declare class FluentFiltersCondition extends FluentBase {
652
660
  *
653
661
  * @return {FluentFiltersOrRelationsCondition}
654
662
  */
655
- col(index: number): FluentFiltersOrRelationsCondition;
663
+ column(index: number): FluentFiltersOrRelationsCondition;
664
+ /**
665
+ *
666
+ * @param {number} row_index - row index
667
+ * @param {number} column_index - column index
668
+ *
669
+ * @return {FluentFiltersOrRelationsCondition}
670
+ */
671
+ cell(row_index: number, column_index: number): FluentFiltersOrRelationsCondition;
656
672
  /**
657
673
  *
658
674
  * @return {FluentFiltersOrRelationsCondition}
@@ -1645,7 +1661,15 @@ export declare class FluentFiltersGetter extends FluentBase {
1645
1661
  *
1646
1662
  * @return {FluentFiltersOrRelationsGetter}
1647
1663
  */
1648
- col(index: number): FluentFiltersOrRelationsGetter;
1664
+ column(index: number): FluentFiltersOrRelationsGetter;
1665
+ /**
1666
+ *
1667
+ * @param {number} row_index - row index
1668
+ * @param {number} column_index - column index
1669
+ *
1670
+ * @return {FluentFiltersOrRelationsGetter}
1671
+ */
1672
+ cell(row_index: number, column_index: number): FluentFiltersOrRelationsGetter;
1649
1673
  /**
1650
1674
  *
1651
1675
  * @return {FluentFiltersOrRelationsGetter}
@@ -175,12 +175,28 @@ class FluentFilters extends FluentBase {
175
175
  *
176
176
  * @return {FluentFiltersOrRelations}
177
177
  */
178
- col(index) {
178
+ column(index) {
179
179
  this._textStr = '';
180
- this._textStr += 'col';
180
+ this._textStr += 'column';
181
181
  this._textStr += ` ${index}`;
182
182
  return new FluentFiltersOrRelations(this);
183
183
  }
184
+ /**
185
+ *
186
+ * @param {number} row_index - row index
187
+ * @param {number} column_index - column index
188
+ *
189
+ * @return {FluentFiltersOrRelations}
190
+ */
191
+ cell(row_index, column_index) {
192
+ this._textStr = '';
193
+ this._textStr += 'cell';
194
+ this._textStr += ' row';
195
+ this._textStr += ` ${row_index}`;
196
+ this._textStr += ' column';
197
+ this._textStr += ` ${column_index}`;
198
+ return new FluentFiltersOrRelations(this);
199
+ }
184
200
  /**
185
201
  *
186
202
  * @return {FluentFiltersOrRelations}
@@ -879,12 +895,28 @@ class FluentFiltersCondition extends FluentBase {
879
895
  *
880
896
  * @return {FluentFiltersOrRelationsCondition}
881
897
  */
882
- col(index) {
898
+ column(index) {
883
899
  this._textStr = '';
884
- this._textStr += 'col';
900
+ this._textStr += 'column';
885
901
  this._textStr += ` ${index}`;
886
902
  return new FluentFiltersOrRelationsCondition(this);
887
903
  }
904
+ /**
905
+ *
906
+ * @param {number} row_index - row index
907
+ * @param {number} column_index - column index
908
+ *
909
+ * @return {FluentFiltersOrRelationsCondition}
910
+ */
911
+ cell(row_index, column_index) {
912
+ this._textStr = '';
913
+ this._textStr += 'cell';
914
+ this._textStr += ' row';
915
+ this._textStr += ` ${row_index}`;
916
+ this._textStr += ' column';
917
+ this._textStr += ` ${column_index}`;
918
+ return new FluentFiltersOrRelationsCondition(this);
919
+ }
888
920
  /**
889
921
  *
890
922
  * @return {FluentFiltersOrRelationsCondition}
@@ -2206,12 +2238,28 @@ class FluentFiltersGetter extends FluentBase {
2206
2238
  *
2207
2239
  * @return {FluentFiltersOrRelationsGetter}
2208
2240
  */
2209
- col(index) {
2241
+ column(index) {
2210
2242
  this._textStr = '';
2211
- this._textStr += 'col';
2243
+ this._textStr += 'column';
2212
2244
  this._textStr += ` ${index}`;
2213
2245
  return new FluentFiltersOrRelationsGetter(this);
2214
2246
  }
2247
+ /**
2248
+ *
2249
+ * @param {number} row_index - row index
2250
+ * @param {number} column_index - column index
2251
+ *
2252
+ * @return {FluentFiltersOrRelationsGetter}
2253
+ */
2254
+ cell(row_index, column_index) {
2255
+ this._textStr = '';
2256
+ this._textStr += 'cell';
2257
+ this._textStr += ' row';
2258
+ this._textStr += ` ${row_index}`;
2259
+ this._textStr += ' column';
2260
+ this._textStr += ` ${column_index}`;
2261
+ return new FluentFiltersOrRelationsGetter(this);
2262
+ }
2215
2263
  /**
2216
2264
  *
2217
2265
  * @return {FluentFiltersOrRelationsGetter}
@@ -1,2 +1 @@
1
- export { AnnotationLevel } from './annotation-level';
2
1
  export { UiControlClient } from './ui-control-client';
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UiControlClient = exports.AnnotationLevel = void 0;
4
- var annotation_level_1 = require("./annotation-level");
5
- Object.defineProperty(exports, "AnnotationLevel", { enumerable: true, get: function () { return annotation_level_1.AnnotationLevel; } });
3
+ exports.UiControlClient = void 0;
6
4
  var ui_control_client_1 = require("./ui-control-client");
7
5
  Object.defineProperty(exports, "UiControlClient", { enumerable: true, get: function () { return ui_control_client_1.UiControlClient; } });
@@ -16,7 +16,6 @@ const inference_client_1 = require("./inference-client");
16
16
  const read_environment_credentials_1 = require("./read-environment-credentials");
17
17
  const analytics_1 = require("../utils/analytics");
18
18
  const proxy_builder_1 = require("../utils/proxy/proxy-builder");
19
- const annotation_level_1 = require("./annotation-level");
20
19
  const execution_runtime_1 = require("./execution-runtime");
21
20
  const reporting_1 = require("../core/reporting");
22
21
  class UiControlClientDependencyBuilder {
@@ -63,9 +62,9 @@ class UiControlClientDependencyBuilder {
63
62
  };
64
63
  }
65
64
  static getClientArgsWithDefaults(clientArgs) {
66
- var _a, _b, _c, _d, _e;
65
+ var _a, _b, _c, _d;
67
66
  return __awaiter(this, void 0, void 0, function* () {
68
- return Object.assign(Object.assign({}, clientArgs), { uiControllerUrl: (_a = clientArgs.uiControllerUrl) !== null && _a !== void 0 ? _a : 'http://127.0.0.1:6769', inferenceServerUrl: (_b = clientArgs.inferenceServerUrl) !== null && _b !== void 0 ? _b : 'https://inference.askui.com', annotationLevel: (_c = clientArgs.annotationLevel) !== null && _c !== void 0 ? _c : annotation_level_1.AnnotationLevel.DISABLED, credentials: (_d = clientArgs.credentials) !== null && _d !== void 0 ? _d : (0, read_environment_credentials_1.envCredentials)(), proxyAgents: (_e = clientArgs.proxyAgents) !== null && _e !== void 0 ? _e : yield (0, proxy_builder_1.envProxyAgents)(), reporter: UiControlClientDependencyBuilder.buildReporter(clientArgs.reporter) });
67
+ return Object.assign(Object.assign({}, clientArgs), { uiControllerUrl: (_a = clientArgs.uiControllerUrl) !== null && _a !== void 0 ? _a : 'http://127.0.0.1:6769', inferenceServerUrl: (_b = clientArgs.inferenceServerUrl) !== null && _b !== void 0 ? _b : 'https://inference.askui.com', credentials: (_c = clientArgs.credentials) !== null && _c !== void 0 ? _c : (0, read_environment_credentials_1.envCredentials)(), proxyAgents: (_d = clientArgs.proxyAgents) !== null && _d !== void 0 ? _d : yield (0, proxy_builder_1.envProxyAgents)(), reporter: UiControlClientDependencyBuilder.buildReporter(clientArgs.reporter) });
69
68
  });
70
69
  }
71
70
  }
@@ -6,7 +6,6 @@ import { AnnotationRequest } from '../core/model/annotation-result/annotation-in
6
6
  import { DetectedElement } from '../core/model/annotation-result/detected-element';
7
7
  import { ClientArgs } from './ui-controller-client-interface';
8
8
  export declare class UiControlClient extends ApiCommands {
9
- private config;
10
9
  private executionRuntime;
11
10
  private stepReporter;
12
11
  private constructor();
@@ -28,7 +27,6 @@ export declare class UiControlClient extends ApiCommands {
28
27
  startVideoRecording(): Promise<void>;
29
28
  stopVideoRecording(): Promise<void>;
30
29
  readVideoRecording(): Promise<string>;
31
- private shouldWriteAnntotationAfterCommandExecution;
32
30
  private shouldAnnotateAfterCommandExecution;
33
31
  private afterCommandExecution;
34
32
  annotate(annotationRequest?: AnnotationRequest): Promise<Annotation>;
@@ -14,13 +14,10 @@ const custom_element_1 = require("../core/model/custom-element");
14
14
  const dsl_1 = require("./dsl");
15
15
  const annotation_writer_1 = require("../core/annotation/annotation-writer");
16
16
  const logger_1 = require("../lib/logger");
17
- const annotation_level_1 = require("./annotation-level");
18
- const ui_control_client_error_1 = require("./ui-control-client-error");
19
17
  const ui_control_client_dependency_builder_1 = require("./ui-control-client-dependency-builder");
20
18
  class UiControlClient extends dsl_1.ApiCommands {
21
- constructor(config, executionRuntime, stepReporter) {
19
+ constructor(executionRuntime, stepReporter) {
22
20
  super();
23
- this.config = config;
24
21
  this.executionRuntime = executionRuntime;
25
22
  this.stepReporter = stepReporter;
26
23
  this.secretText = undefined;
@@ -30,9 +27,7 @@ class UiControlClient extends dsl_1.ApiCommands {
30
27
  const builder = ui_control_client_dependency_builder_1.UiControlClientDependencyBuilder;
31
28
  const clientArgsWithDefaults = yield builder.getClientArgsWithDefaults(clientArgs);
32
29
  const { executionRuntime, stepReporter } = yield builder.build(clientArgsWithDefaults);
33
- return new UiControlClient({
34
- annotationLevel: clientArgsWithDefaults.annotationLevel,
35
- }, executionRuntime, stepReporter);
30
+ return new UiControlClient(executionRuntime, stepReporter);
36
31
  });
37
32
  }
38
33
  /**
@@ -72,14 +67,8 @@ class UiControlClient extends dsl_1.ApiCommands {
72
67
  return this.executionRuntime.readVideoRecording();
73
68
  });
74
69
  }
75
- shouldWriteAnntotationAfterCommandExecution(error) {
76
- const { annotationLevel } = this.config;
77
- return annotationLevel === annotation_level_1.AnnotationLevel.ALL
78
- || (annotationLevel === annotation_level_1.AnnotationLevel.ON_FAILURE && error !== undefined);
79
- }
80
70
  shouldAnnotateAfterCommandExecution(error) {
81
- return this.shouldWriteAnntotationAfterCommandExecution(error)
82
- || (this.stepReporter.config.withDetectedElements === 'onFailure' && error !== undefined)
71
+ return (this.stepReporter.config.withDetectedElements === 'onFailure' && error !== undefined)
83
72
  || (this.stepReporter.config.withDetectedElements === 'always');
84
73
  }
85
74
  afterCommandExecution(instruction, error) {
@@ -91,9 +80,6 @@ class UiControlClient extends dsl_1.ApiCommands {
91
80
  if (this.shouldAnnotateAfterCommandExecution(error)) {
92
81
  annotation = yield this.executionRuntime.annotateImage(undefined, instruction.customElements);
93
82
  }
94
- if (annotation !== undefined && this.shouldWriteAnntotationAfterCommandExecution(error)) {
95
- annotation_writer_1.AnnotationWriter.write(annotation.toHtml(), undefined, `${error !== undefined ? 'failed' : 'passed'}_testStep_annotation`);
96
- }
97
83
  if (annotation !== undefined || this.stepReporter.config.withScreenshots === 'always') {
98
84
  screenshot = (_a = annotation === null || annotation === void 0 ? void 0 : annotation.image) !== null && _a !== void 0 ? _a : yield this.executionRuntime.getScreenshot();
99
85
  }
@@ -147,7 +133,7 @@ class UiControlClient extends dsl_1.ApiCommands {
147
133
  }
148
134
  catch (error) {
149
135
  yield this.afterCommandExecution(instruction, error instanceof Error ? error : new Error(String(error)));
150
- return Promise.reject(new ui_control_client_error_1.UiControlClientError(`A problem occurred while executing the instruction: ${instruction.valueHumanReadable}. Reason ${error}`));
136
+ return Promise.reject(error);
151
137
  }
152
138
  });
153
139
  }
@@ -0,0 +1,3 @@
1
+ export declare class UiControllerClientError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UiControllerClientError = void 0;
4
+ class UiControllerClientError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'UiControllerClientError';
8
+ }
9
+ }
10
+ exports.UiControllerClientError = UiControllerClientError;
@@ -1,8 +1,7 @@
1
- import { AnnotationLevel } from './annotation-level';
2
1
  import { CredentialArgs } from './credentials-args';
3
2
  import { ProxyAgentArgs } from '../shared/proxy-agent-args';
4
3
  import { ModelCompositionBranch } from './model-composition-branch';
5
- import { Reporter, ReporterConfig } from '@/core/reporting';
4
+ import { Reporter, ReporterConfig } from '../core/reporting';
6
5
  /**
7
6
  * Configuration options for the askui UI Control Client
8
7
  *
@@ -18,10 +17,6 @@ import { Reporter, ReporterConfig } from '@/core/reporting';
18
17
  * But it can cause a decrease in the prediction quality.
19
18
  * @param {string} inferenceServerUrl - Default: https://inference.askui.com`
20
19
  * Address of the askui Inference server.
21
- * @param {AnnotationLevel} annotationLevel - Default: AnnotationLevel.DISABLED
22
- * Usage of annotate command
23
- * after execution of test steps.
24
- * You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
25
20
  * @param {CredentialArgs} credentials - We need to provide credentials for
26
21
  * the authentication of the askui Inference Server.
27
22
  * You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
@@ -31,7 +26,6 @@ import { Reporter, ReporterConfig } from '@/core/reporting';
31
26
  export interface ClientArgs {
32
27
  readonly uiControllerUrl?: string;
33
28
  readonly inferenceServerUrl?: string;
34
- readonly annotationLevel?: AnnotationLevel;
35
29
  readonly credentials?: CredentialArgs | undefined;
36
30
  readonly proxyAgents?: ProxyAgentArgs | undefined;
37
31
  readonly resize?: number;
@@ -41,11 +35,7 @@ export interface ClientArgs {
41
35
  export interface ClientArgsWithDefaults extends ClientArgs {
42
36
  readonly uiControllerUrl: string;
43
37
  readonly inferenceServerUrl: string;
44
- readonly annotationLevel: AnnotationLevel;
45
38
  readonly reporter: Required<Reporter> & {
46
39
  config: Required<ReporterConfig>;
47
40
  };
48
41
  }
49
- export interface UiControlClientConfig {
50
- annotationLevel: AnnotationLevel;
51
- }
@@ -9,7 +9,7 @@ const runner_protocol_1 = require("../core/runner-protocol");
9
9
  const logger_1 = require("../lib/logger");
10
10
  const ui_controller_client_connection_state_1 = require("./ui-controller-client-connection-state");
11
11
  const read_recording_response_stream_handler_1 = require("./read-recording-response-stream-handler");
12
- const ui_control_client_error_1 = require("./ui-control-client-error");
12
+ const ui_controller_client_error_1 = require("./ui-controller-client-error");
13
13
  class UiControllerClient {
14
14
  constructor(url) {
15
15
  this.url = url;
@@ -47,13 +47,13 @@ class UiControllerClient {
47
47
  });
48
48
  this.ws.on('error', (error) => {
49
49
  this.connectionState = ui_controller_client_connection_state_1.UiControllerClientConnectionState.ERROR;
50
- reject(new ui_control_client_error_1.UiControlClientError(`Connection to UI Controller cannot be established,
50
+ reject(new ui_controller_client_error_1.UiControllerClientError(`Connection to UI Controller cannot be established,
51
51
  Probably it was not started. Make sure you started UI Controller with this
52
- Url ${this.url}. Error message ${error.message}`));
52
+ Url ${this.url}. Cause: ${error}`));
53
53
  });
54
54
  }
55
55
  catch (error) {
56
- reject(new ui_control_client_error_1.UiControlClientError(`Connection to UI Controller cannot be established. Reason: ${error}`));
56
+ reject(new ui_controller_client_error_1.UiControllerClientError(`Connection to UI Controller cannot be established. Cause: ${error}`));
57
57
  }
58
58
  });
59
59
  }
@@ -67,17 +67,16 @@ class UiControllerClient {
67
67
  this.currentReject = reject;
68
68
  try {
69
69
  this.send(msg, requestTimeout);
70
- this.timeout = setTimeout(() => this.currentReject(`Request to UI Controller timed out.
71
- It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.`), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
70
+ this.timeout = setTimeout(() => this.currentReject(new ui_controller_client_error_1.UiControllerClientError('Request to UI Controller timed out. It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.')), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
72
71
  }
73
72
  catch (error) {
74
- this.currentReject(`The communication to the UI Controller is broken. Reason: ${error}`);
73
+ this.currentReject(new ui_controller_client_error_1.UiControllerClientError(`The communication to the UI Controller is broken. Cause: ${error}`));
75
74
  }
76
75
  });
77
76
  }
78
77
  send(msg, _requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
79
78
  if (!this.currentReject || !this.currentResolve) {
80
- throw Error('Request is not finished! It is not possible to have multiple requests at the same time.');
79
+ throw new ui_controller_client_error_1.UiControllerClientError('Request is not finished! It is not possible to have multiple requests at the same time.');
81
80
  }
82
81
  logger_1.logger.debug(`Send: ${JSON.stringify(msg.msgName)}`);
83
82
  this.ws.send(JSON.stringify(msg));
@@ -54,7 +54,7 @@ function getBinaryFilePath(version) {
54
54
  }
55
55
  exports.getBinaryFilePath = getBinaryFilePath;
56
56
  function getBinaryDownloadUrl(binaryVersion) {
57
- const baseUrl = `https://askui-public.s3.eu-central-1.amazonaws.com/releases/askui-ui-controller/${binaryVersion}`;
57
+ const baseUrl = `https://files.askui.com/releases/askui-ui-controller/${binaryVersion}`;
58
58
  const arch = os_1.default.arch();
59
59
  return `${baseUrl}/${platform()}/${arch}/${binarySubPathsByPlatform[platform()][1]}`;
60
60
  }
@@ -1,4 +1,6 @@
1
1
  export { UiController } from './lib';
2
- export { AnnotationLevel, UiControlClient } from './execution';
2
+ export { UiControlClient } from './execution';
3
3
  export { Instruction, Reporter, ReporterConfig, Snapshot, SnapshotDetailLevel, Step, StepStatus, StepStatusEnd, } from './core/reporting';
4
+ export { Annotation } from './core/annotation/annotation';
5
+ export { DetectedElement } from './core/model/annotation-result/detected-element';
4
6
  export { LogLevels } from './shared';
package/dist/cjs/main.js CHANGED
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogLevels = exports.UiControlClient = exports.AnnotationLevel = exports.UiController = void 0;
3
+ exports.LogLevels = exports.DetectedElement = exports.Annotation = exports.UiControlClient = exports.UiController = void 0;
4
4
  var lib_1 = require("./lib");
5
5
  Object.defineProperty(exports, "UiController", { enumerable: true, get: function () { return lib_1.UiController; } });
6
6
  var execution_1 = require("./execution");
7
- Object.defineProperty(exports, "AnnotationLevel", { enumerable: true, get: function () { return execution_1.AnnotationLevel; } });
8
7
  Object.defineProperty(exports, "UiControlClient", { enumerable: true, get: function () { return execution_1.UiControlClient; } });
8
+ var annotation_1 = require("./core/annotation/annotation");
9
+ Object.defineProperty(exports, "Annotation", { enumerable: true, get: function () { return annotation_1.Annotation; } });
10
+ var detected_element_1 = require("./core/model/annotation-result/detected-element");
11
+ Object.defineProperty(exports, "DetectedElement", { enumerable: true, get: function () { return detected_element_1.DetectedElement; } });
9
12
  var shared_1 = require("./shared");
10
13
  Object.defineProperty(exports, "LogLevels", { enumerable: true, get: function () { return shared_1.LogLevels; } });
@@ -1,3 +1,4 @@
1
+ import { ControlCommandError } from '../../execution/control-command-error';
1
2
  export class DefaultStep {
2
3
  constructor(instruction) {
3
4
  this.instruction = instruction;
@@ -63,9 +64,12 @@ export class DefaultStep {
63
64
  return this;
64
65
  }
65
66
  static determineLastRunStatus(error) {
66
- if (error !== undefined) {
67
+ if (error instanceof ControlCommandError) {
67
68
  return 'failed';
68
69
  }
70
+ if (error !== undefined) {
71
+ return 'erroneous';
72
+ }
69
73
  return 'passed';
70
74
  }
71
75
  }
@@ -1,4 +1,4 @@
1
- import { CustomElement } from '@/core/model/custom-element';
1
+ import { CustomElement } from '../model/custom-element';
2
2
  export interface Instruction {
3
3
  readonly value: string;
4
4
  readonly valueHumanReadable: string;
@@ -104,7 +104,15 @@ export declare class FluentFilters extends FluentBase {
104
104
  *
105
105
  * @return {FluentFiltersOrRelations}
106
106
  */
107
- col(index: number): FluentFiltersOrRelations;
107
+ column(index: number): FluentFiltersOrRelations;
108
+ /**
109
+ *
110
+ * @param {number} row_index - row index
111
+ * @param {number} column_index - column index
112
+ *
113
+ * @return {FluentFiltersOrRelations}
114
+ */
115
+ cell(row_index: number, column_index: number): FluentFiltersOrRelations;
108
116
  /**
109
117
  *
110
118
  * @return {FluentFiltersOrRelations}
@@ -652,7 +660,15 @@ export declare class FluentFiltersCondition extends FluentBase {
652
660
  *
653
661
  * @return {FluentFiltersOrRelationsCondition}
654
662
  */
655
- col(index: number): FluentFiltersOrRelationsCondition;
663
+ column(index: number): FluentFiltersOrRelationsCondition;
664
+ /**
665
+ *
666
+ * @param {number} row_index - row index
667
+ * @param {number} column_index - column index
668
+ *
669
+ * @return {FluentFiltersOrRelationsCondition}
670
+ */
671
+ cell(row_index: number, column_index: number): FluentFiltersOrRelationsCondition;
656
672
  /**
657
673
  *
658
674
  * @return {FluentFiltersOrRelationsCondition}
@@ -1645,7 +1661,15 @@ export declare class FluentFiltersGetter extends FluentBase {
1645
1661
  *
1646
1662
  * @return {FluentFiltersOrRelationsGetter}
1647
1663
  */
1648
- col(index: number): FluentFiltersOrRelationsGetter;
1664
+ column(index: number): FluentFiltersOrRelationsGetter;
1665
+ /**
1666
+ *
1667
+ * @param {number} row_index - row index
1668
+ * @param {number} column_index - column index
1669
+ *
1670
+ * @return {FluentFiltersOrRelationsGetter}
1671
+ */
1672
+ cell(row_index: number, column_index: number): FluentFiltersOrRelationsGetter;
1649
1673
  /**
1650
1674
  *
1651
1675
  * @return {FluentFiltersOrRelationsGetter}
@@ -171,12 +171,28 @@ export class FluentFilters extends FluentBase {
171
171
  *
172
172
  * @return {FluentFiltersOrRelations}
173
173
  */
174
- col(index) {
174
+ column(index) {
175
175
  this._textStr = '';
176
- this._textStr += 'col';
176
+ this._textStr += 'column';
177
177
  this._textStr += ` ${index}`;
178
178
  return new FluentFiltersOrRelations(this);
179
179
  }
180
+ /**
181
+ *
182
+ * @param {number} row_index - row index
183
+ * @param {number} column_index - column index
184
+ *
185
+ * @return {FluentFiltersOrRelations}
186
+ */
187
+ cell(row_index, column_index) {
188
+ this._textStr = '';
189
+ this._textStr += 'cell';
190
+ this._textStr += ' row';
191
+ this._textStr += ` ${row_index}`;
192
+ this._textStr += ' column';
193
+ this._textStr += ` ${column_index}`;
194
+ return new FluentFiltersOrRelations(this);
195
+ }
180
196
  /**
181
197
  *
182
198
  * @return {FluentFiltersOrRelations}
@@ -873,12 +889,28 @@ export class FluentFiltersCondition extends FluentBase {
873
889
  *
874
890
  * @return {FluentFiltersOrRelationsCondition}
875
891
  */
876
- col(index) {
892
+ column(index) {
877
893
  this._textStr = '';
878
- this._textStr += 'col';
894
+ this._textStr += 'column';
879
895
  this._textStr += ` ${index}`;
880
896
  return new FluentFiltersOrRelationsCondition(this);
881
897
  }
898
+ /**
899
+ *
900
+ * @param {number} row_index - row index
901
+ * @param {number} column_index - column index
902
+ *
903
+ * @return {FluentFiltersOrRelationsCondition}
904
+ */
905
+ cell(row_index, column_index) {
906
+ this._textStr = '';
907
+ this._textStr += 'cell';
908
+ this._textStr += ' row';
909
+ this._textStr += ` ${row_index}`;
910
+ this._textStr += ' column';
911
+ this._textStr += ` ${column_index}`;
912
+ return new FluentFiltersOrRelationsCondition(this);
913
+ }
882
914
  /**
883
915
  *
884
916
  * @return {FluentFiltersOrRelationsCondition}
@@ -2196,12 +2228,28 @@ export class FluentFiltersGetter extends FluentBase {
2196
2228
  *
2197
2229
  * @return {FluentFiltersOrRelationsGetter}
2198
2230
  */
2199
- col(index) {
2231
+ column(index) {
2200
2232
  this._textStr = '';
2201
- this._textStr += 'col';
2233
+ this._textStr += 'column';
2202
2234
  this._textStr += ` ${index}`;
2203
2235
  return new FluentFiltersOrRelationsGetter(this);
2204
2236
  }
2237
+ /**
2238
+ *
2239
+ * @param {number} row_index - row index
2240
+ * @param {number} column_index - column index
2241
+ *
2242
+ * @return {FluentFiltersOrRelationsGetter}
2243
+ */
2244
+ cell(row_index, column_index) {
2245
+ this._textStr = '';
2246
+ this._textStr += 'cell';
2247
+ this._textStr += ' row';
2248
+ this._textStr += ` ${row_index}`;
2249
+ this._textStr += ' column';
2250
+ this._textStr += ` ${column_index}`;
2251
+ return new FluentFiltersOrRelationsGetter(this);
2252
+ }
2205
2253
  /**
2206
2254
  *
2207
2255
  * @return {FluentFiltersOrRelationsGetter}
@@ -1,2 +1 @@
1
- export { AnnotationLevel } from './annotation-level';
2
1
  export { UiControlClient } from './ui-control-client';
@@ -1,2 +1 @@
1
- export { AnnotationLevel } from './annotation-level';
2
1
  export { UiControlClient } from './ui-control-client';
@@ -13,7 +13,6 @@ import { InferenceClient } from './inference-client';
13
13
  import { envCredentials } from './read-environment-credentials';
14
14
  import { Analytics } from '../utils/analytics';
15
15
  import { envProxyAgents } from '../utils/proxy/proxy-builder';
16
- import { AnnotationLevel } from './annotation-level';
17
16
  import { ExecutionRuntime } from './execution-runtime';
18
17
  import { DEFAULT_REPORTER, StepReporter, } from '../core/reporting';
19
18
  export class UiControlClientDependencyBuilder {
@@ -60,9 +59,9 @@ export class UiControlClientDependencyBuilder {
60
59
  };
61
60
  }
62
61
  static getClientArgsWithDefaults(clientArgs) {
63
- var _a, _b, _c, _d, _e;
62
+ var _a, _b, _c, _d;
64
63
  return __awaiter(this, void 0, void 0, function* () {
65
- return Object.assign(Object.assign({}, clientArgs), { uiControllerUrl: (_a = clientArgs.uiControllerUrl) !== null && _a !== void 0 ? _a : 'http://127.0.0.1:6769', inferenceServerUrl: (_b = clientArgs.inferenceServerUrl) !== null && _b !== void 0 ? _b : 'https://inference.askui.com', annotationLevel: (_c = clientArgs.annotationLevel) !== null && _c !== void 0 ? _c : AnnotationLevel.DISABLED, credentials: (_d = clientArgs.credentials) !== null && _d !== void 0 ? _d : envCredentials(), proxyAgents: (_e = clientArgs.proxyAgents) !== null && _e !== void 0 ? _e : yield envProxyAgents(), reporter: UiControlClientDependencyBuilder.buildReporter(clientArgs.reporter) });
64
+ return Object.assign(Object.assign({}, clientArgs), { uiControllerUrl: (_a = clientArgs.uiControllerUrl) !== null && _a !== void 0 ? _a : 'http://127.0.0.1:6769', inferenceServerUrl: (_b = clientArgs.inferenceServerUrl) !== null && _b !== void 0 ? _b : 'https://inference.askui.com', credentials: (_c = clientArgs.credentials) !== null && _c !== void 0 ? _c : envCredentials(), proxyAgents: (_d = clientArgs.proxyAgents) !== null && _d !== void 0 ? _d : yield envProxyAgents(), reporter: UiControlClientDependencyBuilder.buildReporter(clientArgs.reporter) });
66
65
  });
67
66
  }
68
67
  }
@@ -1,2 +1,3 @@
1
1
  export declare class UiControlClientError extends Error {
2
+ constructor(message: string);
2
3
  }
@@ -1,2 +1,6 @@
1
1
  export class UiControlClientError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = 'UiControlClientError';
5
+ }
2
6
  }
@@ -6,7 +6,6 @@ import { AnnotationRequest } from '../core/model/annotation-result/annotation-in
6
6
  import { DetectedElement } from '../core/model/annotation-result/detected-element';
7
7
  import { ClientArgs } from './ui-controller-client-interface';
8
8
  export declare class UiControlClient extends ApiCommands {
9
- private config;
10
9
  private executionRuntime;
11
10
  private stepReporter;
12
11
  private constructor();
@@ -28,7 +27,6 @@ export declare class UiControlClient extends ApiCommands {
28
27
  startVideoRecording(): Promise<void>;
29
28
  stopVideoRecording(): Promise<void>;
30
29
  readVideoRecording(): Promise<string>;
31
- private shouldWriteAnntotationAfterCommandExecution;
32
30
  private shouldAnnotateAfterCommandExecution;
33
31
  private afterCommandExecution;
34
32
  annotate(annotationRequest?: AnnotationRequest): Promise<Annotation>;
@@ -11,13 +11,10 @@ import { CustomElement } from '../core/model/custom-element';
11
11
  import { ApiCommands, Separators, } from './dsl';
12
12
  import { AnnotationWriter } from '../core/annotation/annotation-writer';
13
13
  import { logger } from '../lib/logger';
14
- import { AnnotationLevel } from './annotation-level';
15
- import { UiControlClientError } from './ui-control-client-error';
16
14
  import { UiControlClientDependencyBuilder } from './ui-control-client-dependency-builder';
17
15
  export class UiControlClient extends ApiCommands {
18
- constructor(config, executionRuntime, stepReporter) {
16
+ constructor(executionRuntime, stepReporter) {
19
17
  super();
20
- this.config = config;
21
18
  this.executionRuntime = executionRuntime;
22
19
  this.stepReporter = stepReporter;
23
20
  this.secretText = undefined;
@@ -27,9 +24,7 @@ export class UiControlClient extends ApiCommands {
27
24
  const builder = UiControlClientDependencyBuilder;
28
25
  const clientArgsWithDefaults = yield builder.getClientArgsWithDefaults(clientArgs);
29
26
  const { executionRuntime, stepReporter } = yield builder.build(clientArgsWithDefaults);
30
- return new UiControlClient({
31
- annotationLevel: clientArgsWithDefaults.annotationLevel,
32
- }, executionRuntime, stepReporter);
27
+ return new UiControlClient(executionRuntime, stepReporter);
33
28
  });
34
29
  }
35
30
  /**
@@ -69,14 +64,8 @@ export class UiControlClient extends ApiCommands {
69
64
  return this.executionRuntime.readVideoRecording();
70
65
  });
71
66
  }
72
- shouldWriteAnntotationAfterCommandExecution(error) {
73
- const { annotationLevel } = this.config;
74
- return annotationLevel === AnnotationLevel.ALL
75
- || (annotationLevel === AnnotationLevel.ON_FAILURE && error !== undefined);
76
- }
77
67
  shouldAnnotateAfterCommandExecution(error) {
78
- return this.shouldWriteAnntotationAfterCommandExecution(error)
79
- || (this.stepReporter.config.withDetectedElements === 'onFailure' && error !== undefined)
68
+ return (this.stepReporter.config.withDetectedElements === 'onFailure' && error !== undefined)
80
69
  || (this.stepReporter.config.withDetectedElements === 'always');
81
70
  }
82
71
  afterCommandExecution(instruction, error) {
@@ -88,9 +77,6 @@ export class UiControlClient extends ApiCommands {
88
77
  if (this.shouldAnnotateAfterCommandExecution(error)) {
89
78
  annotation = yield this.executionRuntime.annotateImage(undefined, instruction.customElements);
90
79
  }
91
- if (annotation !== undefined && this.shouldWriteAnntotationAfterCommandExecution(error)) {
92
- AnnotationWriter.write(annotation.toHtml(), undefined, `${error !== undefined ? 'failed' : 'passed'}_testStep_annotation`);
93
- }
94
80
  if (annotation !== undefined || this.stepReporter.config.withScreenshots === 'always') {
95
81
  screenshot = (_a = annotation === null || annotation === void 0 ? void 0 : annotation.image) !== null && _a !== void 0 ? _a : yield this.executionRuntime.getScreenshot();
96
82
  }
@@ -144,7 +130,7 @@ export class UiControlClient extends ApiCommands {
144
130
  }
145
131
  catch (error) {
146
132
  yield this.afterCommandExecution(instruction, error instanceof Error ? error : new Error(String(error)));
147
- return Promise.reject(new UiControlClientError(`A problem occurred while executing the instruction: ${instruction.valueHumanReadable}. Reason ${error}`));
133
+ return Promise.reject(error);
148
134
  }
149
135
  });
150
136
  }
@@ -0,0 +1,3 @@
1
+ export declare class UiControllerClientError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,6 @@
1
+ export class UiControllerClientError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = 'UiControllerClientError';
5
+ }
6
+ }
@@ -1,8 +1,7 @@
1
- import { AnnotationLevel } from './annotation-level';
2
1
  import { CredentialArgs } from './credentials-args';
3
2
  import { ProxyAgentArgs } from '../shared/proxy-agent-args';
4
3
  import { ModelCompositionBranch } from './model-composition-branch';
5
- import { Reporter, ReporterConfig } from '@/core/reporting';
4
+ import { Reporter, ReporterConfig } from '../core/reporting';
6
5
  /**
7
6
  * Configuration options for the askui UI Control Client
8
7
  *
@@ -18,10 +17,6 @@ import { Reporter, ReporterConfig } from '@/core/reporting';
18
17
  * But it can cause a decrease in the prediction quality.
19
18
  * @param {string} inferenceServerUrl - Default: https://inference.askui.com`
20
19
  * Address of the askui Inference server.
21
- * @param {AnnotationLevel} annotationLevel - Default: AnnotationLevel.DISABLED
22
- * Usage of annotate command
23
- * after execution of test steps.
24
- * You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
25
20
  * @param {CredentialArgs} credentials - We need to provide credentials for
26
21
  * the authentication of the askui Inference Server.
27
22
  * You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
@@ -31,7 +26,6 @@ import { Reporter, ReporterConfig } from '@/core/reporting';
31
26
  export interface ClientArgs {
32
27
  readonly uiControllerUrl?: string;
33
28
  readonly inferenceServerUrl?: string;
34
- readonly annotationLevel?: AnnotationLevel;
35
29
  readonly credentials?: CredentialArgs | undefined;
36
30
  readonly proxyAgents?: ProxyAgentArgs | undefined;
37
31
  readonly resize?: number;
@@ -41,11 +35,7 @@ export interface ClientArgs {
41
35
  export interface ClientArgsWithDefaults extends ClientArgs {
42
36
  readonly uiControllerUrl: string;
43
37
  readonly inferenceServerUrl: string;
44
- readonly annotationLevel: AnnotationLevel;
45
38
  readonly reporter: Required<Reporter> & {
46
39
  config: Required<ReporterConfig>;
47
40
  };
48
41
  }
49
- export interface UiControlClientConfig {
50
- annotationLevel: AnnotationLevel;
51
- }
@@ -3,7 +3,7 @@ import { CaptureScreenshotRequest, ControlRequest, StartRecordingRequest, StopRe
3
3
  import { logger } from '../lib/logger';
4
4
  import { UiControllerClientConnectionState } from './ui-controller-client-connection-state';
5
5
  import { ReadRecordingResponseStreamHandler } from './read-recording-response-stream-handler';
6
- import { UiControlClientError } from './ui-control-client-error';
6
+ import { UiControllerClientError } from './ui-controller-client-error';
7
7
  export class UiControllerClient {
8
8
  constructor(url) {
9
9
  this.url = url;
@@ -41,13 +41,13 @@ export class UiControllerClient {
41
41
  });
42
42
  this.ws.on('error', (error) => {
43
43
  this.connectionState = UiControllerClientConnectionState.ERROR;
44
- reject(new UiControlClientError(`Connection to UI Controller cannot be established,
44
+ reject(new UiControllerClientError(`Connection to UI Controller cannot be established,
45
45
  Probably it was not started. Make sure you started UI Controller with this
46
- Url ${this.url}. Error message ${error.message}`));
46
+ Url ${this.url}. Cause: ${error}`));
47
47
  });
48
48
  }
49
49
  catch (error) {
50
- reject(new UiControlClientError(`Connection to UI Controller cannot be established. Reason: ${error}`));
50
+ reject(new UiControllerClientError(`Connection to UI Controller cannot be established. Cause: ${error}`));
51
51
  }
52
52
  });
53
53
  }
@@ -61,17 +61,16 @@ export class UiControllerClient {
61
61
  this.currentReject = reject;
62
62
  try {
63
63
  this.send(msg, requestTimeout);
64
- this.timeout = setTimeout(() => this.currentReject(`Request to UI Controller timed out.
65
- It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.`), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
64
+ this.timeout = setTimeout(() => this.currentReject(new UiControllerClientError('Request to UI Controller timed out. It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.')), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
66
65
  }
67
66
  catch (error) {
68
- this.currentReject(`The communication to the UI Controller is broken. Reason: ${error}`);
67
+ this.currentReject(new UiControllerClientError(`The communication to the UI Controller is broken. Cause: ${error}`));
69
68
  }
70
69
  });
71
70
  }
72
71
  send(msg, _requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
73
72
  if (!this.currentReject || !this.currentResolve) {
74
- throw Error('Request is not finished! It is not possible to have multiple requests at the same time.');
73
+ throw new UiControllerClientError('Request is not finished! It is not possible to have multiple requests at the same time.');
75
74
  }
76
75
  logger.debug(`Send: ${JSON.stringify(msg.msgName)}`);
77
76
  this.ws.send(JSON.stringify(msg));
@@ -46,7 +46,7 @@ export function getBinaryFilePath(version) {
46
46
  return path.join(getPathToNodeModulesRoot(), 'release', version, ...binarySubPathsByPlatform[platform()]);
47
47
  }
48
48
  function getBinaryDownloadUrl(binaryVersion) {
49
- const baseUrl = `https://askui-public.s3.eu-central-1.amazonaws.com/releases/askui-ui-controller/${binaryVersion}`;
49
+ const baseUrl = `https://files.askui.com/releases/askui-ui-controller/${binaryVersion}`;
50
50
  const arch = os.arch();
51
51
  return `${baseUrl}/${platform()}/${arch}/${binarySubPathsByPlatform[platform()][1]}`;
52
52
  }
@@ -1,4 +1,6 @@
1
1
  export { UiController } from './lib';
2
- export { AnnotationLevel, UiControlClient } from './execution';
2
+ export { UiControlClient } from './execution';
3
3
  export { Instruction, Reporter, ReporterConfig, Snapshot, SnapshotDetailLevel, Step, StepStatus, StepStatusEnd, } from './core/reporting';
4
+ export { Annotation } from './core/annotation/annotation';
5
+ export { DetectedElement } from './core/model/annotation-result/detected-element';
4
6
  export { LogLevels } from './shared';
package/dist/esm/main.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { UiController } from './lib';
2
- export { AnnotationLevel, UiControlClient } from './execution';
2
+ export { UiControlClient } from './execution';
3
+ export { Annotation } from './core/annotation/annotation';
4
+ export { DetectedElement } from './core/model/annotation-result/detected-element';
3
5
  export { LogLevels } from './shared';
@@ -1,15 +1,15 @@
1
- # Askui first test
2
-
3
- Example to introduce how to use the askui lib.
4
- The lib is helps to control the operating system with
1
+ # AskUI First Run
2
+ Example of using the askui SDK.
3
+ The lib helps to control the operating system with
5
4
  commands.
6
- Using Jest as test framework to execute all tests.
5
+ Using Jest as runner framework to execute all your
6
+ AskUI workflows.
7
7
 
8
8
  ## Installation of Jest and Typescript
9
9
 
10
10
  Use following command to set up Jest:
11
11
  ```shell
12
- npm i -D jest @types/jest ts-jest typescript
12
+ npm i -D jest @types/jest ts-jest typescript
13
13
  ```
14
14
 
15
15
  ## How to execute the example
@@ -1,4 +1,6 @@
1
1
  import { UiControlClient, UiController } from 'askui';
2
+ import 'jest-allure-circus';
3
+ import { AskUIAllureStepReporter } from '@askui/askui-reporters';
2
4
 
3
5
  // Server for controlling the operating system
4
6
  let uiController: UiController;
@@ -25,13 +27,24 @@ beforeAll(async () => {
25
27
  workspaceId: '<your workspace id>',
26
28
  token: '<your access token>',
27
29
  },
30
+ reporter: new AskUIAllureStepReporter(),
28
31
  });
29
32
 
30
33
  await aui.connect();
31
34
  });
32
35
 
36
+ beforeEach(async () => {
37
+ await aui.startVideoRecording();
38
+ });
39
+
40
+ afterEach(async () => {
41
+ await aui.stopVideoRecording();
42
+ const video = await aui.readVideoRecording();
43
+ AskUIAllureStepReporter.createAllureAttachment(video);
44
+ });
45
+
33
46
  afterAll(async () => {
34
- aui.close();
47
+ aui.disconnect();
35
48
 
36
49
  await uiController.stop();
37
50
  });
@@ -2,7 +2,7 @@ import type { Config } from '@jest/types';
2
2
 
3
3
  const config: Config.InitialOptions = {
4
4
  preset: 'ts-jest',
5
- testEnvironment: 'node',
5
+ testEnvironment: 'jest-allure-circus',
6
6
  setupFilesAfterEnv: ['./helper/jest.setup.ts'],
7
7
  sandboxInjectedGlobals: [
8
8
  'Math',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askui",
3
- "version": "0.10.5",
3
+ "version": "0.11.1",
4
4
  "license": "MIT",
5
5
  "author": "askui GmbH <info@askui.com> (http://www.askui.com/)",
6
6
  "description": "Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on",