@twilio/flex-plugin-e2e-tests 6.3.3-alpha.202403191418 → 6.3.3-alpha.202404010631
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tests/step007.d.ts +0 -2
- package/dist/tests/step007.js +39 -32
- package/dist/tests/step007.js.map +1 -1
- package/dist/tests/step008.js +25 -109
- package/dist/tests/step008.js.map +1 -1
- package/dist/tests/step009.js +59 -47
- package/dist/tests/step009.js.map +1 -1
- package/dist/tests/step010.d.ts +7 -1
- package/dist/tests/step010.js +121 -39
- package/dist/tests/step010.js.map +1 -1
- package/dist/tests/step011.d.ts +1 -7
- package/dist/tests/step011.js +53 -82
- package/dist/tests/step011.js.map +1 -1
- package/dist/tests/step012.js +54 -41
- package/dist/tests/step012.js.map +1 -1
- package/package.json +5 -5
- package/dist/tests/step013.d.ts +0 -3
- package/dist/tests/step013.js +0 -181
- package/dist/tests/step013.js.map +0 -1
package/dist/tests/step010.js
CHANGED
|
@@ -35,81 +35,163 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
+
if (!m) return o;
|
|
41
|
+
var i = m.call(o), r, ar = [], e;
|
|
42
|
+
try {
|
|
43
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
+
}
|
|
45
|
+
catch (error) { e = { error: error }; }
|
|
46
|
+
finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
}
|
|
50
|
+
finally { if (e) throw e.error; }
|
|
51
|
+
}
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
54
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
55
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
56
|
+
to[j] = from[i];
|
|
57
|
+
return to;
|
|
58
|
+
};
|
|
38
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
exports.setupFlexBeforeLocalhost = void 0;
|
|
61
|
+
/* eslint-disable import/no-unused-modules */
|
|
62
|
+
var replace_in_file_1 = require("replace-in-file");
|
|
63
|
+
var core_1 = require("../core");
|
|
39
64
|
var utils_1 = require("../utils");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Log into Flex to set the required flex.twilio.com cookies
|
|
67
|
+
* @param config Contains the urls requires to load in the browser
|
|
68
|
+
* @param secrets Contains account info
|
|
69
|
+
*/
|
|
70
|
+
var setupFlexBeforeLocalhost = function (config, secrets) { return __awaiter(void 0, void 0, void 0, function () {
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0: return [4 /*yield*/, utils_1.Browser.create({ flex: config.hostedFlexBaseUrl, twilioConsole: config.consoleBaseUrl })];
|
|
74
|
+
case 1:
|
|
75
|
+
_a.sent();
|
|
76
|
+
return [4 /*yield*/, utils_1.Browser.app.twilioConsole.login('admin', secrets.api.accountSid, config.localhostPort)];
|
|
77
|
+
case 2:
|
|
78
|
+
_a.sent();
|
|
79
|
+
// Check if Flex loaded okay
|
|
80
|
+
return [4 /*yield*/, utils_1.assertion.app.view.adminDashboard.isVisible()];
|
|
81
|
+
case 3:
|
|
82
|
+
// Check if Flex loaded okay
|
|
83
|
+
_a.sent();
|
|
84
|
+
return [2 /*return*/];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}); };
|
|
88
|
+
exports.setupFlexBeforeLocalhost = setupFlexBeforeLocalhost;
|
|
89
|
+
// Starting multiple plugins using 2 local and one remote works
|
|
43
90
|
var testSuite = function (_a) {
|
|
44
91
|
var scenario = _a.scenario, config = _a.config, secrets = _a.secrets, environment = _a.environment;
|
|
45
92
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
46
|
-
var
|
|
93
|
+
var plugin1, plugin2, plugin3, flags, ext, startPlugin, setup, twilioCliResult, e_1;
|
|
47
94
|
return __generator(this, function (_b) {
|
|
48
95
|
switch (_b.label) {
|
|
49
96
|
case 0:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
97
|
+
plugin1 = scenario.plugins[0];
|
|
98
|
+
plugin2 = scenario.plugins[1];
|
|
99
|
+
plugin3 = scenario.plugins[2];
|
|
100
|
+
utils_1.assertion.not.isNull(plugin1);
|
|
101
|
+
utils_1.assertion.not.isNull(plugin2);
|
|
102
|
+
utils_1.assertion.not.isNull(plugin3);
|
|
103
|
+
if (!plugin1.newlineValue) {
|
|
104
|
+
throw new Error('scenario.plugin.newlineValue does not have a valid value');
|
|
54
105
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
106
|
+
flags = [];
|
|
107
|
+
ext = scenario.isTS ? 'tsx' : 'jsx';
|
|
108
|
+
startPlugin = function (url) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
109
|
+
return [2 /*return*/, utils_1.pluginHelper.waitForPluginToStart(url, core_1.testParams.config.start.timeout, core_1.testParams.config.start.pollInterval)];
|
|
110
|
+
}); }); };
|
|
111
|
+
if (scenario.isTS) {
|
|
112
|
+
flags.push('--typescript');
|
|
60
113
|
}
|
|
61
|
-
return
|
|
114
|
+
setup = function (plugin) { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
|
+
return __generator(this, function (_a) {
|
|
116
|
+
switch (_a.label) {
|
|
117
|
+
case 0: return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:create', plugin.name], __read(flags)))];
|
|
118
|
+
case 1:
|
|
119
|
+
_a.sent();
|
|
120
|
+
utils_1.pluginHelper.changeFlexUIVersionIfRequired(scenario, plugin);
|
|
121
|
+
return [4 /*yield*/, utils_1.spawn('npm', ['i'], { cwd: plugin.dir })];
|
|
122
|
+
case 2:
|
|
123
|
+
_a.sent();
|
|
124
|
+
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
125
|
+
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
126
|
+
from: /This is a dismissible demo component.*/,
|
|
127
|
+
to: plugin.componentText,
|
|
128
|
+
})];
|
|
129
|
+
case 3:
|
|
130
|
+
_a.sent();
|
|
131
|
+
return [2 /*return*/];
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}); };
|
|
135
|
+
// Set up two new plugins
|
|
136
|
+
return [4 /*yield*/, Promise.all([setup(plugin2), setup(plugin3)])];
|
|
137
|
+
case 1:
|
|
138
|
+
// Set up two new plugins
|
|
139
|
+
_b.sent();
|
|
140
|
+
return [4 /*yield*/, utils_1.spawn('twilio', ['flex:plugins:start', '--name', plugin1.name + "@" + plugin1.version, '--name', plugin2.name], { detached: true, cwd: plugin3.dir })];
|
|
62
141
|
case 2:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (!releasedPlugin) {
|
|
66
|
-
throw new Error("Did not find plugin with name: " + plugin.name + " in released plugins");
|
|
67
|
-
}
|
|
68
|
-
return [4 /*yield*/, utils_1.Browser.create({ flex: config.hostedFlexBaseUrl, twilioConsole: config.consoleBaseUrl })];
|
|
142
|
+
twilioCliResult = _b.sent();
|
|
143
|
+
return [4 /*yield*/, Promise.all([startPlugin(plugin2.localhostUrl), startPlugin(plugin3.localhostUrl)])];
|
|
69
144
|
case 3:
|
|
70
145
|
_b.sent();
|
|
71
146
|
_b.label = 4;
|
|
72
147
|
case 4:
|
|
73
|
-
_b.trys.push([4,
|
|
74
|
-
//
|
|
75
|
-
return [4 /*yield*/,
|
|
148
|
+
_b.trys.push([4, 12, 14, 17]);
|
|
149
|
+
// Login to Flex and setup the required flex.twilio.com cookies
|
|
150
|
+
return [4 /*yield*/, exports.setupFlexBeforeLocalhost(config, secrets)];
|
|
76
151
|
case 5:
|
|
77
|
-
//
|
|
152
|
+
// Login to Flex and setup the required flex.twilio.com cookies
|
|
78
153
|
_b.sent();
|
|
79
|
-
|
|
154
|
+
// Load local plugin
|
|
155
|
+
return [4 /*yield*/, utils_1.Browser.loadNewPage({ flex: plugin3.localhostUrl, twilioConsole: config.consoleBaseUrl })];
|
|
80
156
|
case 6:
|
|
157
|
+
// Load local plugin
|
|
81
158
|
_b.sent();
|
|
82
|
-
return [4 /*yield*/, utils_1.Browser.app.
|
|
159
|
+
return [4 /*yield*/, utils_1.Browser.app.twilioConsole.login('admin', secrets.api.accountSid, config.localhostPort, false)];
|
|
83
160
|
case 7:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return [4 /*yield*/, utils_1.pluginHelper.waitForPluginToRelease(releasedPlugin, PLUGIN_RELEASED_TIMEOUT, PLUGIN_RELEASED_POLL_INTERVAL)];
|
|
161
|
+
_b.sent();
|
|
162
|
+
// Check if local plugin loaded okay
|
|
163
|
+
return [4 /*yield*/, utils_1.assertion.app.view.agentDesktop.isVisible()];
|
|
88
164
|
case 8:
|
|
89
|
-
//
|
|
165
|
+
// Check if local plugin loaded okay
|
|
90
166
|
_b.sent();
|
|
91
|
-
return [4 /*yield*/, utils_1.
|
|
167
|
+
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin1.newlineValue)];
|
|
92
168
|
case 9:
|
|
93
169
|
_b.sent();
|
|
94
|
-
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(
|
|
170
|
+
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin2.componentText)];
|
|
95
171
|
case 10:
|
|
96
172
|
_b.sent();
|
|
97
|
-
return [
|
|
173
|
+
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin3.componentText)];
|
|
98
174
|
case 11:
|
|
175
|
+
_b.sent();
|
|
176
|
+
return [3 /*break*/, 17];
|
|
177
|
+
case 12:
|
|
99
178
|
e_1 = _b.sent();
|
|
100
179
|
return [4 /*yield*/, utils_1.Browser.app.takeScreenshot(environment.cwd)];
|
|
101
|
-
case
|
|
180
|
+
case 13:
|
|
102
181
|
_b.sent();
|
|
103
182
|
throw e_1;
|
|
104
|
-
case
|
|
105
|
-
case
|
|
183
|
+
case 14: return [4 /*yield*/, utils_1.Browser.kill()];
|
|
184
|
+
case 15:
|
|
185
|
+
_b.sent();
|
|
186
|
+
return [4 /*yield*/, utils_1.killChildProcess(twilioCliResult.child, environment.operatingSystem)];
|
|
187
|
+
case 16:
|
|
106
188
|
_b.sent();
|
|
107
189
|
return [7 /*endfinally*/];
|
|
108
|
-
case
|
|
190
|
+
case 17: return [2 /*return*/];
|
|
109
191
|
}
|
|
110
192
|
});
|
|
111
193
|
});
|
|
112
194
|
};
|
|
113
|
-
testSuite.description = '
|
|
195
|
+
testSuite.description = 'Running {{twilio flex:plugins:start}} with multiple plugins: 2 local and 1 remote';
|
|
114
196
|
exports.default = testSuite;
|
|
115
197
|
//# sourceMappingURL=step010.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step010.js","sourceRoot":"","sources":["../../src/tests/step010.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step010.js","sourceRoot":"","sources":["../../src/tests/step010.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,mDAAgD;AAEhD,gCAAwE;AACxE,kCAA+F;AAE/F;;;;GAIG;AACI,IAAM,wBAAwB,GAAG,UACtC,MAA4B,EAC5B,OAA8B;;;oBAE9B,qBAAM,eAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,EAAA;;gBA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M,eAAO,CAAC,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,EAAA;;oBAAjD,SAAiD,CAAC;oBAClD,MAAM,GAAC,CAAC;yBAER,qBAAM,eAAO,CAAC,IAAI,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,wBAAgB,CAAC,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,EAAA;;oBAA1E,SAA0E,CAAC;;;;;;CAE9E,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,mFAAmF,CAAC;AAE5G,kBAAe,SAAS,CAAC"}
|
package/dist/tests/step011.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { TestSuite
|
|
2
|
-
/**
|
|
3
|
-
* Log into Flex to set the required flex.twilio.com cookies
|
|
4
|
-
* @param config Contains the urls requires to load in the browser
|
|
5
|
-
* @param secrets Contains account info
|
|
6
|
-
*/
|
|
7
|
-
export declare const setupFlexBeforeLocalhost: (config: TestParams['config'], secrets: TestParams['secrets']) => Promise<void>;
|
|
1
|
+
import { TestSuite } from '../core';
|
|
8
2
|
declare const testSuite: TestSuite;
|
|
9
3
|
export default testSuite;
|
package/dist/tests/step011.js
CHANGED
|
@@ -56,41 +56,20 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
56
56
|
to[j] = from[i];
|
|
57
57
|
return to;
|
|
58
58
|
};
|
|
59
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
60
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
61
|
+
};
|
|
59
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.setupFlexBeforeLocalhost = void 0;
|
|
61
63
|
/* eslint-disable import/no-unused-modules */
|
|
62
|
-
var
|
|
64
|
+
var semver_1 = __importDefault(require("semver"));
|
|
63
65
|
var core_1 = require("../core");
|
|
64
66
|
var utils_1 = require("../utils");
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
* @param config Contains the urls requires to load in the browser
|
|
68
|
-
* @param secrets Contains account info
|
|
69
|
-
*/
|
|
70
|
-
var setupFlexBeforeLocalhost = function (config, secrets) { return __awaiter(void 0, void 0, void 0, function () {
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
switch (_a.label) {
|
|
73
|
-
case 0: return [4 /*yield*/, utils_1.Browser.create({ flex: config.hostedFlexBaseUrl, twilioConsole: config.consoleBaseUrl })];
|
|
74
|
-
case 1:
|
|
75
|
-
_a.sent();
|
|
76
|
-
return [4 /*yield*/, utils_1.Browser.app.twilioConsole.login('admin', secrets.api.accountSid, config.localhostPort)];
|
|
77
|
-
case 2:
|
|
78
|
-
_a.sent();
|
|
79
|
-
// Check if Flex loaded okay
|
|
80
|
-
return [4 /*yield*/, utils_1.assertion.app.view.adminDashboard.isVisible()];
|
|
81
|
-
case 3:
|
|
82
|
-
// Check if Flex loaded okay
|
|
83
|
-
_a.sent();
|
|
84
|
-
return [2 /*return*/];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
exports.setupFlexBeforeLocalhost = setupFlexBeforeLocalhost;
|
|
89
|
-
// Starting multiple plugins using 2 local and one remote works
|
|
67
|
+
var step010_1 = require("./step010");
|
|
68
|
+
// Starting multiple plugins using --include-remote works
|
|
90
69
|
var testSuite = function (_a) {
|
|
91
70
|
var scenario = _a.scenario, config = _a.config, secrets = _a.secrets, environment = _a.environment;
|
|
92
71
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
93
|
-
var plugin1, plugin2, plugin3,
|
|
72
|
+
var plugin1, plugin2, plugin3, resource, oldVersion, twilioCliResult, e_1;
|
|
94
73
|
return __generator(this, function (_b) {
|
|
95
74
|
switch (_b.label) {
|
|
96
75
|
case 0:
|
|
@@ -103,95 +82,87 @@ var testSuite = function (_a) {
|
|
|
103
82
|
if (!plugin1.newlineValue) {
|
|
104
83
|
throw new Error('scenario.plugin.newlineValue does not have a valid value');
|
|
105
84
|
}
|
|
106
|
-
|
|
107
|
-
ext = scenario.isTS ? 'tsx' : 'jsx';
|
|
108
|
-
startPlugin = function (url) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
109
|
-
return [2 /*return*/, utils_1.pluginHelper.waitForPluginToStart(url, core_1.testParams.config.start.timeout, core_1.testParams.config.start.pollInterval)];
|
|
110
|
-
}); }); };
|
|
111
|
-
if (scenario.isTS) {
|
|
112
|
-
flags.push('--typescript');
|
|
113
|
-
}
|
|
114
|
-
setup = function (plugin) { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
|
-
return __generator(this, function (_a) {
|
|
116
|
-
switch (_a.label) {
|
|
117
|
-
case 0: return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:create', plugin.name], __read(flags)))];
|
|
118
|
-
case 1:
|
|
119
|
-
_a.sent();
|
|
120
|
-
utils_1.pluginHelper.changeFlexUIVersionIfRequired(scenario, plugin);
|
|
121
|
-
return [4 /*yield*/, utils_1.spawn('npm', ['i'], { cwd: plugin.dir })];
|
|
122
|
-
case 2:
|
|
123
|
-
_a.sent();
|
|
124
|
-
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
125
|
-
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
126
|
-
from: /This is a dismissible demo component.*/,
|
|
127
|
-
to: plugin.componentText,
|
|
128
|
-
})];
|
|
129
|
-
case 3:
|
|
130
|
-
_a.sent();
|
|
131
|
-
return [2 /*return*/];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}); };
|
|
135
|
-
// Set up two new plugins
|
|
136
|
-
return [4 /*yield*/, Promise.all([setup(plugin2), setup(plugin3)])];
|
|
85
|
+
return [4 /*yield*/, utils_1.api.getLatestPluginVersion(plugin2.name)];
|
|
137
86
|
case 1:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
87
|
+
resource = _b.sent();
|
|
88
|
+
oldVersion = (resource === null || resource === void 0 ? void 0 : resource.version) || '0.0.0';
|
|
89
|
+
plugin2.changelog = "e2e test " + Date.now();
|
|
90
|
+
plugin2.version = semver_1.default.inc(oldVersion, 'patch');
|
|
91
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:deploy', '--changelog', "\"" + plugin2.changelog + "\"", '--patch', '-l', 'debug'], __read(config.regionFlag)), {
|
|
92
|
+
cwd: plugin2.dir,
|
|
93
|
+
})];
|
|
141
94
|
case 2:
|
|
142
|
-
|
|
143
|
-
|
|
95
|
+
_b.sent();
|
|
96
|
+
// Release plugin2
|
|
97
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray([
|
|
98
|
+
'flex:plugins:release',
|
|
99
|
+
'--plugin',
|
|
100
|
+
plugin2.name + "@" + plugin2.version,
|
|
101
|
+
'-l',
|
|
102
|
+
'debug'
|
|
103
|
+
], __read(config.regionFlag)))];
|
|
144
104
|
case 3:
|
|
105
|
+
// Release plugin2
|
|
145
106
|
_b.sent();
|
|
146
|
-
|
|
107
|
+
return [4 /*yield*/, utils_1.spawn('twilio', ['flex:plugins:start --include-remote'], {
|
|
108
|
+
detached: true,
|
|
109
|
+
cwd: plugin3.dir,
|
|
110
|
+
})];
|
|
147
111
|
case 4:
|
|
148
|
-
_b.
|
|
149
|
-
|
|
150
|
-
return [4 /*yield*/, exports.setupFlexBeforeLocalhost(config, secrets)];
|
|
112
|
+
twilioCliResult = _b.sent();
|
|
113
|
+
return [4 /*yield*/, utils_1.pluginHelper.waitForPluginToStart(plugin3.localhostUrl, core_1.testParams.config.start.timeout, core_1.testParams.config.start.pollInterval)];
|
|
151
114
|
case 5:
|
|
115
|
+
_b.sent();
|
|
116
|
+
_b.label = 6;
|
|
117
|
+
case 6:
|
|
118
|
+
_b.trys.push([6, 14, 16, 19]);
|
|
119
|
+
// Login to Flex and setup the required flex.twilio.com cookies
|
|
120
|
+
return [4 /*yield*/, step010_1.setupFlexBeforeLocalhost(config, secrets)];
|
|
121
|
+
case 7:
|
|
152
122
|
// Login to Flex and setup the required flex.twilio.com cookies
|
|
153
123
|
_b.sent();
|
|
154
124
|
// Load local plugin
|
|
155
125
|
return [4 /*yield*/, utils_1.Browser.loadNewPage({ flex: plugin3.localhostUrl, twilioConsole: config.consoleBaseUrl })];
|
|
156
|
-
case
|
|
126
|
+
case 8:
|
|
157
127
|
// Load local plugin
|
|
158
128
|
_b.sent();
|
|
159
129
|
return [4 /*yield*/, utils_1.Browser.app.twilioConsole.login('admin', secrets.api.accountSid, config.localhostPort, false)];
|
|
160
|
-
case
|
|
130
|
+
case 9:
|
|
161
131
|
_b.sent();
|
|
162
132
|
// Check if local plugin loaded okay
|
|
163
133
|
return [4 /*yield*/, utils_1.assertion.app.view.agentDesktop.isVisible()];
|
|
164
|
-
case
|
|
134
|
+
case 10:
|
|
165
135
|
// Check if local plugin loaded okay
|
|
166
136
|
_b.sent();
|
|
167
137
|
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin1.newlineValue)];
|
|
168
|
-
case
|
|
138
|
+
case 11:
|
|
169
139
|
_b.sent();
|
|
170
140
|
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin2.componentText)];
|
|
171
|
-
case
|
|
141
|
+
case 12:
|
|
172
142
|
_b.sent();
|
|
173
143
|
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin3.componentText)];
|
|
174
|
-
case
|
|
144
|
+
case 13:
|
|
175
145
|
_b.sent();
|
|
176
|
-
return [3 /*break*/,
|
|
177
|
-
case
|
|
146
|
+
return [3 /*break*/, 19];
|
|
147
|
+
case 14:
|
|
178
148
|
e_1 = _b.sent();
|
|
179
149
|
return [4 /*yield*/, utils_1.Browser.app.takeScreenshot(environment.cwd)];
|
|
180
|
-
case
|
|
150
|
+
case 15:
|
|
181
151
|
_b.sent();
|
|
182
152
|
throw e_1;
|
|
183
|
-
case
|
|
184
|
-
case
|
|
153
|
+
case 16: return [4 /*yield*/, utils_1.Browser.kill()];
|
|
154
|
+
case 17:
|
|
185
155
|
_b.sent();
|
|
186
156
|
return [4 /*yield*/, utils_1.killChildProcess(twilioCliResult.child, environment.operatingSystem)];
|
|
187
|
-
case
|
|
157
|
+
case 18:
|
|
188
158
|
_b.sent();
|
|
189
159
|
return [7 /*endfinally*/];
|
|
190
|
-
case
|
|
160
|
+
case 19: return [2 /*return*/];
|
|
191
161
|
}
|
|
192
162
|
});
|
|
193
163
|
});
|
|
194
164
|
};
|
|
195
|
-
testSuite.description =
|
|
165
|
+
testSuite.description =
|
|
166
|
+
'Running {{twilio flex:plugins:start --include-remote}} with 1 local plugin and all remote plugins';
|
|
196
167
|
exports.default = testSuite;
|
|
197
168
|
//# sourceMappingURL=step011.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step011.js","sourceRoot":"","sources":["../../src/tests/step011.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step011.js","sourceRoot":"","sources":["../../src/tests/step011.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,kDAA4B;AAE5B,gCAA4D;AAC5D,kCAA0F;AAC1F,qCAAqD;AAErD,yDAAyD;AACzD,IAAM,SAAS,GAAc,UAAO,EAAsD;QAApD,QAAQ,cAAA,EAAE,MAAM,YAAA,EAAE,OAAO,aAAA,EAAE,WAAW,iBAAA;;;;;;oBACpE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC9B,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC9B,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBACpC,iBAAS,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;oBAC9B,iBAAS,CAAC,GAAG,CAAC,M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AC,WAAW,CAAC,GAAG,CAAC,EAAA;;oBAAjD,SAAiD,CAAC;oBAClD,MAAM,GAAC,CAAC;yBAER,qBAAM,eAAO,CAAC,IAAI,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBACrB,qBAAM,wBAAgB,CAAC,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,EAAA;;oBAA1E,SAA0E,CAAC;;;;;;CAE9E,CAAC;AACF,SAAS,CAAC,WAAW;IACnB,mGAAmG,CAAC;AAEtG,kBAAe,SAAS,CAAC"}
|
package/dist/tests/step012.js
CHANGED
|
@@ -61,108 +61,121 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
61
61
|
};
|
|
62
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
63
|
/* eslint-disable import/no-unused-modules */
|
|
64
|
+
var replace_in_file_1 = require("replace-in-file");
|
|
64
65
|
var semver_1 = __importDefault(require("semver"));
|
|
65
66
|
var core_1 = require("../core");
|
|
66
67
|
var utils_1 = require("../utils");
|
|
67
|
-
var
|
|
68
|
-
// Starting multiple plugins using --include-remote works
|
|
68
|
+
var step010_1 = require("./step010");
|
|
69
69
|
var testSuite = function (_a) {
|
|
70
70
|
var scenario = _a.scenario, config = _a.config, secrets = _a.secrets, environment = _a.environment;
|
|
71
71
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
72
|
-
var plugin1, plugin2, plugin3, resource, oldVersion, twilioCliResult, e_1;
|
|
72
|
+
var ext, tmpComponentText, startPlugin, plugin1, plugin2, plugin3, resource, oldVersion, flags, twilioCliResult, e_1;
|
|
73
73
|
return __generator(this, function (_b) {
|
|
74
74
|
switch (_b.label) {
|
|
75
75
|
case 0:
|
|
76
|
+
ext = scenario.isTS ? 'tsx' : 'jsx';
|
|
77
|
+
tmpComponentText = 'This is the new text for the next version!';
|
|
78
|
+
startPlugin = function (url) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
79
|
+
return [2 /*return*/, utils_1.pluginHelper.waitForPluginToStart(url, core_1.testParams.config.start.timeout, core_1.testParams.config.start.pollInterval)];
|
|
80
|
+
}); }); };
|
|
76
81
|
plugin1 = scenario.plugins[0];
|
|
77
82
|
plugin2 = scenario.plugins[1];
|
|
78
83
|
plugin3 = scenario.plugins[2];
|
|
79
84
|
utils_1.assertion.not.isNull(plugin1);
|
|
80
85
|
utils_1.assertion.not.isNull(plugin2);
|
|
81
86
|
utils_1.assertion.not.isNull(plugin3);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
utils_1.assertion.not.isNull(plugin1.newlineValue, 'scenario.plugins[0].newlineValue does not have a valid value');
|
|
88
|
+
// Edit remote plugin to have different text
|
|
89
|
+
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
90
|
+
files: utils_1.joinPath(plugin1.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
91
|
+
from: plugin1.componentText,
|
|
92
|
+
to: tmpComponentText,
|
|
93
|
+
})];
|
|
86
94
|
case 1:
|
|
95
|
+
// Edit remote plugin to have different text
|
|
96
|
+
_b.sent();
|
|
97
|
+
return [4 /*yield*/, utils_1.api.getLatestPluginVersion(plugin1.name)];
|
|
98
|
+
case 2:
|
|
87
99
|
resource = _b.sent();
|
|
88
100
|
oldVersion = (resource === null || resource === void 0 ? void 0 : resource.version) || '0.0.0';
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
cwd: plugin2.dir,
|
|
101
|
+
plugin1.version = semver_1.default.inc(oldVersion, 'patch');
|
|
102
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:deploy', '--changelog', "\"" + plugin1.changelog + "\"", '--patch', '-l', 'debug'], __read(config.regionFlag)), {
|
|
103
|
+
cwd: plugin1.dir,
|
|
93
104
|
})];
|
|
94
|
-
case
|
|
105
|
+
case 3:
|
|
95
106
|
_b.sent();
|
|
96
|
-
// Release
|
|
107
|
+
// Release the edited plugin
|
|
97
108
|
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray([
|
|
98
109
|
'flex:plugins:release',
|
|
99
110
|
'--plugin',
|
|
100
|
-
plugin2.name + "@" + plugin2.version,
|
|
101
111
|
'-l',
|
|
102
|
-
'debug'
|
|
112
|
+
'debug',
|
|
113
|
+
plugin1.name + "@" + plugin1.version
|
|
103
114
|
], __read(config.regionFlag)))];
|
|
104
|
-
case
|
|
105
|
-
// Release
|
|
115
|
+
case 4:
|
|
116
|
+
// Release the edited plugin
|
|
106
117
|
_b.sent();
|
|
107
|
-
|
|
118
|
+
flags = ['--name', plugin1.name + "@" + oldVersion, '--name', plugin2.name];
|
|
119
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:start', '-l', 'debug'], __read(flags)), {
|
|
108
120
|
detached: true,
|
|
109
121
|
cwd: plugin3.dir,
|
|
110
122
|
})];
|
|
111
|
-
case 4:
|
|
112
|
-
twilioCliResult = _b.sent();
|
|
113
|
-
return [4 /*yield*/, utils_1.pluginHelper.waitForPluginToStart(plugin3.localhostUrl, core_1.testParams.config.start.timeout, core_1.testParams.config.start.pollInterval)];
|
|
114
123
|
case 5:
|
|
115
|
-
_b.sent();
|
|
116
|
-
|
|
124
|
+
twilioCliResult = _b.sent();
|
|
125
|
+
return [4 /*yield*/, Promise.all([startPlugin(plugin2.localhostUrl), startPlugin(plugin3.localhostUrl)])];
|
|
117
126
|
case 6:
|
|
118
|
-
_b.
|
|
119
|
-
|
|
120
|
-
return [4 /*yield*/, step011_1.setupFlexBeforeLocalhost(config, secrets)];
|
|
127
|
+
_b.sent();
|
|
128
|
+
_b.label = 7;
|
|
121
129
|
case 7:
|
|
130
|
+
_b.trys.push([7, 15, 17, 20]);
|
|
131
|
+
// Login to Flex and setup the required flex.twilio.com cookies
|
|
132
|
+
return [4 /*yield*/, step010_1.setupFlexBeforeLocalhost(config, secrets)];
|
|
133
|
+
case 8:
|
|
122
134
|
// Login to Flex and setup the required flex.twilio.com cookies
|
|
123
135
|
_b.sent();
|
|
124
136
|
// Load local plugin
|
|
125
137
|
return [4 /*yield*/, utils_1.Browser.loadNewPage({ flex: plugin3.localhostUrl, twilioConsole: config.consoleBaseUrl })];
|
|
126
|
-
case
|
|
138
|
+
case 9:
|
|
127
139
|
// Load local plugin
|
|
128
140
|
_b.sent();
|
|
129
141
|
return [4 /*yield*/, utils_1.Browser.app.twilioConsole.login('admin', secrets.api.accountSid, config.localhostPort, false)];
|
|
130
|
-
case
|
|
142
|
+
case 10:
|
|
131
143
|
_b.sent();
|
|
132
144
|
// Check if local plugin loaded okay
|
|
133
145
|
return [4 /*yield*/, utils_1.assertion.app.view.agentDesktop.isVisible()];
|
|
134
|
-
case
|
|
146
|
+
case 11:
|
|
135
147
|
// Check if local plugin loaded okay
|
|
136
148
|
_b.sent();
|
|
149
|
+
// @ts-ignore
|
|
137
150
|
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin1.newlineValue)];
|
|
138
|
-
case 11:
|
|
139
|
-
_b.sent();
|
|
140
|
-
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin2.componentText)];
|
|
141
151
|
case 12:
|
|
152
|
+
// @ts-ignore
|
|
142
153
|
_b.sent();
|
|
143
|
-
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(
|
|
154
|
+
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin2.componentText)];
|
|
144
155
|
case 13:
|
|
145
156
|
_b.sent();
|
|
146
|
-
return [
|
|
157
|
+
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin3.componentText)];
|
|
147
158
|
case 14:
|
|
159
|
+
_b.sent();
|
|
160
|
+
return [3 /*break*/, 20];
|
|
161
|
+
case 15:
|
|
148
162
|
e_1 = _b.sent();
|
|
149
163
|
return [4 /*yield*/, utils_1.Browser.app.takeScreenshot(environment.cwd)];
|
|
150
|
-
case
|
|
164
|
+
case 16:
|
|
151
165
|
_b.sent();
|
|
152
166
|
throw e_1;
|
|
153
|
-
case
|
|
154
|
-
case
|
|
167
|
+
case 17: return [4 /*yield*/, utils_1.Browser.kill()];
|
|
168
|
+
case 18:
|
|
155
169
|
_b.sent();
|
|
156
170
|
return [4 /*yield*/, utils_1.killChildProcess(twilioCliResult.child, environment.operatingSystem)];
|
|
157
|
-
case
|
|
171
|
+
case 19:
|
|
158
172
|
_b.sent();
|
|
159
173
|
return [7 /*endfinally*/];
|
|
160
|
-
case
|
|
174
|
+
case 20: return [2 /*return*/];
|
|
161
175
|
}
|
|
162
176
|
});
|
|
163
177
|
});
|
|
164
178
|
};
|
|
165
|
-
testSuite.description =
|
|
166
|
-
'Running {{twilio flex:plugins:start --include-remote}} with 1 local plugin and all remote plugins';
|
|
179
|
+
testSuite.description = 'Running {{twilio flex:plugins:start}} with multiple plugins: 2 local and 1 versioned';
|
|
167
180
|
exports.default = testSuite;
|
|
168
181
|
//# sourceMappingURL=step012.js.map
|