askui 0.10.0 → 0.10.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.
- package/dist/cjs/core/annotation/template.html +1 -11390
- package/dist/cjs/core/model/annotation-result/annotation-interface.d.ts +1 -1
- package/dist/cjs/core/model/custom-element-json.d.ts +75 -0
- package/dist/cjs/core/model/custom-element-json.js +2 -0
- package/dist/cjs/core/model/custom-element.d.ts +21 -0
- package/dist/cjs/core/model/custom-element.js +54 -0
- package/dist/cjs/core/reporting/default-reporter.d.ts +10 -0
- package/dist/cjs/core/reporting/default-reporter.js +12 -0
- package/dist/cjs/core/reporting/default-step.d.ts +24 -0
- package/dist/cjs/core/reporting/default-step.js +75 -0
- package/dist/cjs/core/reporting/index.d.ts +11 -0
- package/dist/cjs/core/reporting/index.js +23 -0
- package/dist/cjs/core/reporting/instruction.d.ts +7 -0
- package/dist/cjs/core/reporting/instruction.js +2 -0
- package/dist/cjs/core/reporting/reporter-config.d.ts +13 -0
- package/dist/cjs/core/reporting/reporter-config.js +2 -0
- package/dist/cjs/core/reporting/reporter.d.ts +14 -0
- package/dist/cjs/core/reporting/reporter.js +2 -0
- package/dist/cjs/core/reporting/snapshot-detail-level.d.ts +21 -0
- package/dist/cjs/core/reporting/snapshot-detail-level.js +2 -0
- package/dist/cjs/core/reporting/snapshot.d.ts +6 -0
- package/dist/cjs/core/reporting/snapshot.js +2 -0
- package/dist/cjs/core/reporting/step-reporter.d.ts +17 -0
- package/dist/cjs/core/reporting/step-reporter.js +64 -0
- package/dist/cjs/core/reporting/step-run.d.ts +9 -0
- package/dist/cjs/core/reporting/step-run.js +2 -0
- package/dist/cjs/core/reporting/step-status-end.d.ts +1 -0
- package/dist/cjs/core/reporting/step-status-end.js +2 -0
- package/dist/cjs/core/reporting/step-status.d.ts +13 -0
- package/dist/cjs/core/reporting/step-status.js +2 -0
- package/dist/cjs/core/reporting/step.d.ts +36 -0
- package/dist/cjs/core/reporting/step.js +2 -0
- package/dist/cjs/execution/dsl.d.ts +1 -1
- package/dist/cjs/execution/execution-runtime.d.ts +16 -9
- package/dist/cjs/execution/execution-runtime.js +79 -33
- package/dist/cjs/execution/inference-client.d.ts +1 -1
- package/dist/cjs/execution/reporter.d.ts +132 -0
- package/dist/cjs/execution/reporter.js +146 -0
- package/dist/cjs/execution/ui-control-client-dependency-builder.d.ts +14 -0
- package/dist/cjs/execution/ui-control-client-dependency-builder.js +72 -0
- package/dist/cjs/execution/ui-control-client.d.ts +27 -15
- package/dist/cjs/execution/ui-control-client.js +97 -67
- package/dist/cjs/execution/ui-controller-client-interface.d.ts +11 -2
- package/dist/cjs/execution/ui-controller-client.d.ts +4 -4
- package/dist/cjs/execution/ui-controller-client.js +6 -6
- package/dist/cjs/lib/ui-controller-facade.js +1 -1
- package/dist/cjs/main.d.ts +2 -1
- package/dist/cjs/main.js +2 -2
- package/dist/cjs/utils/proxy/proxy-builder.d.ts +1 -1
- package/dist/cjs/utils/proxy/proxy-builder.js +3 -3
- package/dist/esm/core/annotation/template.html +1 -11390
- package/dist/esm/core/model/annotation-result/annotation-interface.d.ts +1 -1
- package/dist/esm/core/model/custom-element-json.d.ts +75 -0
- package/dist/esm/core/model/custom-element-json.js +1 -0
- package/dist/esm/core/model/custom-element.d.ts +21 -0
- package/dist/esm/core/model/custom-element.js +50 -0
- package/dist/esm/core/reporting/default-reporter.d.ts +10 -0
- package/dist/esm/core/reporting/default-reporter.js +9 -0
- package/dist/esm/core/reporting/default-step.d.ts +24 -0
- package/dist/esm/core/reporting/default-step.js +71 -0
- package/dist/esm/core/reporting/index.d.ts +11 -0
- package/dist/esm/core/reporting/index.js +11 -0
- package/dist/esm/core/reporting/instruction.d.ts +7 -0
- package/dist/esm/core/reporting/instruction.js +1 -0
- package/dist/esm/core/reporting/reporter-config.d.ts +13 -0
- package/dist/esm/core/reporting/reporter-config.js +1 -0
- package/dist/esm/core/reporting/reporter.d.ts +14 -0
- package/dist/esm/core/reporting/reporter.js +1 -0
- package/dist/esm/core/reporting/snapshot-detail-level.d.ts +21 -0
- package/dist/esm/core/reporting/snapshot-detail-level.js +1 -0
- package/dist/esm/core/reporting/snapshot.d.ts +6 -0
- package/dist/esm/core/reporting/snapshot.js +1 -0
- package/dist/esm/core/reporting/step-reporter.d.ts +17 -0
- package/dist/esm/core/reporting/step-reporter.js +60 -0
- package/dist/esm/core/reporting/step-run.d.ts +9 -0
- package/dist/esm/core/reporting/step-run.js +1 -0
- package/dist/esm/core/reporting/step-status-end.d.ts +1 -0
- package/dist/esm/core/reporting/step-status-end.js +1 -0
- package/dist/esm/core/reporting/step-status.d.ts +13 -0
- package/dist/esm/core/reporting/step-status.js +1 -0
- package/dist/esm/core/reporting/step.d.ts +36 -0
- package/dist/esm/core/reporting/step.js +1 -0
- package/dist/esm/execution/dsl.d.ts +1 -1
- package/dist/esm/execution/execution-runtime.d.ts +16 -9
- package/dist/esm/execution/execution-runtime.js +77 -31
- package/dist/esm/execution/inference-client.d.ts +1 -1
- package/dist/esm/execution/reporter.d.ts +132 -0
- package/dist/esm/execution/reporter.js +142 -0
- package/dist/esm/execution/ui-control-client-dependency-builder.d.ts +14 -0
- package/dist/esm/execution/ui-control-client-dependency-builder.js +68 -0
- package/dist/esm/execution/ui-control-client.d.ts +27 -15
- package/dist/esm/execution/ui-control-client.js +96 -66
- package/dist/esm/execution/ui-controller-client-interface.d.ts +11 -2
- package/dist/esm/execution/ui-controller-client.d.ts +4 -4
- package/dist/esm/execution/ui-controller-client.js +6 -6
- package/dist/esm/lib/ui-controller-facade.js +2 -2
- package/dist/esm/main.d.ts +2 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/utils/proxy/proxy-builder.d.ts +1 -1
- package/dist/esm/utils/proxy/proxy-builder.js +1 -1
- package/dist/example_projects_templates/typescript_jest/test/my-first-askui-test-suite.test.ts +9 -2
- package/package.json +1 -1
|
@@ -7,71 +7,98 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { CustomElement } from '../core/model/
|
|
10
|
+
import { CustomElement } from '../core/model/custom-element';
|
|
11
11
|
import { ApiCommands, Separators, } from './dsl';
|
|
12
|
-
import { HttpClientGot } from '../utils/http/http-client-got';
|
|
13
|
-
import { UiControllerClient } from './ui-controller-client';
|
|
14
|
-
import { ExecutionRuntime } from './execution-runtime';
|
|
15
|
-
import { InferenceClient } from './inference-client';
|
|
16
12
|
import { AnnotationWriter } from '../core/annotation/annotation-writer';
|
|
17
13
|
import { logger } from '../lib/logger';
|
|
18
|
-
import { TestStepState } from '../core/model/test-case-result-dto';
|
|
19
14
|
import { AnnotationLevel } from './annotation-level';
|
|
20
15
|
import { UiControlClientError } from './ui-control-client-error';
|
|
21
|
-
import {
|
|
22
|
-
import { Analytics } from '../utils/analytics';
|
|
23
|
-
import { buildProxyAgentArgsFromEnvironment } from '../utils/proxy/proxy-builder';
|
|
24
|
-
const getClientArgsWithDefaults = (clientArgs = {}) => (Object.assign({ uiControllerUrl: 'http://127.0.0.1:6769', inferenceServerUrl: 'https://inference.askui.com', annotationLevel: AnnotationLevel.DISABLED }, clientArgs));
|
|
16
|
+
import { UiControlClientDependencyBuilder } from './ui-control-client-dependency-builder';
|
|
25
17
|
export class UiControlClient extends ApiCommands {
|
|
26
|
-
constructor(
|
|
18
|
+
constructor(config, executionRuntime, stepReporter) {
|
|
27
19
|
super();
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
20
|
+
this.config = config;
|
|
21
|
+
this.executionRuntime = executionRuntime;
|
|
22
|
+
this.stepReporter = stepReporter;
|
|
31
23
|
this.secretText = undefined;
|
|
32
24
|
}
|
|
33
|
-
static build(clientArgs) {
|
|
25
|
+
static build(clientArgs = {}) {
|
|
34
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const httpClient = new HttpClientGot(credentialArgs === null || credentialArgs === void 0 ? void 0 : credentialArgs.token, analyticsHeaders, analyticsCookies, proxyAgentArgs);
|
|
42
|
-
return new UiControlClient(httpClient, cas, credentialArgs === null || credentialArgs === void 0 ? void 0 : credentialArgs.workspaceId);
|
|
27
|
+
const builder = UiControlClientDependencyBuilder;
|
|
28
|
+
const clientArgsWithDefaults = yield builder.getClientArgsWithDefaults(clientArgs);
|
|
29
|
+
const { executionRuntime, stepReporter } = yield builder.build(clientArgsWithDefaults);
|
|
30
|
+
return new UiControlClient({
|
|
31
|
+
annotationLevel: clientArgsWithDefaults.annotationLevel,
|
|
32
|
+
}, executionRuntime, stepReporter);
|
|
43
33
|
});
|
|
44
34
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return this
|
|
35
|
+
/**
|
|
36
|
+
* Connects to the askui UI Controller.
|
|
37
|
+
*/
|
|
38
|
+
connect() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return this.executionRuntime.connect();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Disconnects from the askui UI Controller.
|
|
45
|
+
*/
|
|
46
|
+
disconnect() {
|
|
47
|
+
this.executionRuntime.disconnect();
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Disconnects from the askui UI Controller.
|
|
51
|
+
*
|
|
52
|
+
* @deprecated Use {@link disconnect} instead.
|
|
53
|
+
*/
|
|
54
|
+
close() {
|
|
55
|
+
this.disconnect();
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
return
|
|
57
|
+
startVideoRecording() {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
yield this.executionRuntime.startVideoRecording();
|
|
60
|
+
});
|
|
56
61
|
}
|
|
57
|
-
|
|
62
|
+
stopVideoRecording() {
|
|
58
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
|
|
60
|
-
&& this.clientArgs.annotationLevel === AnnotationLevel.DISABLED)
|
|
61
|
-
|| (testStepState === TestStepState.PASSED
|
|
62
|
-
&& this.clientArgs.annotationLevel !== AnnotationLevel.ALL)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
yield this.annotate({
|
|
66
|
-
customElements,
|
|
67
|
-
fileNamePrefix: `${testStepState.toLowerCase()}_testStep_annotation`,
|
|
68
|
-
});
|
|
64
|
+
yield this.executionRuntime.stopVideoRecording();
|
|
69
65
|
});
|
|
70
66
|
}
|
|
71
|
-
|
|
67
|
+
readVideoRecording() {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
return this.executionRuntime.readVideoRecording();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
shouldWriteAnntotationAfterCommandExecution(error) {
|
|
73
|
+
const { annotationLevel } = this.config;
|
|
74
|
+
return annotationLevel === AnnotationLevel.ALL
|
|
75
|
+
|| (annotationLevel === AnnotationLevel.ON_FAILURE && error !== undefined);
|
|
76
|
+
}
|
|
77
|
+
shouldAnnotateAfterCommandExecution(error) {
|
|
78
|
+
return this.shouldWriteAnntotationAfterCommandExecution(error)
|
|
79
|
+
|| (this.stepReporter.config.withDetectedElements === 'onFailure' && error !== undefined)
|
|
80
|
+
|| (this.stepReporter.config.withDetectedElements === 'always');
|
|
81
|
+
}
|
|
82
|
+
afterCommandExecution(instruction, error) {
|
|
83
|
+
var _a;
|
|
72
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
const
|
|
74
|
-
|
|
85
|
+
const createdAt = new Date();
|
|
86
|
+
let annotation;
|
|
87
|
+
let screenshot;
|
|
88
|
+
if (this.shouldAnnotateAfterCommandExecution(error)) {
|
|
89
|
+
annotation = yield this.executionRuntime.annotateImage(undefined, instruction.customElements);
|
|
90
|
+
}
|
|
91
|
+
if (annotation !== undefined && this.shouldWriteAnntotationAfterCommandExecution(error)) {
|
|
92
|
+
AnnotationWriter.write(annotation.toHtml(), undefined, `${error !== undefined ? 'failed' : 'passed'}_testStep_annotation`);
|
|
93
|
+
}
|
|
94
|
+
if (annotation !== undefined || this.stepReporter.config.withScreenshots === 'always') {
|
|
95
|
+
screenshot = (_a = annotation === null || annotation === void 0 ? void 0 : annotation.image) !== null && _a !== void 0 ? _a : yield this.executionRuntime.getScreenshot();
|
|
96
|
+
}
|
|
97
|
+
yield this.stepReporter.onStepEnd({
|
|
98
|
+
createdAt,
|
|
99
|
+
detectedElements: annotation === null || annotation === void 0 ? void 0 : annotation.detected_elements,
|
|
100
|
+
screenshot,
|
|
101
|
+
}, error);
|
|
75
102
|
});
|
|
76
103
|
}
|
|
77
104
|
annotate(annotationRequest = {}) {
|
|
@@ -95,25 +122,29 @@ export class UiControlClient extends ApiCommands {
|
|
|
95
122
|
escapeSeparatorString(instruction) {
|
|
96
123
|
return instruction.split(Separators.STRING).join('"');
|
|
97
124
|
}
|
|
98
|
-
|
|
125
|
+
buildInstruction(instructionString, customElementJson = []) {
|
|
99
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
127
|
+
return {
|
|
128
|
+
customElements: yield CustomElement.fromJsonListWithImagePathOrImage(customElementJson),
|
|
129
|
+
value: instructionString,
|
|
130
|
+
secretText: this.getAndResetSecretText(),
|
|
131
|
+
valueHumanReadable: this.escapeSeparatorString(instructionString),
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
fluentCommandExecutor(instructionString, customElementJson = []) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const instruction = yield this.buildInstruction(instructionString, customElementJson);
|
|
138
|
+
logger.debug(instruction);
|
|
104
139
|
try {
|
|
105
|
-
yield this.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
secretText,
|
|
109
|
-
});
|
|
110
|
-
this.secretText = undefined;
|
|
111
|
-
yield this.annotateByDefault(TestStepState.PASSED, customElements);
|
|
140
|
+
yield this.stepReporter.resetStep(instruction);
|
|
141
|
+
yield this.executionRuntime.executeInstruction(instruction);
|
|
142
|
+
yield this.afterCommandExecution(instruction);
|
|
112
143
|
return yield Promise.resolve();
|
|
113
144
|
}
|
|
114
145
|
catch (error) {
|
|
115
|
-
yield this.
|
|
116
|
-
return Promise.reject(new UiControlClientError(`A problem occurred while executing the instruction: ${
|
|
146
|
+
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}`));
|
|
117
148
|
}
|
|
118
149
|
});
|
|
119
150
|
}
|
|
@@ -125,6 +156,11 @@ export class UiControlClient extends ApiCommands {
|
|
|
125
156
|
return this.executionRuntime.getDetectedElements(instruction, customElements);
|
|
126
157
|
});
|
|
127
158
|
}
|
|
159
|
+
getAndResetSecretText() {
|
|
160
|
+
const { secretText } = this;
|
|
161
|
+
this.secretText = undefined;
|
|
162
|
+
return secretText;
|
|
163
|
+
}
|
|
128
164
|
/**
|
|
129
165
|
* Types a text inside the filtered element.
|
|
130
166
|
*
|
|
@@ -192,10 +228,4 @@ export class UiControlClient extends ApiCommands {
|
|
|
192
228
|
},
|
|
193
229
|
};
|
|
194
230
|
}
|
|
195
|
-
/**
|
|
196
|
-
* Closes the connection to the askui UI Controller
|
|
197
|
-
*/
|
|
198
|
-
close() {
|
|
199
|
-
this.uiControllerClient.close();
|
|
200
|
-
}
|
|
201
231
|
}
|
|
@@ -2,6 +2,7 @@ import { AnnotationLevel } from './annotation-level';
|
|
|
2
2
|
import { CredentialArgs } from './credentials-args';
|
|
3
3
|
import { ProxyAgentArgs } from '../shared/proxy-agent-args';
|
|
4
4
|
import { ModelCompositionBranch } from './model-composition-branch';
|
|
5
|
+
import { Reporter, ReporterConfig } from '@/core/reporting';
|
|
5
6
|
/**
|
|
6
7
|
* Configuration options for the askui UI Control Client
|
|
7
8
|
*
|
|
@@ -25,18 +26,26 @@ import { ModelCompositionBranch } from './model-composition-branch';
|
|
|
25
26
|
* the authentication of the askui Inference Server.
|
|
26
27
|
* You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
|
|
27
28
|
* @param {ProxyAgentArgs} proxyAgents - To configure the proxy agents for http(s) requests.
|
|
29
|
+
* @param {Reporter} reporter - To configure the reporter to report on step runs.
|
|
28
30
|
*/
|
|
29
31
|
export interface ClientArgs {
|
|
30
32
|
readonly uiControllerUrl?: string;
|
|
31
33
|
readonly inferenceServerUrl?: string;
|
|
32
34
|
readonly annotationLevel?: AnnotationLevel;
|
|
33
|
-
readonly credentials?: CredentialArgs;
|
|
34
|
-
readonly proxyAgents?: ProxyAgentArgs;
|
|
35
|
+
readonly credentials?: CredentialArgs | undefined;
|
|
36
|
+
readonly proxyAgents?: ProxyAgentArgs | undefined;
|
|
35
37
|
readonly resize?: number;
|
|
36
38
|
readonly modelComposition?: ModelCompositionBranch[];
|
|
39
|
+
readonly reporter?: Reporter | undefined;
|
|
37
40
|
}
|
|
38
41
|
export interface ClientArgsWithDefaults extends ClientArgs {
|
|
39
42
|
readonly uiControllerUrl: string;
|
|
40
43
|
readonly inferenceServerUrl: string;
|
|
41
44
|
readonly annotationLevel: AnnotationLevel;
|
|
45
|
+
readonly reporter: Required<Reporter> & {
|
|
46
|
+
config: Required<ReporterConfig>;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface UiControlClientConfig {
|
|
50
|
+
annotationLevel: AnnotationLevel;
|
|
42
51
|
}
|
|
@@ -17,14 +17,14 @@ export declare class UiControllerClient {
|
|
|
17
17
|
private clearResponse;
|
|
18
18
|
private onMessage;
|
|
19
19
|
connect(): Promise<UiControllerClientConnectionState>;
|
|
20
|
-
|
|
20
|
+
disconnect(): void;
|
|
21
21
|
private sendAndReceive;
|
|
22
22
|
private send;
|
|
23
23
|
requestScreenshot(): Promise<CaptureScreenshotResponse>;
|
|
24
24
|
getServerPid(): Promise<GetProcessPidResponse>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
startVideoRecording(): Promise<StartRecordingResponse>;
|
|
26
|
+
stopVideoRecording(): Promise<StopRecordingResponse>;
|
|
27
|
+
readVideoRecording(): Promise<ReadRecordingPartResponse>;
|
|
28
28
|
annotateInteractively(boundingBoxes: DetectedElement[], imageString: string): Promise<InteractiveAnnotationResponse>;
|
|
29
29
|
requestControl(controlCommand: ControlCommand): Promise<ControlResponse>;
|
|
30
30
|
}
|
|
@@ -51,7 +51,7 @@ export class UiControllerClient {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
disconnect() {
|
|
55
55
|
var _a;
|
|
56
56
|
(_a = this.ws) === null || _a === void 0 ? void 0 : _a.close();
|
|
57
57
|
}
|
|
@@ -82,17 +82,17 @@ export class UiControllerClient {
|
|
|
82
82
|
getServerPid() {
|
|
83
83
|
return this.sendAndReceive(new GetProcessPidRequest());
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
startVideoRecording() {
|
|
86
86
|
return this.sendAndReceive(new StartRecordingRequest());
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
stopVideoRecording() {
|
|
89
89
|
return this.sendAndReceive(new StopRecordingRequest());
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
readVideoRecording() {
|
|
92
92
|
return new Promise((resolve, reject) => {
|
|
93
93
|
const readRecordingStreamHandler = new ReadRecordingResponseStreamHandler(resolve, reject);
|
|
94
|
-
this.currentResolve = readRecordingStreamHandler.onMessage;
|
|
95
|
-
this.currentReject = readRecordingStreamHandler.onError;
|
|
94
|
+
this.currentResolve = readRecordingStreamHandler.onMessage.bind(readRecordingStreamHandler);
|
|
95
|
+
this.currentReject = readRecordingStreamHandler.onError.bind(readRecordingStreamHandler);
|
|
96
96
|
this.send(new ReadRecordingRequest(), 60 * 15 * 1000);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
@@ -18,7 +18,7 @@ import { downloadServerBinaries, getBinaryFilePath } from './download-binaries';
|
|
|
18
18
|
import { logger } from './logger';
|
|
19
19
|
import { TimeoutError } from './timeout-error';
|
|
20
20
|
import { UnkownError } from './unkown-error';
|
|
21
|
-
import {
|
|
21
|
+
import { envProxyAgents } from '../utils/proxy/proxy-builder';
|
|
22
22
|
export class UiControllerFacade {
|
|
23
23
|
constructor() {
|
|
24
24
|
this.binaryFilePath = getBinaryFilePath('latest');
|
|
@@ -30,7 +30,7 @@ export class UiControllerFacade {
|
|
|
30
30
|
const argsWithDefaults = createArgsWithDefaults(args);
|
|
31
31
|
const argsWithLogPath = this.serverLogFilePath(argsWithDefaults);
|
|
32
32
|
this.binaryFilePath = getBinaryFilePath(argsWithLogPath.binaryVersion);
|
|
33
|
-
yield this.getBinary(argsWithLogPath.binaryVersion, argsWithLogPath.overWriteBinary, argsWithLogPath.proxyAgents || (yield
|
|
33
|
+
yield this.getBinary(argsWithLogPath.binaryVersion, argsWithLogPath.overWriteBinary, argsWithLogPath.proxyAgents || (yield envProxyAgents()));
|
|
34
34
|
this.makeBinaryExecutable();
|
|
35
35
|
logger.debug(`UI Controller log path "${this.serverLogFile}"`);
|
|
36
36
|
yield this.startWithDefaults(argsWithLogPath, maxWaitingForStartingInSeconds);
|
package/dist/esm/main.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { UiController } from './lib';
|
|
2
|
-
export {
|
|
2
|
+
export { AnnotationLevel, UiControlClient } from './execution';
|
|
3
|
+
export { Instruction, Reporter, ReporterConfig, Snapshot, SnapshotDetailLevel, Step, StepStatus, StepStatusEnd, } from './core/reporting';
|
|
3
4
|
export { LogLevels } from './shared';
|
package/dist/esm/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ProxyAgentArgs } from '../../shared/proxy-agent-args';
|
|
2
2
|
export declare class ProxyImportError extends Error {
|
|
3
3
|
}
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function envProxyAgents(): Promise<ProxyAgentArgs | undefined>;
|
|
@@ -21,7 +21,7 @@ function dynmicImportHpagent() {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
export function
|
|
24
|
+
export function envProxyAgents() {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const httpProxyUrl = process.env['HTTP_PROXY'];
|
|
27
27
|
const httpsProxyUrl = process.env['HTTPS_PROXY'];
|
package/dist/example_projects_templates/typescript_jest/test/my-first-askui-test-suite.test.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { aui } from './helper/jest.setup';
|
|
2
2
|
|
|
3
3
|
describe('jest with askui', () => {
|
|
4
|
-
it('should generate an interactive annotation', async () => {
|
|
5
|
-
|
|
4
|
+
it('should generate an (interactive) annotation', async () => {
|
|
5
|
+
// For Windows users:
|
|
6
|
+
// Use annotate() to create an annotated HTML file
|
|
7
|
+
// of your screen that is saved under <project_root>/report
|
|
8
|
+
await aui.annotate();
|
|
9
|
+
|
|
10
|
+
// Uncomment for macOS and Linux
|
|
11
|
+
// Delete the lines above to not trigger annotate()
|
|
12
|
+
// await aui.annotateInteractively();
|
|
6
13
|
});
|
|
7
14
|
|
|
8
15
|
it('should click on my element', async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
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",
|