@autifyhq/autify-cli 0.27.0 → 0.29.0
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/README.md +9 -9
- package/bin/dev +6 -2
- package/dist/autify/connect/client-manager/DebugServerClient.js +1 -1
- package/dist/autify/connect/installClient.d.ts +1 -1
- package/dist/autify/connect/installClient.js +1 -1
- package/dist/autify/mobile/getBuildDetailUrl.js +1 -1
- package/dist/autify/mobile/getTestResultUrl.js +1 -1
- package/dist/autify/mobile/waitTestResult.js +2 -1
- package/dist/autify/web/getTestResultUrl.js +1 -1
- package/dist/autify/web/waitTestResult.js +2 -1
- package/dist/commands/connect/access-point/create.d.ts +3 -3
- package/dist/commands/connect/access-point/create.js +1 -1
- package/dist/commands/connect/access-point/set.d.ts +1 -1
- package/dist/commands/connect/client/install.d.ts +2 -4
- package/dist/commands/connect/client/install.js +6 -7
- package/dist/commands/connect/client/start.d.ts +3 -3
- package/dist/commands/mobile/api/describe-test-result.d.ts +2 -2
- package/dist/commands/mobile/api/list-test-results.d.ts +4 -4
- package/dist/commands/mobile/api/run-test-plan.d.ts +2 -2
- package/dist/commands/mobile/api/upload-build.d.ts +2 -2
- package/dist/commands/mobile/build/upload.d.ts +3 -5
- package/dist/commands/mobile/build/upload.js +4 -5
- package/dist/commands/mobile/test/run.d.ts +6 -8
- package/dist/commands/mobile/test/run.js +6 -6
- package/dist/commands/mobile/test/wait.d.ts +3 -5
- package/dist/commands/mobile/test/wait.js +4 -5
- package/dist/commands/web/api/create-access-point.d.ts +2 -2
- package/dist/commands/web/api/create-url-replacement.d.ts +2 -2
- package/dist/commands/web/api/delete-access-point.d.ts +2 -2
- package/dist/commands/web/api/delete-url-replacement.d.ts +2 -2
- package/dist/commands/web/api/describe-result.d.ts +2 -2
- package/dist/commands/web/api/describe-scenario.d.ts +2 -2
- package/dist/commands/web/api/execute-scenarios.d.ts +2 -2
- package/dist/commands/web/api/execute-schedule.d.ts +2 -2
- package/dist/commands/web/api/list-access-points.d.ts +2 -2
- package/dist/commands/web/api/list-capabilities.d.ts +4 -4
- package/dist/commands/web/api/list-results.d.ts +4 -4
- package/dist/commands/web/api/list-scenarios.d.ts +2 -2
- package/dist/commands/web/api/list-url-replacements.d.ts +1 -1
- package/dist/commands/web/api/update-url-replacement.d.ts +3 -3
- package/dist/commands/web/test/run.d.ts +15 -16
- package/dist/commands/web/test/run.js +35 -19
- package/dist/commands/web/test/wait.d.ts +3 -5
- package/dist/commands/web/test/wait.js +4 -5
- package/oclif.manifest.json +4 -4
- package/package.json +15 -13
package/README.md
CHANGED
|
@@ -103,7 +103,7 @@ USAGE
|
|
|
103
103
|
$ autify connect client install [VERSION]
|
|
104
104
|
|
|
105
105
|
ARGUMENTS
|
|
106
|
-
VERSION [default: v1.0.
|
|
106
|
+
VERSION [default: v1.0.2] Specify the target version of Autify Connect Client.
|
|
107
107
|
|
|
108
108
|
DESCRIPTION
|
|
109
109
|
Install Autify Connect Client
|
|
@@ -280,7 +280,7 @@ Upload a build file
|
|
|
280
280
|
|
|
281
281
|
```
|
|
282
282
|
USAGE
|
|
283
|
-
$ autify mobile build upload
|
|
283
|
+
$ autify mobile build upload BUILD-PATH -w <value> [--json]
|
|
284
284
|
|
|
285
285
|
ARGUMENTS
|
|
286
286
|
BUILD-PATH File path to the iOS app (*.app) or Android app (*.apk).
|
|
@@ -312,7 +312,7 @@ Run a test plan.
|
|
|
312
312
|
|
|
313
313
|
```
|
|
314
314
|
USAGE
|
|
315
|
-
$ autify mobile test run
|
|
315
|
+
$ autify mobile test run TEST-PLAN-URL [--build-id <value> | --build-path <value>] [-w] [-t <value>] [-v]
|
|
316
316
|
[--max-retry-count <value>]
|
|
317
317
|
|
|
318
318
|
ARGUMENTS
|
|
@@ -350,7 +350,7 @@ Wait a test result until it finishes.
|
|
|
350
350
|
|
|
351
351
|
```
|
|
352
352
|
USAGE
|
|
353
|
-
$ autify mobile test wait
|
|
353
|
+
$ autify mobile test wait TEST-RESULT-URL [-t <value>] [-v]
|
|
354
354
|
|
|
355
355
|
ARGUMENTS
|
|
356
356
|
TEST-RESULT-URL Test result URL e.g. https://mobile-app.autify.com/projects/<ID>/results/<ID>
|
|
@@ -711,7 +711,7 @@ Run a scenario or test plan.
|
|
|
711
711
|
|
|
712
712
|
```
|
|
713
713
|
USAGE
|
|
714
|
-
$ autify web test run
|
|
714
|
+
$ autify web test run SCENARIO-OR-TEST-PLAN-URL [-n <value>] [-r <value>] [--autify-connect <value> |
|
|
715
715
|
--autify-connect-client] [--autify-connect-client-verbose ] [--autify-connect-client-file-logging ]
|
|
716
716
|
[--autify-connect-client-debug-server-port <value> ] [--autify-connect-client-extra-arguments <value> ] [--os
|
|
717
717
|
<value>] [--os-version <value>] [--browser <value>] [--device <value>] [--device-type <value>] [-w] [-t <value>]
|
|
@@ -723,7 +723,7 @@ ARGUMENTS
|
|
|
723
723
|
|
|
724
724
|
FLAGS
|
|
725
725
|
-n, --name=<value> [Only for test scenario] Name of the test execution.
|
|
726
|
-
-r, --url-replacements=<value>... URL replacements. Example: http://example.com
|
|
726
|
+
-r, --url-replacements=<value>... URL replacements. Example: "http://example.com http://example.net"
|
|
727
727
|
-t, --timeout=<value> [default: 300] Timeout seconds when waiting for the finish of the
|
|
728
728
|
test execution.
|
|
729
729
|
-v, --verbose Verbose output
|
|
@@ -766,8 +766,8 @@ EXAMPLES
|
|
|
766
766
|
|
|
767
767
|
With URL replacements:
|
|
768
768
|
|
|
769
|
-
$ autify web test run https://app.autify.com/projects/0000/scenarios/0000 -r \
|
|
770
|
-
http://example.
|
|
769
|
+
$ autify web test run https://app.autify.com/projects/0000/scenarios/0000 -r "http://example.com \
|
|
770
|
+
http://example.net" -r "http://example.org http://example.net"
|
|
771
771
|
|
|
772
772
|
Run a test with specifying the execution name:
|
|
773
773
|
|
|
@@ -788,7 +788,7 @@ Wait a test result until it finishes.
|
|
|
788
788
|
|
|
789
789
|
```
|
|
790
790
|
USAGE
|
|
791
|
-
$ autify web test wait
|
|
791
|
+
$ autify web test wait TEST-RESULT-URL [-t <value>] [-v]
|
|
792
792
|
|
|
793
793
|
ARGUMENTS
|
|
794
794
|
TEST-RESULT-URL Test result URL e.g. https://app.autify.com/projects/<ID>/results/<ID>
|
package/bin/dev
CHANGED
|
@@ -6,12 +6,16 @@ const path = require("path");
|
|
|
6
6
|
const project = path.join(__dirname, "..", "tsconfig.json");
|
|
7
7
|
|
|
8
8
|
// In dev mode -> use ts-node and dev plugins
|
|
9
|
-
|
|
9
|
+
// When `bin/dev` is invoked in integration-test it'll be "test"
|
|
10
|
+
process.env.NODE_ENV ||= "development";
|
|
10
11
|
|
|
11
12
|
require("ts-node").register({ project });
|
|
12
13
|
|
|
13
14
|
// In dev mode, always show stack traces
|
|
14
|
-
|
|
15
|
+
// In test mode, stack traces shouldn't appeared in snapshot
|
|
16
|
+
if (process.env.NODE_ENV === "development") {
|
|
17
|
+
oclif.settings.debug = true;
|
|
18
|
+
}
|
|
15
19
|
|
|
16
20
|
// Start the CLI
|
|
17
21
|
oclif
|
|
@@ -39,7 +39,7 @@ class DebugServerClient {
|
|
|
39
39
|
const timeout = setTimeout(() => controller.abort(), 1000);
|
|
40
40
|
let response;
|
|
41
41
|
try {
|
|
42
|
-
response = await (0, node_fetch_1.default)(`http://
|
|
42
|
+
response = await (0, node_fetch_1.default)(`http://127.0.0.1:${this.port}${path}`, {
|
|
43
43
|
method,
|
|
44
44
|
signal: controller.signal,
|
|
45
45
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { CLIError } from "@oclif/errors";
|
|
3
|
-
export declare const AUTIFY_CONNECT_CLIENT_SUPPORTED_VERSION = "v1.0.
|
|
3
|
+
export declare const AUTIFY_CONNECT_CLIENT_SUPPORTED_VERSION = "v1.0.2";
|
|
4
4
|
export declare const getConnectClientSourceUrl: (configDir: string, version: string) => {
|
|
5
5
|
url: URL;
|
|
6
6
|
expectedVersion: string | undefined;
|
|
@@ -15,7 +15,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
15
15
|
const tar_1 = tslib_1.__importDefault(require("tar"));
|
|
16
16
|
const config_1 = require("../../config");
|
|
17
17
|
// Update whenever to bump supported version.
|
|
18
|
-
exports.AUTIFY_CONNECT_CLIENT_SUPPORTED_VERSION = "v1.0.
|
|
18
|
+
exports.AUTIFY_CONNECT_CLIENT_SUPPORTED_VERSION = "v1.0.2";
|
|
19
19
|
const getMode = (configDir) => {
|
|
20
20
|
const mode = (0, config_1.get)(configDir, "AUTIFY_CONNECT_CLIENT_MODE");
|
|
21
21
|
if (!mode)
|
|
@@ -8,7 +8,7 @@ const getBuildDetailUrl = (configDir, workspaceId, os, buildId) => {
|
|
|
8
8
|
var _a;
|
|
9
9
|
// Currently, it's heuristic. We could provide a new API or include the URL in the response of the existing APIs.
|
|
10
10
|
let basePath = (_a = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH")) !== null && _a !== void 0 ? _a : autify_sdk_1.MOBILE_BASE_PATH;
|
|
11
|
-
if (basePath.startsWith("http://
|
|
11
|
+
if (basePath.startsWith("http://127.0.0.1:"))
|
|
12
12
|
basePath = autify_sdk_1.MOBILE_BASE_PATH; // Override if it's running integration tests.
|
|
13
13
|
const endpoint = basePath.slice(0, Math.max(0, basePath.indexOf("/api/v1"))); // Assuming the UI endpoint is the same as API endpoint.
|
|
14
14
|
// Currently, there is no way to know the page number via API. We assume the latest build will be shown in page 1 now.
|
|
@@ -8,7 +8,7 @@ const getMobileTestResultUrl = (configDir, workspaceId, resultId) => {
|
|
|
8
8
|
var _a;
|
|
9
9
|
// Currently, it's heuristic. We could provide a new API or include the URL in the response of the existing APIs.
|
|
10
10
|
let basePath = (_a = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH")) !== null && _a !== void 0 ? _a : autify_sdk_1.MOBILE_BASE_PATH;
|
|
11
|
-
if (basePath.startsWith("http://
|
|
11
|
+
if (basePath.startsWith("http://127.0.0.1:"))
|
|
12
12
|
basePath = autify_sdk_1.MOBILE_BASE_PATH; // Override if it's running integration tests.
|
|
13
13
|
const endpoint = basePath.slice(0, Math.max(0, basePath.indexOf("/api/v1"))); // Assuming the UI endpoint is the same as API endpoint.
|
|
14
14
|
return `${endpoint}/projects/${workspaceId}/results/${resultId}`;
|
|
@@ -29,7 +29,8 @@ const waitUntil = async (callback, timeoutSecond, intervalSecond, verbose) => {
|
|
|
29
29
|
renderer: verbose ? "verbose" : "default",
|
|
30
30
|
nonTTYRenderer: "verbose",
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
const res = await task.run();
|
|
33
|
+
return res.result;
|
|
33
34
|
};
|
|
34
35
|
const emojiStatus = (status) => {
|
|
35
36
|
if (status === "queuing")
|
|
@@ -8,7 +8,7 @@ const getWebTestResultUrl = (configDir, workspaceId, resultId) => {
|
|
|
8
8
|
var _a;
|
|
9
9
|
// Currently, it's heuristic. We could provide a new API or include the URL in the response of the existing APIs.
|
|
10
10
|
let basePath = (_a = (0, config_1.get)(configDir, "AUTIFY_WEB_BASE_PATH")) !== null && _a !== void 0 ? _a : autify_sdk_1.WEB_BASE_PATH;
|
|
11
|
-
if (basePath.startsWith("http://
|
|
11
|
+
if (basePath.startsWith("http://127.0.0.1:"))
|
|
12
12
|
basePath = autify_sdk_1.WEB_BASE_PATH; // Override if it's running integration tests.
|
|
13
13
|
const endpoint = basePath.slice(0, Math.max(0, basePath.indexOf("/api/v1"))); // Assuming the UI endpoint is the same as API endpoint.
|
|
14
14
|
return `${endpoint}/projects/${workspaceId}/results/${resultId}`;
|
|
@@ -38,7 +38,8 @@ const waitUntil = async (callback, timeoutSecond, intervalSecond, verbose) => {
|
|
|
38
38
|
renderer: verbose ? "verbose" : "default",
|
|
39
39
|
nonTTYRenderer: "verbose",
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
const res = await task.run();
|
|
42
|
+
return res.result;
|
|
42
43
|
};
|
|
43
44
|
const emojiStatus = (status) => {
|
|
44
45
|
if (status === "queuing")
|
|
@@ -3,9 +3,9 @@ export default class ConnectAccessPointCreate extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
name: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
"web-workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"web-workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
|
-
static args:
|
|
9
|
+
static args: {};
|
|
10
10
|
run(): Promise<void>;
|
|
11
11
|
}
|
|
@@ -3,7 +3,7 @@ export default class ConnectAccessPointSet extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
name: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
private readKeyFromStdin;
|
|
@@ -4,9 +4,7 @@ export default class ConnectClientInstall extends Command {
|
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {};
|
|
6
6
|
static args: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
default: string;
|
|
10
|
-
}[];
|
|
7
|
+
version: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
11
9
|
run(): Promise<void>;
|
|
12
10
|
}
|
|
@@ -7,9 +7,9 @@ class ConnectClientInstall extends core_1.Command {
|
|
|
7
7
|
const { args } = await this.parse(ConnectClientInstall);
|
|
8
8
|
const { configDir, cacheDir } = this.config;
|
|
9
9
|
const { url, expectedVersion } = (0, installClient_1.getConnectClientSourceUrl)(configDir, args.version);
|
|
10
|
-
core_1.
|
|
10
|
+
core_1.ux.action.start(`Installing Autify Connect Client from ${url})`, "installing", { stdout: true });
|
|
11
11
|
const { version, path } = await (0, installClient_1.installClient)(configDir, cacheDir, url, expectedVersion);
|
|
12
|
-
core_1.
|
|
12
|
+
core_1.ux.action.stop();
|
|
13
13
|
this.log(`Successfully installed Autify Connect Client (path: ${path}, version: ${version})`);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -21,10 +21,9 @@ ConnectClientInstall.examples = [
|
|
|
21
21
|
"Install a stable version:\n<%= config.bin %> <%= command.id %> stable",
|
|
22
22
|
];
|
|
23
23
|
ConnectClientInstall.flags = {};
|
|
24
|
-
ConnectClientInstall.args =
|
|
25
|
-
{
|
|
26
|
-
name: "version",
|
|
24
|
+
ConnectClientInstall.args = {
|
|
25
|
+
version: core_1.Args.string({
|
|
27
26
|
description: "Specify the target version of Autify Connect Client.",
|
|
28
27
|
default: installClient_1.AUTIFY_CONNECT_CLIENT_SUPPORTED_VERSION,
|
|
29
|
-
},
|
|
30
|
-
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
@@ -5,9 +5,9 @@ export default class ConnectClientStart extends Command {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
"file-logging": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
"debug-server-port": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
9
|
-
"web-workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
10
|
-
"extra-arguments": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
"debug-server-port": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
"web-workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
"extra-arguments": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
11
|
};
|
|
12
12
|
run(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -3,8 +3,8 @@ export default class MobileApiDescribeTestResult extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
id: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,10 +3,10 @@ export default class MobileApiListTestResults extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
8
|
-
"per-page": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
9
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
"per-page": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
10
|
};
|
|
11
11
|
run(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -3,8 +3,8 @@ export default class MobileApiRunTestPlan extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
"run-test-plan-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"run-test-plan-request": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class MobileApiUploadBuild extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
-
file: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
file: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -4,13 +4,11 @@ export default class MobileBuildUpload extends Command {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static examples: string[];
|
|
6
6
|
static flags: {
|
|
7
|
-
"workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
"workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
static args: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
required: boolean;
|
|
13
|
-
}[];
|
|
10
|
+
"build-path": import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
14
12
|
run(): Promise<{
|
|
15
13
|
buildId: string;
|
|
16
14
|
}>;
|
|
@@ -34,10 +34,9 @@ MobileBuildUpload.flags = {
|
|
|
34
34
|
required: true,
|
|
35
35
|
}),
|
|
36
36
|
};
|
|
37
|
-
MobileBuildUpload.args =
|
|
38
|
-
{
|
|
39
|
-
name: "build-path",
|
|
37
|
+
MobileBuildUpload.args = {
|
|
38
|
+
"build-path": core_1.Args.string({
|
|
40
39
|
description: "File path to the iOS app (*.app) or Android app (*.apk).",
|
|
41
40
|
required: true,
|
|
42
|
-
},
|
|
43
|
-
|
|
41
|
+
}),
|
|
42
|
+
};
|
|
@@ -3,17 +3,15 @@ export default class MobileTestRun extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"build-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
-
"build-path": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
"build-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"build-path": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
9
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
10
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
"max-retry-count": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
11
|
+
"max-retry-count": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
12
|
};
|
|
13
13
|
static args: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
required: boolean;
|
|
17
|
-
}[];
|
|
14
|
+
"test-plan-url": import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
15
|
+
};
|
|
18
16
|
run(): Promise<void>;
|
|
19
17
|
}
|
|
@@ -20,7 +20,8 @@ class MobileTestRun extends core_1.Command {
|
|
|
20
20
|
if (buildPath) {
|
|
21
21
|
const uploadArgs = ["--workspace-id", workspaceId, buildPath];
|
|
22
22
|
const uploadCommand = new upload_1.default(uploadArgs, this.config);
|
|
23
|
-
|
|
23
|
+
const res = await uploadCommand.run();
|
|
24
|
+
buildId = res.buildId;
|
|
24
25
|
}
|
|
25
26
|
const runTestPlanOnce = async () => {
|
|
26
27
|
const res = await client.runTestPlan(testPlanId, {
|
|
@@ -107,10 +108,9 @@ MobileTestRun.flags = {
|
|
|
107
108
|
default: 0,
|
|
108
109
|
}),
|
|
109
110
|
};
|
|
110
|
-
MobileTestRun.args =
|
|
111
|
-
{
|
|
112
|
-
name: "test-plan-url",
|
|
111
|
+
MobileTestRun.args = {
|
|
112
|
+
"test-plan-url": core_1.Args.string({
|
|
113
113
|
description: "Test plan URL e.g. https://mobile-app.autify.com/projects/<ID>/test_plans/<ID>",
|
|
114
114
|
required: true,
|
|
115
|
-
},
|
|
116
|
-
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
@@ -3,13 +3,11 @@ export default class MobileTestWait extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
6
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
};
|
|
9
9
|
static args: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
required: boolean;
|
|
13
|
-
}[];
|
|
10
|
+
"test-result-url": import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
14
12
|
run(): Promise<void>;
|
|
15
13
|
}
|
|
@@ -49,10 +49,9 @@ MobileTestWait.flags = {
|
|
|
49
49
|
default: false,
|
|
50
50
|
}),
|
|
51
51
|
};
|
|
52
|
-
MobileTestWait.args =
|
|
53
|
-
{
|
|
54
|
-
name: "test-result-url",
|
|
52
|
+
MobileTestWait.args = {
|
|
53
|
+
"test-result-url": core_1.Args.string({
|
|
55
54
|
description: "Test result URL e.g. https://mobile-app.autify.com/projects/<ID>/results/<ID>",
|
|
56
55
|
required: true,
|
|
57
|
-
},
|
|
58
|
-
|
|
56
|
+
}),
|
|
57
|
+
};
|
|
@@ -3,8 +3,8 @@ export default class WebApiCreateAccessPoint extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"create-access-point-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"create-access-point-request": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiCreateUrlReplacement extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"create-url-replacement-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"create-url-replacement-request": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiDeleteAccessPoint extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"delete-access-point-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"delete-access-point-request": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiDeleteUrlReplacement extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiDescribeResult extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"result-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"result-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiDescribeScenario extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"scenario-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"scenario-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiExecuteScenarios extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"execute-scenarios-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"execute-scenarios-request": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiExecuteSchedule extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"schedule-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"execute-schedule-request": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
"schedule-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"execute-schedule-request": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiListAccessPoints extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,10 +3,10 @@ export default class WebApiListCapabilities extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
-
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
|
-
"device-type": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
"device-type": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
10
|
};
|
|
11
11
|
run(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -3,10 +3,10 @@ export default class WebApiListResults extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
8
|
-
"per-page": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
9
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
"per-page": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
10
|
};
|
|
11
11
|
run(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiListScenarios extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ export default class WebApiListUrlReplacements extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -3,9 +3,9 @@ export default class WebApiUpdateUrlReplacement extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
-
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
8
|
-
"update-url-replacement-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
"update-url-replacement-request": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
9
|
};
|
|
10
10
|
run(): Promise<void>;
|
|
11
11
|
}
|
|
@@ -3,28 +3,27 @@ export default class WebTestRun extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
-
"url-replacements": import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
|
|
8
|
-
"autify-connect": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
"url-replacements": import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
"autify-connect": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
9
|
"autify-connect-client": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
"autify-connect-client-verbose": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
"autify-connect-client-file-logging": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
"autify-connect-client-debug-server-port": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
13
|
-
"autify-connect-client-extra-arguments": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
14
|
-
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
15
|
-
"os-version": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
16
|
-
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
17
|
-
device: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
18
|
-
"device-type": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
|
+
"autify-connect-client-debug-server-port": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
"autify-connect-client-extra-arguments": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
+
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
"os-version": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
|
+
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
17
|
+
device: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
18
|
+
"device-type": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
19
19
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
-
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
20
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
21
21
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
22
|
-
"max-retry-count": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
22
|
+
"max-retry-count": import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
23
23
|
};
|
|
24
24
|
static args: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
required: boolean;
|
|
28
|
-
}[];
|
|
25
|
+
"scenario-or-test-plan-url": import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
26
|
+
};
|
|
29
27
|
run(): Promise<void>;
|
|
28
|
+
private parseUrlReplacements;
|
|
30
29
|
}
|
|
@@ -10,17 +10,7 @@ const errors_1 = require("@oclif/errors");
|
|
|
10
10
|
const parseAutifyTestUrl_1 = require("../../../autify/web/parseAutifyTestUrl");
|
|
11
11
|
const ClientManager_1 = require("../../../autify/connect/client-manager/ClientManager");
|
|
12
12
|
const getWebClient_1 = require("../../../autify/web/getWebClient");
|
|
13
|
-
const
|
|
14
|
-
return urlReplacements.map((s) => {
|
|
15
|
-
// eslint-disable-next-line camelcase
|
|
16
|
-
const [pattern_url, replacement_url] = s.split("=");
|
|
17
|
-
// eslint-disable-next-line camelcase
|
|
18
|
-
return { pattern_url, replacement_url };
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
const urlReplacementsToString = (
|
|
22
|
-
// eslint-disable-next-line camelcase
|
|
23
|
-
urlReplacements) => {
|
|
13
|
+
const urlReplacementsToString = (urlReplacements) => {
|
|
24
14
|
return urlReplacements
|
|
25
15
|
.map((urlReplacement) => {
|
|
26
16
|
return `${urlReplacement.pattern_url} => ${urlReplacement.replacement_url}`;
|
|
@@ -40,7 +30,7 @@ class WebTestRun extends core_1.Command {
|
|
|
40
30
|
// eslint-disable-next-line camelcase
|
|
41
31
|
device_type: flags["device-type"],
|
|
42
32
|
};
|
|
43
|
-
const urlReplacements = parseUrlReplacements((_a = flags["url-replacements"]) !== null && _a !== void 0 ? _a : []);
|
|
33
|
+
const urlReplacements = this.parseUrlReplacements((_a = flags["url-replacements"]) !== null && _a !== void 0 ? _a : []);
|
|
44
34
|
if (urlReplacements.length > 0)
|
|
45
35
|
this.log(`${node_emoji_1.default.get("memo")} Using URL replacements: ${urlReplacementsToString(urlReplacements)}`);
|
|
46
36
|
const { configDir, cacheDir, userAgent } = this.config;
|
|
@@ -127,6 +117,33 @@ class WebTestRun extends core_1.Command {
|
|
|
127
117
|
throw error;
|
|
128
118
|
}
|
|
129
119
|
}
|
|
120
|
+
parseUrlReplacements(urlReplacements) {
|
|
121
|
+
return urlReplacements.map((s) => {
|
|
122
|
+
// eslint-disable-next-line camelcase
|
|
123
|
+
let pattern_url;
|
|
124
|
+
// eslint-disable-next-line camelcase
|
|
125
|
+
let replacement_url;
|
|
126
|
+
let rest;
|
|
127
|
+
if (s.includes(" ")) {
|
|
128
|
+
// eslint-disable-next-line camelcase
|
|
129
|
+
[pattern_url, replacement_url] = s.split(" ");
|
|
130
|
+
}
|
|
131
|
+
else if (s.includes("=")) {
|
|
132
|
+
// eslint-disable-next-line camelcase
|
|
133
|
+
[pattern_url, ...rest] = s.split("=");
|
|
134
|
+
// eslint-disable-next-line camelcase
|
|
135
|
+
replacement_url = rest.join("=");
|
|
136
|
+
this.warn(`Using = as a delimiter for --url-replacements (-r) option is deprecated. ` +
|
|
137
|
+
// eslint-disable-next-line camelcase
|
|
138
|
+
`Use space instead (--url-replacements "${pattern_url} ${replacement_url}").`);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
throw new errors_1.CLIError(`Can't parse ${s} as --url-replacements option. Please make sure it has a space as a delimiter and surrounded by quotes. (e.g. --url-replacements "https://example.com https://example.net")`);
|
|
142
|
+
}
|
|
143
|
+
// eslint-disable-next-line camelcase
|
|
144
|
+
return { pattern_url, replacement_url };
|
|
145
|
+
});
|
|
146
|
+
}
|
|
130
147
|
}
|
|
131
148
|
exports.default = WebTestRun;
|
|
132
149
|
WebTestRun.description = "Run a scenario or test plan.";
|
|
@@ -135,7 +152,7 @@ WebTestRun.examples = [
|
|
|
135
152
|
"Run a test plan:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/test_plans/0000",
|
|
136
153
|
"Run and wait a test scenario:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --wait --timeout 600",
|
|
137
154
|
'Run a test scenario with a specific capability:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --os "Windows Server" --browser Edge',
|
|
138
|
-
|
|
155
|
+
'With URL replacements:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 -r "http://example.com http://example.net" -r "http://example.org http://example.net"',
|
|
139
156
|
'Run a test with specifying the execution name:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --name "Sample execution"',
|
|
140
157
|
"Run a test scenario with Autify Connect:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --autify-connect NAME",
|
|
141
158
|
"Run a test scenario with Autify Connect Client:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --wait --autify-connect-client",
|
|
@@ -147,7 +164,7 @@ WebTestRun.flags = {
|
|
|
147
164
|
}),
|
|
148
165
|
"url-replacements": core_1.Flags.string({
|
|
149
166
|
char: "r",
|
|
150
|
-
description:
|
|
167
|
+
description: 'URL replacements. Example: "http://example.com http://example.net"',
|
|
151
168
|
multiple: true,
|
|
152
169
|
}),
|
|
153
170
|
"autify-connect": core_1.Flags.string({
|
|
@@ -210,10 +227,9 @@ WebTestRun.flags = {
|
|
|
210
227
|
default: 0,
|
|
211
228
|
}),
|
|
212
229
|
};
|
|
213
|
-
WebTestRun.args =
|
|
214
|
-
{
|
|
215
|
-
name: "scenario-or-test-plan-url",
|
|
230
|
+
WebTestRun.args = {
|
|
231
|
+
"scenario-or-test-plan-url": core_1.Args.string({
|
|
216
232
|
description: "Scenario URL or Test plan URL e.g. https://app.autify.com/projects/<ID>/(scenarios|test_plans)/<ID>",
|
|
217
233
|
required: true,
|
|
218
|
-
},
|
|
219
|
-
|
|
234
|
+
}),
|
|
235
|
+
};
|
|
@@ -3,13 +3,11 @@ export default class WebTestWait extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
6
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
};
|
|
9
9
|
static args: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
required: boolean;
|
|
13
|
-
}[];
|
|
10
|
+
"test-result-url": import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
14
12
|
run(): Promise<void>;
|
|
15
13
|
}
|
|
@@ -49,10 +49,9 @@ WebTestWait.flags = {
|
|
|
49
49
|
default: false,
|
|
50
50
|
}),
|
|
51
51
|
};
|
|
52
|
-
WebTestWait.args =
|
|
53
|
-
{
|
|
54
|
-
name: "test-result-url",
|
|
52
|
+
WebTestWait.args = {
|
|
53
|
+
"test-result-url": core_1.Args.string({
|
|
55
54
|
description: "Test result URL e.g. https://app.autify.com/projects/<ID>/results/<ID>",
|
|
56
55
|
required: true,
|
|
57
|
-
},
|
|
58
|
-
|
|
56
|
+
}),
|
|
57
|
+
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.29.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"connect:access-point:create": {
|
|
5
5
|
"id": "connect:access-point:create",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"version": {
|
|
71
71
|
"name": "version",
|
|
72
72
|
"description": "Specify the target version of Autify Connect Client.",
|
|
73
|
-
"default": "v1.0.
|
|
73
|
+
"default": "v1.0.2"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
},
|
|
@@ -871,7 +871,7 @@
|
|
|
871
871
|
"Run a test plan:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/test_plans/0000",
|
|
872
872
|
"Run and wait a test scenario:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --wait --timeout 600",
|
|
873
873
|
"Run a test scenario with a specific capability:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --os \"Windows Server\" --browser Edge",
|
|
874
|
-
"With URL replacements:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 -r http://example.com
|
|
874
|
+
"With URL replacements:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 -r \"http://example.com http://example.net\" -r \"http://example.org http://example.net\"",
|
|
875
875
|
"Run a test with specifying the execution name:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --name \"Sample execution\"",
|
|
876
876
|
"Run a test scenario with Autify Connect:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --autify-connect NAME",
|
|
877
877
|
"Run a test scenario with Autify Connect Client:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --wait --autify-connect-client"
|
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
"name": "url-replacements",
|
|
889
889
|
"type": "option",
|
|
890
890
|
"char": "r",
|
|
891
|
-
"description": "URL replacements. Example: http://example.com
|
|
891
|
+
"description": "URL replacements. Example: \"http://example.com http://example.net\"",
|
|
892
892
|
"multiple": true
|
|
893
893
|
},
|
|
894
894
|
"autify-connect": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autifyhq/autify-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Autify Command Line Interface (CLI)",
|
|
5
5
|
"author": "Autify",
|
|
6
6
|
"bin": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"/oclif.manifest.json"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@autifyhq/autify-sdk": "^0.
|
|
21
|
-
"@oclif/core": "^
|
|
20
|
+
"@autifyhq/autify-sdk": "^0.12.0",
|
|
21
|
+
"@oclif/core": "^2.6.2",
|
|
22
22
|
"@oclif/errors": "^1.3.6",
|
|
23
23
|
"@oclif/plugin-help": "^5.2.4",
|
|
24
24
|
"@oclif/plugin-not-found": "^2.3.18",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"tempy": "^3.0.0",
|
|
40
40
|
"tsimportlib": "^0.0.3",
|
|
41
41
|
"unzip-stream": "^0.3.1",
|
|
42
|
-
"uuid": "^
|
|
43
|
-
"which": "^
|
|
42
|
+
"uuid": "^9.0.0",
|
|
43
|
+
"which": "^3.0.0",
|
|
44
44
|
"winston": "^3.8.2",
|
|
45
45
|
"xstate": "^4.35.4"
|
|
46
46
|
},
|
|
@@ -51,28 +51,26 @@
|
|
|
51
51
|
"@types/chai": "^4.3.4",
|
|
52
52
|
"@types/inquirer": "^8.2.5",
|
|
53
53
|
"@types/listr": "^0.14.4",
|
|
54
|
-
"@types/
|
|
55
|
-
"@types/node": "^16.18.12",
|
|
54
|
+
"@types/node": "^18.14.2",
|
|
56
55
|
"@types/node-emoji": "^1.8.2",
|
|
57
56
|
"@types/node-fetch": "^2.6.2",
|
|
58
57
|
"@types/shell-quote": "^1.7.1",
|
|
59
58
|
"@types/tar": "^6.1.3",
|
|
60
59
|
"@types/unzip-stream": "^0.3.1",
|
|
61
|
-
"@types/uuid": "^
|
|
60
|
+
"@types/uuid": "^9.0.1",
|
|
62
61
|
"chai": "^4.3.7",
|
|
63
62
|
"cross-env": "^7.0.3",
|
|
64
|
-
"eslint": "^
|
|
63
|
+
"eslint": "^8.35.0",
|
|
65
64
|
"eslint-config-oclif": "^4.0.0",
|
|
66
65
|
"eslint-config-oclif-typescript": "^1.0.3",
|
|
67
66
|
"eslint-config-prettier": "^8.6.0",
|
|
68
67
|
"husky": "^8.0.3",
|
|
69
68
|
"lint-staged": "^13.1.0",
|
|
70
|
-
"mocha": "^9.2.2",
|
|
71
69
|
"oclif": "^3.6.3",
|
|
72
70
|
"patch-package": "^6.5.1",
|
|
73
71
|
"prettier": "^2.8.3",
|
|
74
72
|
"shx": "^0.3.4",
|
|
75
|
-
"ts-morph": "^
|
|
73
|
+
"ts-morph": "^17.0.1",
|
|
76
74
|
"ts-node": "^10.9.1",
|
|
77
75
|
"tslib": "^2.5.0",
|
|
78
76
|
"typed-emitter": "^2.1.0",
|
|
@@ -153,7 +151,6 @@
|
|
|
153
151
|
"posttest": "npm run lint",
|
|
154
152
|
"prepack": "npm run build && oclif manifest && oclif readme",
|
|
155
153
|
"release": "ts-node ./scripts/release.ts",
|
|
156
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
157
154
|
"test:integration": "npm run build -w integration-test && autify-cli-integration-test",
|
|
158
155
|
"test:integration:dev": "npm run build -w integration-test && cross-env AUTIFY_CLI_PATH=../bin/dev autify-cli-integration-test",
|
|
159
156
|
"test:integration:record": "npm run build -w integration-test && cross-env AUTIFY_CLI_INTEGRATION_TEST_RECORD=1 AUTIFY_CONNECT_CLIENT_MODE=real autify-cli-integration-test",
|
|
@@ -167,6 +164,11 @@
|
|
|
167
164
|
"prepare:development": "husky install",
|
|
168
165
|
"prepare:production": "true"
|
|
169
166
|
},
|
|
167
|
+
"overrides": {
|
|
168
|
+
"eslint-plugin-unicorn": "^41.0.0",
|
|
169
|
+
"@typescript-eslint/parser": "^5.0.0",
|
|
170
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0"
|
|
171
|
+
},
|
|
170
172
|
"lint-staged": {
|
|
171
173
|
"**/*.{md,json,yml,js,cjs}": "prettier --write",
|
|
172
174
|
"**/*.ts": [
|
|
@@ -175,7 +177,7 @@
|
|
|
175
177
|
]
|
|
176
178
|
},
|
|
177
179
|
"engines": {
|
|
178
|
-
"node": ">=
|
|
180
|
+
"node": ">=v18.14.2"
|
|
179
181
|
},
|
|
180
182
|
"bugs": "https://github.com/autifyhq/autify-cli/issues",
|
|
181
183
|
"keywords": [
|