@twilio/flex-plugin-e2e-tests 5.0.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.
Files changed (102) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/dist/core/index.d.ts +3 -0
  4. package/dist/core/index.js +16 -0
  5. package/dist/core/index.js.map +1 -0
  6. package/dist/core/parameters.d.ts +54 -0
  7. package/dist/core/parameters.js +95 -0
  8. package/dist/core/parameters.js.map +1 -0
  9. package/dist/core/runner.d.ts +8 -0
  10. package/dist/core/runner.js +313 -0
  11. package/dist/core/runner.js.map +1 -0
  12. package/dist/core/suites.d.ts +11 -0
  13. package/dist/core/suites.js +17 -0
  14. package/dist/core/suites.js.map +1 -0
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +16 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/tests/step001.d.ts +3 -0
  19. package/dist/tests/step001.js +65 -0
  20. package/dist/tests/step001.js.map +1 -0
  21. package/dist/tests/step002.d.ts +3 -0
  22. package/dist/tests/step002.js +133 -0
  23. package/dist/tests/step002.js.map +1 -0
  24. package/dist/tests/step003.d.ts +3 -0
  25. package/dist/tests/step003.js +63 -0
  26. package/dist/tests/step003.js.map +1 -0
  27. package/dist/tests/step004.d.ts +3 -0
  28. package/dist/tests/step004.js +65 -0
  29. package/dist/tests/step004.js.map +1 -0
  30. package/dist/tests/step005.d.ts +3 -0
  31. package/dist/tests/step005.js +86 -0
  32. package/dist/tests/step005.js.map +1 -0
  33. package/dist/tests/step006.d.ts +3 -0
  34. package/dist/tests/step006.js +122 -0
  35. package/dist/tests/step006.js.map +1 -0
  36. package/dist/tests/step007.d.ts +3 -0
  37. package/dist/tests/step007.js +122 -0
  38. package/dist/tests/step007.js.map +1 -0
  39. package/dist/tests/step008.d.ts +3 -0
  40. package/dist/tests/step008.js +103 -0
  41. package/dist/tests/step008.js.map +1 -0
  42. package/dist/tests/step009.d.ts +3 -0
  43. package/dist/tests/step009.js +119 -0
  44. package/dist/tests/step009.js.map +1 -0
  45. package/dist/tests/step010.d.ts +3 -0
  46. package/dist/tests/step010.js +168 -0
  47. package/dist/tests/step010.js.map +1 -0
  48. package/dist/tests/step011.d.ts +3 -0
  49. package/dist/tests/step011.js +164 -0
  50. package/dist/tests/step011.js.map +1 -0
  51. package/dist/tests/step012.d.ts +3 -0
  52. package/dist/tests/step012.js +177 -0
  53. package/dist/tests/step012.js.map +1 -0
  54. package/dist/utils/assertion.d.ts +39 -0
  55. package/dist/utils/assertion.js +151 -0
  56. package/dist/utils/assertion.js.map +1 -0
  57. package/dist/utils/browser.d.ts +20 -0
  58. package/dist/utils/browser.js +142 -0
  59. package/dist/utils/browser.js.map +1 -0
  60. package/dist/utils/console-api.d.ts +43 -0
  61. package/dist/utils/console-api.js +154 -0
  62. package/dist/utils/console-api.js.map +1 -0
  63. package/dist/utils/index.d.ts +9 -0
  64. package/dist/utils/index.js +35 -0
  65. package/dist/utils/index.js.map +1 -0
  66. package/dist/utils/pages/app.d.ts +37 -0
  67. package/dist/utils/pages/app.js +133 -0
  68. package/dist/utils/pages/app.js.map +1 -0
  69. package/dist/utils/pages/index.d.ts +1 -0
  70. package/dist/utils/pages/index.js +14 -0
  71. package/dist/utils/pages/index.js.map +1 -0
  72. package/dist/utils/pages/view/admin-dashboard.d.ts +17 -0
  73. package/dist/utils/pages/view/admin-dashboard.js +91 -0
  74. package/dist/utils/pages/view/admin-dashboard.js.map +1 -0
  75. package/dist/utils/pages/view/agent-desktop.d.ts +17 -0
  76. package/dist/utils/pages/view/agent-desktop.js +91 -0
  77. package/dist/utils/pages/view/agent-desktop.js.map +1 -0
  78. package/dist/utils/pages/view/base.d.ts +29 -0
  79. package/dist/utils/pages/view/base.js +124 -0
  80. package/dist/utils/pages/view/base.js.map +1 -0
  81. package/dist/utils/pages/view/plugins.d.ts +31 -0
  82. package/dist/utils/pages/view/plugins.js +112 -0
  83. package/dist/utils/pages/view/plugins.js.map +1 -0
  84. package/dist/utils/pages/view/twilio-console.d.ts +26 -0
  85. package/dist/utils/pages/view/twilio-console.js +143 -0
  86. package/dist/utils/pages/view/twilio-console.js.map +1 -0
  87. package/dist/utils/plugin-helper.d.ts +6 -0
  88. package/dist/utils/plugin-helper.js +131 -0
  89. package/dist/utils/plugin-helper.js.map +1 -0
  90. package/dist/utils/plugins-api.d.ts +11 -0
  91. package/dist/utils/plugins-api.js +195 -0
  92. package/dist/utils/plugins-api.js.map +1 -0
  93. package/dist/utils/serverless-api.d.ts +7 -0
  94. package/dist/utils/serverless-api.js +117 -0
  95. package/dist/utils/serverless-api.js.map +1 -0
  96. package/dist/utils/spawn.d.ts +26 -0
  97. package/dist/utils/spawn.js +169 -0
  98. package/dist/utils/spawn.js.map +1 -0
  99. package/dist/utils/timers.d.ts +5 -0
  100. package/dist/utils/timers.js +48 -0
  101. package/dist/utils/timers.js.map +1 -0
  102. package/package.json +57 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2018, Twilio, Inc. <help@twilio.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ ![npm](https://img.shields.io/npm/v/flex-plugin-e2e-tests.svg?style=square)
2
+ ![npm](https://img.shields.io/npm/dt/flex-plugin-e2e-tests.svg?style=square)
3
+ [![NpmLicense](https://img.shields.io/npm/l/flex-plugin-e2e-tests.svg?style=square)](../../LICENSE)
4
+
5
+ # Flex Plugin E2E Tests Suite
6
+
7
+ To be filled
8
+
9
+ ### Prerequisites
10
+
11
+ Make sure that chromedriver is on your path and matches your Chrome version
12
+
13
+ ## Create a new Test
14
+
15
+ To create a new test, use:
16
+
17
+ - `npm run create`: creates a new test
18
+ - `npm run create 5`: creates a test at step5 and then auto-increments all existing steps (i.e. step 5 -> 6, step 6-> 7, etc)
19
+
20
+ ## Running Locally
21
+
22
+ To run locally:
23
+
24
+ ```bash
25
+ # cd into this package
26
+ cd packages/flex-plugin-e2e-tests
27
+ npm run build
28
+
29
+ # This is the sandbox environment created to test CLI installation and to create plugin. Remove before re-running a test
30
+ rm -rf ~/.local
31
+ TWILIO_ACCOUNT_SID=ACxxx TWILIO_AUTH_TOKEN=123 PACKAGE_VERSION="4.7.5-beta.0" npm start
32
+ ```
33
+
34
+ You can also run a specific step by using:
35
+
36
+ ```bash
37
+ ... npm start -- --step 2
38
+ ```
39
+
40
+ To run multiple steps:
41
+
42
+ ```bash
43
+ ... npm start -- --step 2 --step 3 --step 10
44
+ ```
45
+
46
+ ## Contributors
47
+
48
+ Thank you to all the lovely contributors to this project. Please check the main repository to see [all contributors](https://github.com/twilio/flex-plugin-builder#contributors).
49
+
50
+ ## License
51
+
52
+ [MIT](../../LICENSE)
@@ -0,0 +1,3 @@
1
+ export { TestParams, TestScenario, testScenarios, testParams, homeDir } from './parameters';
2
+ export { TestSuite, testSuites } from './suites';
3
+ export { default as runner } from './runner';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.runner = exports.testSuites = exports.homeDir = exports.testParams = exports.testScenarios = void 0;
7
+ /* eslint-disable import/no-unused-modules */
8
+ var parameters_1 = require("./parameters");
9
+ Object.defineProperty(exports, "testScenarios", { enumerable: true, get: function () { return parameters_1.testScenarios; } });
10
+ Object.defineProperty(exports, "testParams", { enumerable: true, get: function () { return parameters_1.testParams; } });
11
+ Object.defineProperty(exports, "homeDir", { enumerable: true, get: function () { return parameters_1.homeDir; } });
12
+ var suites_1 = require("./suites");
13
+ Object.defineProperty(exports, "testSuites", { enumerable: true, get: function () { return suites_1.testSuites; } });
14
+ var runner_1 = require("./runner");
15
+ Object.defineProperty(exports, "runner", { enumerable: true, get: function () { return __importDefault(runner_1).default; } });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA6C;AAC7C,2CAA4F;AAAzD,2GAAA,aAAa,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,qGAAA,OAAO,OAAA;AACrE,mCAAiD;AAA7B,oGAAA,UAAU,OAAA;AAC9B,mCAA6C;AAApC,iHAAA,OAAO,OAAU"}
@@ -0,0 +1,54 @@
1
+ import { ConsoleAuthOptions } from '../utils';
2
+ interface Hidden {
3
+ __hidden: boolean;
4
+ }
5
+ export interface PluginType {
6
+ name: string;
7
+ dir: string;
8
+ componentText: string;
9
+ localhostUrl: string;
10
+ }
11
+ export interface TestScenario {
12
+ packageVersion: string;
13
+ plugins: (PluginType & Partial<{
14
+ newlineValue: string;
15
+ changelog: string;
16
+ version: string;
17
+ }>)[];
18
+ flexUIVersion?: string;
19
+ reactVersion?: string;
20
+ isTS?: boolean;
21
+ }
22
+ export interface TestParams {
23
+ environment: {
24
+ nodeVersion: string;
25
+ homeDir: string;
26
+ path: string;
27
+ operatingSystem: string;
28
+ cwd: string;
29
+ ignorePrefix: boolean;
30
+ } & Hidden;
31
+ secrets: {
32
+ console: ConsoleAuthOptions;
33
+ api: {
34
+ accountSid: string;
35
+ authToken: string;
36
+ };
37
+ } & Hidden;
38
+ config: {
39
+ start: {
40
+ timeout: number;
41
+ pollInterval: number;
42
+ };
43
+ consoleBaseUrl: string;
44
+ hostedFlexBaseUrl: string;
45
+ localhostPort: number;
46
+ region?: string;
47
+ regionFlag: string[];
48
+ } & Hidden;
49
+ scenario: TestScenario & Hidden;
50
+ }
51
+ export declare const homeDir: string;
52
+ export declare const testParams: TestParams;
53
+ export declare const testScenarios: Partial<TestScenario>[];
54
+ export {};
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testScenarios = exports.testParams = exports.homeDir = void 0;
4
+ var path_1 = require("path");
5
+ var os_1 = require("os");
6
+ var _a = process.env, TWILIO_REGION = _a.TWILIO_REGION, LOCALHOST_PORT = _a.LOCALHOST_PORT;
7
+ var pluginName = 'flex-e2e-tester-plugin';
8
+ var pluginName2 = 'flex-e2e-tester-plugin-2';
9
+ var pluginName3 = 'flex-e2e-tester-plugin-3';
10
+ var consoleBaseUrl = TWILIO_REGION ? "https://www." + TWILIO_REGION + ".twilio.com" : 'https://www.twilio.com';
11
+ var hostedFlexBaseUrl = TWILIO_REGION ? "https://flex." + TWILIO_REGION + ".twilio.com" : 'https://flex.twilio.com';
12
+ var operatingSystem = os_1.platform();
13
+ var consoleEmail = "CONSOLE_EMAIL_" + operatingSystem;
14
+ var accountSid = "TWILIO_ACCOUNT_SID_" + operatingSystem;
15
+ var authToken = "TWILIO_AUTH_TOKEN_" + operatingSystem;
16
+ // These are required parameters - verify otherwise throw an error
17
+ var requiredEnvs = [accountSid, authToken, consoleEmail, 'CONSOLE_PASSWORD'];
18
+ requiredEnvs.forEach(function (env) {
19
+ if (!process.env[env]) {
20
+ throw new Error(env + " is required");
21
+ }
22
+ });
23
+ // Export parameters for use
24
+ exports.homeDir = path_1.join(process.env.HOME, '.local');
25
+ exports.testParams = {
26
+ environment: {
27
+ __hidden: false,
28
+ path: process.env.PATH,
29
+ nodeVersion: process.env.NODE_VERSION,
30
+ homeDir: exports.homeDir,
31
+ operatingSystem: operatingSystem,
32
+ cwd: process.cwd(),
33
+ ignorePrefix: process.env.NPM_IGNORE_PREFIX === 'true' || false,
34
+ },
35
+ secrets: {
36
+ __hidden: true,
37
+ console: {
38
+ email: process.env[consoleEmail],
39
+ password: process.env.CONSOLE_PASSWORD,
40
+ },
41
+ api: {
42
+ accountSid: process.env[accountSid],
43
+ authToken: process.env[authToken],
44
+ },
45
+ },
46
+ config: {
47
+ start: {
48
+ timeout: 30000,
49
+ pollInterval: 1000,
50
+ },
51
+ __hidden: false,
52
+ consoleBaseUrl: process.env.CONSOLE_BASE_URL || consoleBaseUrl,
53
+ hostedFlexBaseUrl: process.env.HOSTED_FLEX_BASE_URL || hostedFlexBaseUrl,
54
+ region: TWILIO_REGION || '',
55
+ regionFlag: [],
56
+ localhostPort: Number(LOCALHOST_PORT) || 3000,
57
+ },
58
+ scenario: {
59
+ __hidden: false,
60
+ packageVersion: process.env.PACKAGE_VERSION,
61
+ plugins: [
62
+ {
63
+ name: pluginName,
64
+ dir: path_1.join(exports.homeDir, pluginName),
65
+ componentText: "This is a dismissible demo component " + Date.now(),
66
+ localhostUrl: 'http://localhost:3000' || process.env.PLUGIN_BASE_URL,
67
+ },
68
+ {
69
+ name: pluginName2,
70
+ dir: path_1.join(exports.homeDir, pluginName2),
71
+ componentText: "This is a dismissible demo component for plugin2 " + Date.now(),
72
+ localhostUrl: 'http://localhost:3000' || process.env.PLUGIN_BASE_URL,
73
+ },
74
+ {
75
+ name: pluginName3,
76
+ dir: path_1.join(exports.homeDir, pluginName3),
77
+ componentText: "This is a dismissible demo component for plugin3 " + Date.now(),
78
+ localhostUrl: 'http://localhost:3000' || process.env.PLUGIN_BASE_URL,
79
+ },
80
+ ],
81
+ },
82
+ };
83
+ if (exports.testParams.config.region) {
84
+ exports.testParams.config.regionFlag.push('--region', exports.testParams.config.region);
85
+ }
86
+ // All test scenarios to run
87
+ exports.testScenarios = [
88
+ {
89
+ isTS: false,
90
+ },
91
+ {
92
+ isTS: true,
93
+ },
94
+ ];
95
+ //# sourceMappingURL=parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/core/parameters.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAC5B,yBAA8B;AA0DxB,IAAA,KAAoC,OAAO,CAAC,GAAG,EAA7C,aAAa,mBAAA,EAAE,cAAc,oBAAgB,CAAC;AACtD,IAAM,UAAU,GAAG,wBAAwB,CAAC;AAC5C,IAAM,WAAW,GAAG,0BAA0B,CAAC;AAC/C,IAAM,WAAW,GAAG,0BAA0B,CAAC;AAC/C,IAAM,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,iBAAe,aAAa,gBAAa,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAC5G,IAAM,iBAAiB,GAAG,aAAa,CAAC,CAAC,CAAC,kBAAgB,aAAa,gBAAa,CAAC,CAAC,CAAC,yBAAyB,CAAC;AACjH,IAAM,eAAe,GAAG,aAAQ,EAAE,CAAC;AAEnC,IAAM,YAAY,GAAG,mBAAiB,eAAiB,CAAC;AACxD,IAAM,UAAU,GAAG,wBAAsB,eAAiB,CAAC;AAC3D,IAAM,SAAS,GAAG,uBAAqB,eAAiB,CAAC;AAEzD,kEAAkE;AAClE,IAAM,YAAY,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;AAC/E,YAAY,CAAC,OAAO,CAAC,UAAC,GAAG;IACvB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAI,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eAAyB;QACrD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,UAAU;gBAChB,GAAG,EAAE,WAAI,CAAC,eAAO,EAAE,UAAU,CAAC;gBAC9B,aAAa,EAAE,0CAAwC,IAAI,CAAC,GAAG,EAAI;gBACnE,YAAY,EAAE,uBAAuB,IAAK,OAAO,CAAC,GAAG,CAAC,eAA0B;aACjF;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,GAAG,EAAE,WAAI,CAAC,eAAO,EAAE,WAAW,CAAC;gBAC/B,aAAa,EAAE,sDAAoD,IAAI,CAAC,GAAG,EAAI;gBAC/E,YAAY,EAAE,uBAAuB,IAAK,OAAO,CAAC,GAAG,CAAC,eAA0B;aACjF;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,GAAG,EAAE,WAAI,CAAC,eAAO,EAAE,WAAW,CAAC;gBAC/B,aAAa,EAAE,sDAAoD,IAAI,CAAC,GAAG,EAAI;gBAC/E,YAAY,EAAE,uBAAuB,IAAK,OAAO,CAAC,GAAG,CAAC,eAA0B;aACjF;SACF;KACF;CACF,CAAC;AACF,IAAI,kBAAU,CAAC,MAAM,CAAC,MAAM,EAAE;IAC5B,kBAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CACzE;AAED,4BAA4B;AACf,QAAA,aAAa,GAA4B;IACpD;QACE,IAAI,EAAE,KAAK;KACZ;IACD;QACE,IAAI,EAAE,IAAI;KACX;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { TestParams, TestScenario } from '.';
2
+ /**
3
+ * Starts the runner
4
+ * @param testParams the {@link TestParams} to use
5
+ * @param testScenarios the {@link TestScenario} to test against
6
+ */
7
+ declare const runner: (testParams: TestParams, testScenarios: Partial<TestScenario>[]) => Promise<void>;
8
+ export default runner;
@@ -0,0 +1,313 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (_) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ var __read = (this && this.__read) || function (o, n) {
50
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
51
+ if (!m) return o;
52
+ var i = m.call(o), r, ar = [], e;
53
+ try {
54
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55
+ }
56
+ catch (error) { e = { error: error }; }
57
+ finally {
58
+ try {
59
+ if (r && !r.done && (m = i["return"])) m.call(i);
60
+ }
61
+ finally { if (e) throw e.error; }
62
+ }
63
+ return ar;
64
+ };
65
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
66
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
67
+ to[j] = from[i];
68
+ return to;
69
+ };
70
+ var __values = (this && this.__values) || function(o) {
71
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
72
+ if (m) return m.call(o);
73
+ if (o && typeof o.length === "number") return {
74
+ next: function () {
75
+ if (o && i >= o.length) o = void 0;
76
+ return { value: o && o[i++], done: !o };
77
+ }
78
+ };
79
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
80
+ };
81
+ var __importDefault = (this && this.__importDefault) || function (mod) {
82
+ return (mod && mod.__esModule) ? mod : { "default": mod };
83
+ };
84
+ Object.defineProperty(exports, "__esModule", { value: true });
85
+ /* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/prefer-for-of, global-require */
86
+ var fs_1 = require("fs");
87
+ var package_json_1 = __importDefault(require("package-json"));
88
+ var flex_dev_utils_1 = require("@twilio/flex-dev-utils");
89
+ var _1 = require(".");
90
+ var utils_1 = require("../utils");
91
+ /**
92
+ * Main method for running a test
93
+ * @param step the step to run
94
+ * @param params the test params
95
+ */
96
+ var runTest = function (step, params) { return __awaiter(void 0, void 0, void 0, function () {
97
+ var stepStr, testFile, testSuite;
98
+ return __generator(this, function (_a) {
99
+ switch (_a.label) {
100
+ case 0:
101
+ stepStr = '0'.repeat(Math.max(0, 3 - String(step).length)) + String(step);
102
+ testFile = "step" + stepStr;
103
+ testSuite = require(__dirname + "/../tests/" + testFile).default;
104
+ flex_dev_utils_1.logger.info("Step " + stepStr + " - " + testSuite.description + " ..[" + new Date().toISOString() + "]..");
105
+ if (!testSuite.before) return [3 /*break*/, 2];
106
+ return [4 /*yield*/, testSuite.before(params)];
107
+ case 1:
108
+ _a.sent();
109
+ _a.label = 2;
110
+ case 2: return [4 /*yield*/, testSuite(params)];
111
+ case 3:
112
+ _a.sent();
113
+ if (!testSuite.after) return [3 /*break*/, 5];
114
+ return [4 /*yield*/, testSuite.after(params)];
115
+ case 4:
116
+ _a.sent();
117
+ _a.label = 5;
118
+ case 5: return [2 /*return*/];
119
+ }
120
+ });
121
+ }); };
122
+ /**
123
+ * Prints contextual information
124
+ * @param params the test params
125
+ */
126
+ var printParameters = function (params) {
127
+ flex_dev_utils_1.logger.info("Running Plugins E2E Test with parameters:");
128
+ Object.keys(params)
129
+ .filter(function (k) { return !params[k].__hidden; })
130
+ .forEach(function (k) {
131
+ var p = __assign({}, params[k]);
132
+ delete p.__hidden;
133
+ flex_dev_utils_1.logger.info("- " + k + ": " + JSON.stringify(p, null, 2));
134
+ });
135
+ };
136
+ /**
137
+ * Converts the --step arg to steps
138
+ */
139
+ var getArgs = function (flag) {
140
+ var _get = function () {
141
+ var argv = [];
142
+ for (var _i = 0; _i < arguments.length; _i++) {
143
+ argv[_i] = arguments[_i];
144
+ }
145
+ var index = argv.indexOf(flag);
146
+ if (index === -1) {
147
+ return [];
148
+ }
149
+ var arg = argv[index + 1];
150
+ return __spreadArray([arg], __read(_get.apply(void 0, __spreadArray([], __read(argv.splice(index + 1))))));
151
+ };
152
+ return _get.apply(void 0, __spreadArray([], __read(process.argv)));
153
+ };
154
+ /**
155
+ * Runs once before all tests
156
+ * @param testParams the {@link TestParams} to use
157
+ */
158
+ var beforeAll = function (testParams) { return __awaiter(void 0, void 0, void 0, function () {
159
+ var pkg;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ if (!(testParams.scenario.packageVersion === 'latest')) return [3 /*break*/, 2];
164
+ return [4 /*yield*/, package_json_1.default('twilio/flex-plugin-scripts', { version: 'latest' })];
165
+ case 1:
166
+ pkg = _a.sent();
167
+ testParams.scenario.packageVersion = pkg.version;
168
+ _a.label = 2;
169
+ case 2: return [2 /*return*/];
170
+ }
171
+ });
172
+ }); };
173
+ /**
174
+ * Runs before the test
175
+ */
176
+ var beforeEach = function () { return __awaiter(void 0, void 0, void 0, function () {
177
+ return __generator(this, function (_a) {
178
+ switch (_a.label) {
179
+ case 0:
180
+ if (fs_1.existsSync(_1.homeDir)) {
181
+ fs_1.rmdirSync(_1.homeDir, { recursive: true });
182
+ }
183
+ fs_1.mkdirSync(_1.homeDir);
184
+ return [4 /*yield*/, utils_1.api.cleanup()];
185
+ case 1:
186
+ _a.sent();
187
+ return [2 /*return*/];
188
+ }
189
+ });
190
+ }); };
191
+ /**
192
+ * Runs all steps
193
+ * @param testParams the {@link TestParams}
194
+ * @param testScenarios the {@link TestScenario}
195
+ */
196
+ var runAll = function (testParams, testScenarios) { return __awaiter(void 0, void 0, void 0, function () {
197
+ var testScenarios_1, testScenarios_1_1, testScenario, params, i, e_1_1;
198
+ var e_1, _a;
199
+ return __generator(this, function (_b) {
200
+ switch (_b.label) {
201
+ case 0:
202
+ _b.trys.push([0, 8, 9, 10]);
203
+ testScenarios_1 = __values(testScenarios), testScenarios_1_1 = testScenarios_1.next();
204
+ _b.label = 1;
205
+ case 1:
206
+ if (!!testScenarios_1_1.done) return [3 /*break*/, 7];
207
+ testScenario = testScenarios_1_1.value;
208
+ params = __assign({}, testParams);
209
+ params.scenario = __assign(__assign({}, params.scenario), testScenario);
210
+ printParameters(params);
211
+ return [4 /*yield*/, beforeEach()];
212
+ case 2:
213
+ _b.sent();
214
+ i = 0;
215
+ _b.label = 3;
216
+ case 3:
217
+ if (!(i < _1.testSuites.length)) return [3 /*break*/, 6];
218
+ return [4 /*yield*/, runTest(i + 1, params)];
219
+ case 4:
220
+ _b.sent();
221
+ _b.label = 5;
222
+ case 5:
223
+ i++;
224
+ return [3 /*break*/, 3];
225
+ case 6:
226
+ testScenarios_1_1 = testScenarios_1.next();
227
+ return [3 /*break*/, 1];
228
+ case 7: return [3 /*break*/, 10];
229
+ case 8:
230
+ e_1_1 = _b.sent();
231
+ e_1 = { error: e_1_1 };
232
+ return [3 /*break*/, 10];
233
+ case 9:
234
+ try {
235
+ if (testScenarios_1_1 && !testScenarios_1_1.done && (_a = testScenarios_1.return)) _a.call(testScenarios_1);
236
+ }
237
+ finally { if (e_1) throw e_1.error; }
238
+ return [7 /*endfinally*/];
239
+ case 10: return [2 /*return*/];
240
+ }
241
+ });
242
+ }); };
243
+ /**
244
+ * Runs selected steps
245
+ * @param testParams the {@link TestParams}
246
+ */
247
+ var runSelected = function (testParams) { return __awaiter(void 0, void 0, void 0, function () {
248
+ var steps, scenarios, params, scenarios_1, scenarios_1_1, testScenario, i;
249
+ var e_2, _a;
250
+ return __generator(this, function (_b) {
251
+ switch (_b.label) {
252
+ case 0:
253
+ steps = getArgs('--step');
254
+ scenarios = getArgs('--scenario');
255
+ params = __assign({}, testParams);
256
+ try {
257
+ for (scenarios_1 = __values(scenarios), scenarios_1_1 = scenarios_1.next(); !scenarios_1_1.done; scenarios_1_1 = scenarios_1.next()) {
258
+ testScenario = scenarios_1_1.value;
259
+ params.scenario = __assign(__assign({}, params.scenario), JSON.parse(testScenario));
260
+ }
261
+ }
262
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
263
+ finally {
264
+ try {
265
+ if (scenarios_1_1 && !scenarios_1_1.done && (_a = scenarios_1.return)) _a.call(scenarios_1);
266
+ }
267
+ finally { if (e_2) throw e_2.error; }
268
+ }
269
+ printParameters(params);
270
+ i = 0;
271
+ _b.label = 1;
272
+ case 1:
273
+ if (!(i < steps.length)) return [3 /*break*/, 4];
274
+ return [4 /*yield*/, runTest(parseInt(steps[i], 10), __assign({}, params))];
275
+ case 2:
276
+ _b.sent();
277
+ _b.label = 3;
278
+ case 3:
279
+ i++;
280
+ return [3 /*break*/, 1];
281
+ case 4: return [2 /*return*/];
282
+ }
283
+ });
284
+ }); };
285
+ /**
286
+ * Starts the runner
287
+ * @param testParams the {@link TestParams} to use
288
+ * @param testScenarios the {@link TestScenario} to test against
289
+ */
290
+ var runner = function (testParams, testScenarios) { return __awaiter(void 0, void 0, void 0, function () {
291
+ var _testParams, _testScenario;
292
+ return __generator(this, function (_a) {
293
+ switch (_a.label) {
294
+ case 0:
295
+ _testParams = __assign({}, testParams);
296
+ _testScenario = __spreadArray([], __read(testScenarios));
297
+ return [4 /*yield*/, beforeAll(_testParams)];
298
+ case 1:
299
+ _a.sent();
300
+ if (!!process.argv.includes('--step')) return [3 /*break*/, 3];
301
+ return [4 /*yield*/, runAll(_testParams, _testScenario)];
302
+ case 2:
303
+ _a.sent();
304
+ return [2 /*return*/];
305
+ case 3: return [4 /*yield*/, runSelected(_testParams)];
306
+ case 4:
307
+ _a.sent();
308
+ return [2 /*return*/];
309
+ }
310
+ });
311
+ }); };
312
+ exports.default = runner;
313
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/core/runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gJAAgJ;AAChJ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,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAO,MAAM,EAAG,EAAA;;gBAApD,SAAoD,CAAC;;;gBADrB,CAAC,EAAE,CAAA;;;;;KAGtC,CAAC;AAEF;;;;GAIG;AACH,IAAM,MAAM,GAAG,UAAO,UAAsB,EAAE,aAAsC;;;;;gBAC5E,WAAW,gBAAQ,UAAU,CAAE,CAAC;gBAChC,aAAa,4BAAO,aAAa,EAAC,CAAC;gBACzC,qBAAM,SAAS,CAAC,WAAW,CAAC,EAAA;;gBAA5B,SAA4B,CAAC;qBAEzB,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAhC,wBAAgC;gBAClC,qBAAM,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,EAAA;;gBAAxC,SAAwC,CAAC;gBACzC,sBAAO;oBAGT,qBAAM,WAAW,CAAC,WAAW,CAAC,EAAA;;gBAA9B,SAA8B,CAAC;;;;KAChC,CAAC;AAEF,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { TestParams } from './parameters';
2
+ export interface TestSuite {
3
+ (params: TestParams): Promise<void>;
4
+ description: string;
5
+ before?: (params: TestParams) => Promise<void>;
6
+ after?: (params: TestParams) => Promise<void>;
7
+ }
8
+ /**
9
+ * All the test suites that need to run
10
+ */
11
+ export declare const testSuites: string[];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testSuites = void 0;
4
+ var fs_1 = require("fs");
5
+ /**
6
+ * All the test suites that need to run
7
+ */
8
+ exports.testSuites = fs_1.readdirSync(__dirname + "/../tests")
9
+ .filter(function (f) { return f.endsWith('.js'); })
10
+ .filter(function (f) { return f.startsWith('step'); })
11
+ .sort(function (l, r) {
12
+ if (parseInt(l.split('step')[1], 10) > parseInt(r.split('step')[1], 10)) {
13
+ return 1;
14
+ }
15
+ return -1;
16
+ });
17
+ //# sourceMappingURL=suites.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suites.js","sourceRoot":"","sources":["../../src/core/suites.ts"],"names":[],"mappings":";;;AAAA,yBAAiC;AAWjC;;GAEG;AACU,QAAA,UAAU,GAAG,gBAAW,CAAI,SAAS,cAAW,CAAC;KAC3D,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAjB,CAAiB,CAAC;KAChC,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAApB,CAAoB,CAAC;KACnC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC;IACT,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;QACvE,OAAO,CAAC,CAAC;KACV;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/prefer-for-of, global-require */
4
+ var flex_dev_utils_1 = require("@twilio/flex-dev-utils");
5
+ var core_1 = require("./core");
6
+ core_1.runner(core_1.testParams, core_1.testScenarios)
7
+ .then(function () {
8
+ flex_dev_utils_1.logger.success('All E2E tests passed successfully');
9
+ })
10
+ .catch(function (e) {
11
+ flex_dev_utils_1.logger.error('Failed to run E2E tests');
12
+ flex_dev_utils_1.logger.info(e);
13
+ // eslint-disable-next-line no-process-exit
14
+ process.exit(1);
15
+ });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,gJAAgJ;AAChJ,yDAAgD;AAEhD,+BAA2D;AAE3D,aAAM,CAAC,iBAAU,EAAE,oBAAa,CAAC;KAC9B,IAAI,CAAC;IACJ,uBAAM,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;AACtD,CAAC,CAAC;KACD,KAAK,CAAC,UAAC,CAAC;IACP,uBAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACxC,uBAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEf,2CAA2C;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { TestSuite } from '../core';
2
+ declare const testSuite: TestSuite;
3
+ export default testSuite;