@autifyhq/autify-cli-integration-test 0.47.0 → 0.49.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/__recordings__/mobile%20build%20upload%20ios.ipa%20--workspace-id%3D4yyFEL/polly-proxy_3343057686/recording.har +59 -0
- package/__recordings__/mobile%20test%20run%20https%3A%2F%2Fmobile-app.autify.com%2Fprojects%2F4yyFEL%2Ftest_plans%2F1EtZ0P%20--build-path%3Dios.ipa%20--wait/polly-proxy_3343057686/recording.har +3221 -0
- package/__snapshots__/golden/mobileBuildUploadIosIPA.test.js.snap +12 -0
- package/__snapshots__/golden/mobileTestRunIosIPAWait.test.js.snap +93 -0
- package/dist/bin/autify-mobile-generate-fake-app.js +7 -0
- package/dist/commands.d.ts +1 -0
- package/dist/commands.js +21 -8
- package/dist/test/golden/mobileBuildUploadIosIPA.test.d.ts +1 -0
- package/dist/test/golden/mobileBuildUploadIosIPA.test.js +5 -0
- package/dist/test/golden/mobileTestRunIosIPAWait.test.d.ts +1 -0
- package/dist/test/golden/mobileTestRunIosIPAWait.test.js +5 -0
- package/package.json +7 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`autify mobile build upload /path/to/ios.ipa --workspace-id AAA 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"stderr": "",
|
|
6
|
+
"stdout": "[HPM] Proxy created: / -> https://app.autify.com
|
|
7
|
+
[HPM] Proxy created: / -> https://mobile-app.autify.com
|
|
8
|
+
✅ Successfully uploaded ios.ipa (ID: A8upqB). See https://mobile-app.autify.com/projects/4yyFEL/builds?os=ios&selectedBuildId=A8upqB&page=1
|
|
9
|
+
[HPM] server close signal received: closing proxy server
|
|
10
|
+
",
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`autify mobile test run https://mobile-app.autify.com/projects/AAA/test_plans/BBB --build-path /path/to/ios.ipa --wait 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"stderr": "",
|
|
6
|
+
"stdout": "[HPM] Proxy created: / -> https://app.autify.com
|
|
7
|
+
[HPM] Proxy created: / -> https://mobile-app.autify.com
|
|
8
|
+
✅ Successfully uploaded ios.ipa (ID: gquLbX). See https://mobile-app.autify.com/projects/4yyFEL/builds?os=ios&selectedBuildId=gquLbX&page=1
|
|
9
|
+
✅ Successfully started: https://mobile-app.autify.com/projects/4yyFEL/results/d3tEQW
|
|
10
|
+
🕐 Waiting for the test result: https://mobile-app.autify.com/projects/4yyFEL/results/d3tEQW
|
|
11
|
+
[HH:MM:SS] Waiting... (timeout: 300 s) [started]
|
|
12
|
+
[HH:MM:SS] → TestPlan: ⏳ Waiting, TestCases: ⏳ Waiting
|
|
13
|
+
[HH:MM:SS] → TestPlan: ⏳ Waiting, TestCases: ⏳ Waiting
|
|
14
|
+
[HH:MM:SS] → TestPlan: ⏳ Waiting, TestCases: ⏳ Waiting
|
|
15
|
+
[HH:MM:SS] → TestPlan: ⏳ Waiting, TestCases: ⏳ Waiting
|
|
16
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
17
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
18
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
19
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
20
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
21
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
22
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
23
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
24
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
25
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
26
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
27
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
28
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
29
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
30
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
31
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
32
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
33
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
34
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
35
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
36
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
37
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
38
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
39
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
40
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
41
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
42
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
43
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
44
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
45
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
46
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
47
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
48
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
49
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
50
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
51
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
52
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
53
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
54
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
55
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
56
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
57
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
58
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
59
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
60
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
61
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
62
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
63
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
64
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
65
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
66
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
67
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
68
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
69
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
70
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
71
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
72
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
73
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
74
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
75
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: ❔ None
|
|
76
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
77
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
78
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
79
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
80
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
81
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
82
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
83
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
84
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
85
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
86
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
87
|
+
[HH:MM:SS] → TestPlan: 👍 Passed , TestCases: 👍 Passed
|
|
88
|
+
[HH:MM:SS] Waiting... (timeout: 300 s) [completed]
|
|
89
|
+
✅ Test passed!: https://mobile-app.autify.com/projects/4yyFEL/results/d3tEQW
|
|
90
|
+
[HPM] server close signal received: closing proxy server
|
|
91
|
+
",
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
@@ -15,6 +15,13 @@ else {
|
|
|
15
15
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(commands_1.iosBuildPath, "ios"), tinyBinary); // Add a fake binary file
|
|
16
16
|
console.log(`${commands_1.iosBuildPath} is created.`);
|
|
17
17
|
}
|
|
18
|
+
if ((0, node_fs_1.existsSync)(commands_1.iosIPABuildPath)) {
|
|
19
|
+
console.log(`${commands_1.iosIPABuildPath} already exists.`);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
(0, node_fs_1.writeFileSync)(commands_1.iosIPABuildPath, tinyBinary); // Create a fake binary file
|
|
23
|
+
console.log(`${commands_1.iosIPABuildPath} is created.`);
|
|
24
|
+
}
|
|
18
25
|
if ((0, node_fs_1.existsSync)(commands_1.androidBuildPath)) {
|
|
19
26
|
console.log(`${commands_1.androidBuildPath} already exists.`);
|
|
20
27
|
}
|
package/dist/commands.d.ts
CHANGED
package/dist/commands.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeCommand = exports.androidBuildPath = exports.iosBuildPath = void 0;
|
|
3
|
+
exports.normalizeCommand = exports.androidBuildPath = exports.iosIPABuildPath = exports.iosBuildPath = void 0;
|
|
4
4
|
exports.iosBuildPath = "ios.app";
|
|
5
|
+
exports.iosIPABuildPath = "ios.ipa";
|
|
5
6
|
exports.androidBuildPath = "android.apk";
|
|
6
7
|
const webTestScenarioUrl = "https://app.autify.com/projects/743/scenarios/91437";
|
|
7
8
|
const webTestPlanUrl = "https://app.autify.com/projects/743/test_plans/169408";
|
|
8
9
|
const mobileAndroidTestPlanUrl = "https://mobile-app.autify.com/projects/4yyFEL/test_plans/Wptd97";
|
|
9
10
|
const mobileIosTestPlanUrl = "https://mobile-app.autify.com/projects/4yyFEL/test_plans/kYtlRR";
|
|
11
|
+
const mobileIosRealDeviceTestPlanUrl = "https://mobile-app.autify.com/projects/4yyFEL/test_plans/1EtZ0P";
|
|
10
12
|
const mobileWorkspaceId = "4yyFEL";
|
|
11
13
|
const mobileAndroidBuildId = "d1ulrD";
|
|
12
14
|
const concatFlagAndValue = (args) => {
|
|
@@ -50,6 +52,8 @@ const replaceMobileTetsPlanUrl = (arg, os) => {
|
|
|
50
52
|
return mobileAndroidTestPlanUrl;
|
|
51
53
|
if (os === "ios")
|
|
52
54
|
return mobileIosTestPlanUrl;
|
|
55
|
+
if (os === "iosreal")
|
|
56
|
+
return mobileIosRealDeviceTestPlanUrl;
|
|
53
57
|
}
|
|
54
58
|
return arg;
|
|
55
59
|
};
|
|
@@ -59,8 +63,10 @@ const replaceMobileWorkspaceId = (arg) => arg.startsWith("--workspace-id=")
|
|
|
59
63
|
const replaceMobileAndroidBuildId = (arg) => arg.startsWith("--build-id=") ? `--build-id=${mobileAndroidBuildId}` : arg;
|
|
60
64
|
const replaceMobileAndroidBuildPath = (arg) => arg.replace(/^(--[^=]+=)?.+\.apk$/, `$1${exports.androidBuildPath}`);
|
|
61
65
|
const replaceMobileIosBuildPath = (arg) => arg.replace(/^(--[^=]+=)?.+\.app$/, `$1${exports.iosBuildPath}`);
|
|
66
|
+
const replaceMobileIosIPABuildPath = (arg) => arg.replace(/^(--[^=]+=)?.+\.ipa/, `$1${exports.iosIPABuildPath}`);
|
|
62
67
|
// Assuming ios command contains .app
|
|
63
68
|
const isIos = (args) => args.some((a) => a.endsWith(".app"));
|
|
69
|
+
const isIosIPA = (args) => args.some((a) => a.endsWith(".ipa"));
|
|
64
70
|
const replaceConstants = (args) => {
|
|
65
71
|
if (args[0] === "web") {
|
|
66
72
|
return args
|
|
@@ -68,16 +74,23 @@ const replaceConstants = (args) => {
|
|
|
68
74
|
.map((a) => replaceWebTestPlanUrl(a));
|
|
69
75
|
}
|
|
70
76
|
if (args[0] === "mobile") {
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
if (isIos(args)) {
|
|
78
|
+
return args
|
|
73
79
|
.map((a) => replaceMobileWorkspaceId(a))
|
|
74
80
|
.map((a) => replaceMobileTetsPlanUrl(a, "ios"))
|
|
75
|
-
.map((a) => replaceMobileIosBuildPath(a))
|
|
76
|
-
|
|
81
|
+
.map((a) => replaceMobileIosBuildPath(a));
|
|
82
|
+
}
|
|
83
|
+
if (isIosIPA(args)) {
|
|
84
|
+
return args
|
|
77
85
|
.map((a) => replaceMobileWorkspaceId(a))
|
|
78
|
-
.map((a) => replaceMobileTetsPlanUrl(a, "
|
|
79
|
-
.map((a) =>
|
|
80
|
-
|
|
86
|
+
.map((a) => replaceMobileTetsPlanUrl(a, "iosreal"))
|
|
87
|
+
.map((a) => replaceMobileIosIPABuildPath(a));
|
|
88
|
+
}
|
|
89
|
+
return args
|
|
90
|
+
.map((a) => replaceMobileWorkspaceId(a))
|
|
91
|
+
.map((a) => replaceMobileTetsPlanUrl(a, "android"))
|
|
92
|
+
.map((a) => replaceMobileAndroidBuildId(a))
|
|
93
|
+
.map((a) => replaceMobileAndroidBuildPath(a));
|
|
81
94
|
}
|
|
82
95
|
return args;
|
|
83
96
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable unicorn/filename-case */
|
|
4
|
+
const testAutifyCliSnapshot_1 = require("../helpers/testAutifyCliSnapshot");
|
|
5
|
+
(0, testAutifyCliSnapshot_1.testAutifyCliSnapshot)("mobile build upload /path/to/ios.ipa --workspace-id AAA");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable unicorn/filename-case */
|
|
4
|
+
const testAutifyCliSnapshot_1 = require("../helpers/testAutifyCliSnapshot");
|
|
5
|
+
(0, testAutifyCliSnapshot_1.testAutifyCliSnapshot)("mobile test run https://mobile-app.autify.com/projects/AAA/test_plans/BBB --build-path /path/to/ios.ipa --wait");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autifyhq/autify-cli-integration-test",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "Autify Command Line Interface (CLI) Integration Test",
|
|
5
5
|
"author": "Autify",
|
|
6
6
|
"bin": {
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"@pollyjs/persister": "^6.0.6",
|
|
29
29
|
"@pollyjs/persister-fs": "^6.0.6",
|
|
30
30
|
"cross-env": "^7.0.3",
|
|
31
|
-
"express": "^4.
|
|
32
|
-
"http-proxy-middleware": "^2.0.
|
|
31
|
+
"express": "^4.21.1",
|
|
32
|
+
"http-proxy-middleware": "^2.0.7",
|
|
33
33
|
"jest": "^29.7.0",
|
|
34
34
|
"strip-ansi": "^6.0.1",
|
|
35
|
-
"tslib": "^2.
|
|
35
|
+
"tslib": "^2.8.0",
|
|
36
36
|
"which": "^4.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/express": "^4.17.21",
|
|
40
|
-
"@types/jest": "^29.5.
|
|
41
|
-
"@types/node": "^20.
|
|
40
|
+
"@types/jest": "^29.5.14",
|
|
41
|
+
"@types/node": "^20.16.15",
|
|
42
42
|
"@types/which": "^3.0.4",
|
|
43
43
|
"shx": "^0.3.4",
|
|
44
44
|
"ts-node": "^10.9.2",
|
|
45
|
-
"typescript": "^5.
|
|
45
|
+
"typescript": "^5.6.3"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "shx rm -rf dist && tsc -b",
|