@autifyhq/autify-cli-integration-test 0.7.0 → 0.8.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.
@@ -0,0 +1,59 @@
1
+ {
2
+ "log": {
3
+ "_recordingName": "polly-proxy",
4
+ "creator": {
5
+ "comment": "persister:fs",
6
+ "name": "Polly.JS",
7
+ "version": "6.0.5"
8
+ },
9
+ "entries": [
10
+ {
11
+ "_id": "7df49c91ebfbf219d57667e05fd60fe8",
12
+ "_order": 0,
13
+ "cache": {},
14
+ "request": {
15
+ "bodySize": 0,
16
+ "cookies": [],
17
+ "headers": [],
18
+ "headersSize": 396,
19
+ "httpVersion": "HTTP/1.1",
20
+ "method": "POST",
21
+ "postData": {
22
+ "mimeType": "multipart/form-data; boundary=--------------------------495603915481196874159158",
23
+ "params": []
24
+ },
25
+ "queryString": [],
26
+ "url": "https://mobile-app.autify.com/api/v1/projects/nYmF1n/builds"
27
+ },
28
+ "response": {
29
+ "bodySize": 15,
30
+ "content": {
31
+ "mimeType": "application/json; charset=utf-8",
32
+ "size": 15,
33
+ "text": "{\"id\":\"gquRM0\"}"
34
+ },
35
+ "cookies": [],
36
+ "headers": [],
37
+ "headersSize": 612,
38
+ "httpVersion": "HTTP/1.1",
39
+ "redirectURL": "",
40
+ "status": 201,
41
+ "statusText": "Created"
42
+ },
43
+ "startedDateTime": "2022-08-30T16:29:49.338Z",
44
+ "time": 15006,
45
+ "timings": {
46
+ "blocked": -1,
47
+ "connect": -1,
48
+ "dns": -1,
49
+ "receive": 0,
50
+ "send": 0,
51
+ "ssl": -1,
52
+ "wait": 15006
53
+ }
54
+ }
55
+ ],
56
+ "pages": [],
57
+ "version": "1.2"
58
+ }
59
+ }
@@ -0,0 +1,12 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`autify mobile build upload /path/to/ios.app --workspace-id AAA 1`] = `
4
+ Object {
5
+ "stderr": "",
6
+ "stdout": "[HPM] Proxy created: / -> https://app.autify.com
7
+ [HPM] Proxy created: / -> https://mobile-app.autify.com
8
+ ✅ Successfully uploaded ios.app (ID: gquRM0). See https://mobile-app.autify.com/projects/nYmF1n/builds?os=ios&selectedBuildId=gquRM0&page=1
9
+ [HPM] server close signal received: closing proxy server
10
+ ",
11
+ }
12
+ `;
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ require("../dist/bin/autify-mobile-generate-fake-app.js");
@@ -2,17 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const node_child_process_1 = require("node:child_process");
5
- const node_os_1 = require("node:os");
6
5
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
7
6
  const node_process_1 = require("node:process");
8
7
  // eslint-disable-next-line unicorn/prefer-module
9
8
  const scriptDir = __dirname;
10
9
  const rootDir = node_path_1.default.join(scriptDir, "..", "..");
11
10
  const isRecord = node_process_1.argv[2] === "--record";
12
- let command = isRecord ? "test:record" : "test";
13
- if ((0, node_os_1.platform)() === "win32") {
14
- command = `${command} -- --testPathIgnorePatterns mobileTestRunIos`;
15
- }
11
+ const command = isRecord ? "test:record" : "test";
16
12
  (0, node_child_process_1.execSync)(`npm run ${command}`, {
17
13
  stdio: "inherit",
18
14
  cwd: rootDir,
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- /* eslint-disable unicorn/filename-case */
4
3
  const node_fs_1 = require("node:fs");
5
4
  const node_path_1 = require("node:path");
6
- const commands_1 = require("../../commands");
5
+ const commands_1 = require("../commands");
7
6
  // https://commons.wikimedia.org/wiki/File:Transparent.gif
8
7
  const tinyBinary = Buffer.from("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "base64");
9
8
  // Generate fake build files if not exiting.
@@ -14,10 +13,12 @@ if ((0, node_fs_1.existsSync)(commands_1.iosBuildPath)) {
14
13
  else {
15
14
  (0, node_fs_1.mkdirSync)(commands_1.iosBuildPath); // *.app is a directory
16
15
  (0, node_fs_1.writeFileSync)((0, node_path_1.join)(commands_1.iosBuildPath, "ios"), tinyBinary); // Add a fake binary file
16
+ console.log(`${commands_1.iosBuildPath} is created.`);
17
17
  }
18
18
  if ((0, node_fs_1.existsSync)(commands_1.androidBuildPath)) {
19
19
  console.log(`${commands_1.androidBuildPath} already exists.`);
20
20
  }
21
21
  else {
22
22
  (0, node_fs_1.writeFileSync)(commands_1.androidBuildPath, tinyBinary); // Create a fake binary file
23
+ console.log(`${commands_1.androidBuildPath} is created.`);
23
24
  }
@@ -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.app --workspace-id AAA");
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@autifyhq/autify-cli-integration-test",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Autify Command Line Interface (CLI) Integration Test",
5
5
  "author": "Autify",
6
6
  "bin": {
7
7
  "autify-cli-integration-test": "bin/autify-cli-integration-test.js",
8
+ "autify-mobile-generate-fake-app": "bin/autify-mobile-generate-fake-app.js",
8
9
  "autify-with-proxy": "bin/autify-with-proxy.js"
9
10
  },
10
11
  "homepage": "https://github.com/autifyhq/autify-cli",
@@ -45,8 +46,7 @@
45
46
  "scripts": {
46
47
  "build": "shx rm -rf dist && tsc -b",
47
48
  "prepack": "npm run build",
48
- "generate-fake-app": "node dist/test/helpers/generateFakeApp.js",
49
- "test": "npm run generate-fake-app && cross-env AUTIFY_TEST_WAIT_INTERVAL_SECOND=0 jest dist/test",
49
+ "test": "autify-mobile-generate-fake-app && cross-env AUTIFY_TEST_WAIT_INTERVAL_SECOND=0 jest dist/test",
50
50
  "test:record": "AUTIFY_POLLY_RECORD=1 jest dist/test --updateSnapshot"
51
51
  },
52
52
  "engines": {