@twilio/flex-plugin-e2e-tests 6.4.1 → 6.4.2-alpha.202405230649
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/step006.js +4 -1
- package/dist/tests/step006.js.map +1 -1
- package/dist/tests/step007.d.ts +3 -0
- package/dist/tests/step007.js +33 -39
- package/dist/tests/step007.js.map +1 -1
- package/dist/tests/step008.js +130 -25
- package/dist/tests/step008.js.map +1 -1
- package/dist/tests/step009.js +47 -59
- package/dist/tests/step009.js.map +1 -1
- package/dist/tests/step010.js +36 -88
- package/dist/tests/step010.js.map +1 -1
- package/dist/tests/step011.js +55 -50
- package/dist/tests/step011.js.map +1 -1
- package/dist/tests/step012.js +38 -52
- package/dist/tests/step012.js.map +1 -1
- package/dist/tests/step013.d.ts +3 -0
- package/dist/tests/step013.js +175 -0
- package/dist/tests/step013.js.map +1 -0
- package/dist/utils/pages/view/twilio-console.d.ts +1 -0
- package/dist/utils/pages/view/twilio-console.js +14 -10
- package/dist/utils/pages/view/twilio-console.js.map +1 -1
- package/package.json +5 -5
package/dist/tests/step006.js
CHANGED
|
@@ -52,7 +52,10 @@ var testSuite = function (_a) {
|
|
|
52
52
|
utils_1.assertion.not.isNull(plugin);
|
|
53
53
|
ext = scenario.isTS ? 'tsx' : 'jsx';
|
|
54
54
|
tmpComponentText = 'hot reload works';
|
|
55
|
-
return [4 /*yield*/, utils_1.spawn('twilio', ['flex:plugins:start', '-l', 'debug'], {
|
|
55
|
+
return [4 /*yield*/, utils_1.spawn('twilio', ['flex:plugins:start', '-l', 'debug'], {
|
|
56
|
+
detached: true,
|
|
57
|
+
cwd: plugin.dir,
|
|
58
|
+
})];
|
|
56
59
|
case 1:
|
|
57
60
|
twilioCliResult = _b.sent();
|
|
58
61
|
return [4 /*yield*/, utils_1.pluginHelper.waitForPluginToStart(plugin.localhostUrl, core_1.testParams.config.start.timeout, core_1.testParams.config.start.pollInterval)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step006.js","sourceRoot":"","sources":["../../src/tests/step006.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,mDAAgD;
|
|
1
|
+
{"version":3,"file":"step006.js","sourceRoot":"","sources":["../../src/tests/step006.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,mDAAgD;AAEhD,gCAA4D;AAC5D,kCAA+F;AAE/F,eAAe;AACf,IAAM,SAAS,GAAc,UAAO,EAAsD;QAApD,QAAQ,cAAA,EAAE,MAAM,YAAA,EAAE,OAAO,aAAA,EAAE,WAAW,iBAAA;;;;;;oBACpE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBACnC,iBAAS,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;oBAEvB,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;oBACpC,gBAAgB,GAAG,kBAAkB,CAAC;oBACpB,qBAAM,aAAK,CAAC,QAAQ,EAAE,CAAC,oBAAoB,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;4BACnF,QAAQ,EAAE,IAAI;4BACd,GAAG,EAAE,MAAM,CAAC,GAAG;yBAChB,CAAC,EAAA;;oBAHI,eAAe,GAAG,SAGtB;oBACF,qBAAM,oBAAY,CAAC,oBAAoB,CACrC,MAAM,CAAC,YAAY,EACnB,iBAAU,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAC/B,iBAAU,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CACrC,EAAA;;oBAJD,SAIC,CAAC;oBACF,qBAAM,eAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,C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AAE,gBAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,oBAAkB,GAAK,CAAC;wBAC3F,IAAI,EAAE,gBAAgB;wBACtB,EAAE,EAAE,MAAM,CAAC,aAAa;qBACzB,CAAC,EAAA;;oBAJF,SAIE,CAAC;;;;;CACJ,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,uCAAuC,CAAC;AAEhE,kBAAe,SAAS,CAAC"}
|
package/dist/tests/step007.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { TestSuite } from '../core';
|
|
2
|
+
export declare const originalCode = "const [isOpen, setIsOpen] = useState(true);";
|
|
3
|
+
export declare const codeWithViolation = "const config = {\n colorTheme: {\n baseLight: \"white\",\n },\n sdkOptions: {\n voice: {\n iceServers: [],\n },\n },\n };\n const [isOpen, setIsOpen] = useState(true);";
|
|
4
|
+
export declare const WARNING_REGEX: RegExp;
|
|
2
5
|
declare const testSuite: TestSuite;
|
|
3
6
|
export default testSuite;
|
package/dist/tests/step007.js
CHANGED
|
@@ -56,67 +56,61 @@ 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
|
-
};
|
|
62
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
exports.WARNING_REGEX = exports.codeWithViolation = exports.originalCode = void 0;
|
|
63
61
|
/* eslint-disable import/no-unused-modules */
|
|
64
62
|
var replace_in_file_1 = require("replace-in-file");
|
|
65
|
-
var
|
|
63
|
+
var flex_dev_utils_1 = require("@twilio/flex-dev-utils");
|
|
66
64
|
var utils_1 = require("../utils");
|
|
67
|
-
|
|
65
|
+
exports.originalCode = 'const [isOpen, setIsOpen] = useState(true);';
|
|
66
|
+
exports.codeWithViolation = "const config = {\n colorTheme: {\n baseLight: \"white\",\n },\n sdkOptions: {\n voice: {\n iceServers: [],\n },\n },\n };\n const [isOpen, setIsOpen] = useState(true);";
|
|
67
|
+
exports.WARNING_REGEX = /(Warning:)/;
|
|
68
|
+
// Validate plugin
|
|
68
69
|
var testSuite = function (_a) {
|
|
69
70
|
var scenario = _a.scenario, config = _a.config;
|
|
70
71
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
71
|
-
var plugin, ext,
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
var plugin, ext, result, noWarnings;
|
|
73
|
+
var _b, _c;
|
|
74
|
+
return __generator(this, function (_d) {
|
|
75
|
+
switch (_d.label) {
|
|
74
76
|
case 0:
|
|
75
77
|
plugin = scenario.plugins[0];
|
|
76
|
-
utils_1.assertion.not.isNull(plugin);
|
|
77
78
|
ext = scenario.isTS ? 'tsx' : 'jsx';
|
|
78
|
-
plugin.newlineValue = "This is a dismissible demo component " + Date.now();
|
|
79
|
-
plugin.changelog = "e2e test " + Date.now();
|
|
80
79
|
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
81
80
|
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
82
|
-
from:
|
|
83
|
-
to:
|
|
81
|
+
from: exports.originalCode,
|
|
82
|
+
to: exports.codeWithViolation,
|
|
84
83
|
})];
|
|
85
84
|
case 1:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
resource = _b.sent();
|
|
90
|
-
plugin.version = semver_1.default.inc((resource === null || resource === void 0 ? void 0 : resource.version) || '0.0.0', 'patch');
|
|
91
|
-
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:deploy', '--changelog', "\"" + plugin.changelog + "\"", '--patch', '-l', 'debug'], __read(config.regionFlag)), {
|
|
85
|
+
_d.sent();
|
|
86
|
+
flex_dev_utils_1.logger.info('Running {{twilio flex:plugins:validate}} on a plugin with validation issues');
|
|
87
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:validate', '-l', 'debug'], __read(config.regionFlag)), {
|
|
92
88
|
cwd: plugin.dir,
|
|
93
89
|
})];
|
|
90
|
+
case 2:
|
|
91
|
+
result = _d.sent();
|
|
92
|
+
noWarnings = ((_b = result.stdout.match(exports.WARNING_REGEX)) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
93
|
+
utils_1.assertion.equal(noWarnings, 2);
|
|
94
|
+
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
95
|
+
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
96
|
+
from: exports.codeWithViolation,
|
|
97
|
+
to: exports.originalCode,
|
|
98
|
+
})];
|
|
94
99
|
case 3:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
utils_1.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
utils_1.assertion.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
101
|
-
utils_1.assertion.stringContains(result.stdout, plugin.name);
|
|
102
|
-
return [4 /*yield*/, utils_1.api.getPlugin(plugin.name)];
|
|
100
|
+
_d.sent();
|
|
101
|
+
flex_dev_utils_1.logger.info('Running {{twilio flex:plugins:validate}} on a plugin with 0 validation issues');
|
|
102
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:validate', '-l', 'debug'], __read(config.regionFlag)), {
|
|
103
|
+
cwd: plugin.dir,
|
|
104
|
+
})];
|
|
103
105
|
case 4:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
pluginVersion = _b.sent();
|
|
108
|
-
return [4 /*yield*/, utils_1.api.getLatestPluginVersion(plugin.name)];
|
|
109
|
-
case 6:
|
|
110
|
-
latest = _b.sent();
|
|
111
|
-
utils_1.assertion.equal(apiPlugin.unique_name, plugin.name);
|
|
112
|
-
utils_1.assertion.equal(pluginVersion.version, plugin.version);
|
|
113
|
-
utils_1.assertion.equal(pluginVersion.changelog, plugin.changelog);
|
|
114
|
-
utils_1.assertion.equal(pluginVersion, latest);
|
|
106
|
+
result = _d.sent();
|
|
107
|
+
noWarnings = ((_c = result.stdout.match(exports.WARNING_REGEX)) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
108
|
+
utils_1.assertion.equal(noWarnings, 0);
|
|
115
109
|
return [2 /*return*/];
|
|
116
110
|
}
|
|
117
111
|
});
|
|
118
112
|
});
|
|
119
113
|
};
|
|
120
|
-
testSuite.description = 'Running {{twilio flex:plugins:
|
|
114
|
+
testSuite.description = 'Running {{twilio flex:plugins:validate}}';
|
|
121
115
|
exports.default = testSuite;
|
|
122
116
|
//# sourceMappingURL=step007.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step007.js","sourceRoot":"","sources":["../../src/tests/step007.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step007.js","sourceRoot":"","sources":["../../src/tests/step007.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,mDAAgD;AAChD,yDAAgD;AAEhD,kCAAsD;AAGzC,QAAA,YAAY,GAAG,6CAA6C,CAAC;AAC7D,QAAA,iBAAiB,GAAG,6MAA6M,CAAC;AAClO,QAAA,aAAa,GAAG,YAAY,CAAC;AAE1C,kBAAkB;AAClB,IAAM,SAAS,GAAc,UAAO,EAAgC;QAA9B,QAAQ,cAAA,EAAE,MAAM,YAAA;;;;;;;oBAC9C,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAE7B,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;oBAE1C,qBAAM,+BAAa,CAAC;4BAClB,KAAK,EAAE,gBAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE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,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,0CAA0C,CAAC;AAEnE,kBAAe,SAAS,CAAC"}
|
package/dist/tests/step008.js
CHANGED
|
@@ -57,47 +57,152 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
57
57
|
return to;
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
/* eslint-disable import/no-unused-modules
|
|
60
|
+
/* eslint-disable import/no-unused-modules */
|
|
61
|
+
var replace_in_file_1 = require("replace-in-file");
|
|
62
|
+
var flex_dev_utils_1 = require("@twilio/flex-dev-utils");
|
|
61
63
|
var utils_1 = require("../utils");
|
|
62
|
-
|
|
64
|
+
var step007_1 = require("./step007");
|
|
65
|
+
// Deploy plugin
|
|
63
66
|
var testSuite = function (_a) {
|
|
64
67
|
var scenario = _a.scenario, config = _a.config;
|
|
65
68
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
var plugin, result,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
var plugin, ext, result, noWarnings, resource, apiPlugin, pluginVersion, latest;
|
|
70
|
+
var _b, _c, _d, _e;
|
|
71
|
+
return __generator(this, function (_f) {
|
|
72
|
+
switch (_f.label) {
|
|
69
73
|
case 0:
|
|
70
74
|
plugin = scenario.plugins[0];
|
|
71
75
|
utils_1.assertion.not.isNull(plugin);
|
|
76
|
+
ext = scenario.isTS ? 'tsx' : 'jsx';
|
|
77
|
+
plugin.newlineValue = "This is a dismissible demo component " + Date.now();
|
|
78
|
+
plugin.changelog = "e2e test " + Date.now();
|
|
79
|
+
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
80
|
+
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
81
|
+
from: /This is a dismissible demo component.*/,
|
|
82
|
+
to: plugin.newlineValue,
|
|
83
|
+
})];
|
|
84
|
+
case 1:
|
|
85
|
+
_f.sent();
|
|
86
|
+
// Deploy with validation errors in the plugin with option fix
|
|
87
|
+
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
88
|
+
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
89
|
+
from: step007_1.originalCode,
|
|
90
|
+
to: step007_1.codeWithViolation,
|
|
91
|
+
})];
|
|
92
|
+
case 2:
|
|
93
|
+
// Deploy with validation errors in the plugin with option fix
|
|
94
|
+
_f.sent();
|
|
95
|
+
flex_dev_utils_1.logger.info('Running {{flex:plugins:deploy}} with --option {{fix}}');
|
|
72
96
|
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray([
|
|
73
|
-
'flex:plugins:
|
|
74
|
-
'--
|
|
75
|
-
plugin.
|
|
97
|
+
'flex:plugins:deploy',
|
|
98
|
+
'--changelog',
|
|
99
|
+
"\"" + plugin.changelog + "\"",
|
|
100
|
+
'--patch',
|
|
101
|
+
'--option',
|
|
102
|
+
'fix',
|
|
76
103
|
'-l',
|
|
77
104
|
'debug'
|
|
78
|
-
], __read(config.regionFlag))
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return [4 /*yield*/, utils_1.sleep(1000)];
|
|
82
|
-
case 2:
|
|
83
|
-
_b.sent();
|
|
84
|
-
return [4 /*yield*/, utils_1.api.getActiveRelease()];
|
|
105
|
+
], __read(config.regionFlag)), {
|
|
106
|
+
cwd: plugin.dir,
|
|
107
|
+
})];
|
|
85
108
|
case 3:
|
|
86
|
-
|
|
87
|
-
|
|
109
|
+
result = _f.sent();
|
|
110
|
+
noWarnings = ((_b = result.stdout.match(step007_1.WARNING_REGEX)) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
111
|
+
// Should display violations
|
|
112
|
+
utils_1.assertion.equal(noWarnings, 2);
|
|
113
|
+
// Should not deploy the plugin
|
|
114
|
+
utils_1.assertion.not.stringContains(result.stdout, 'Next Steps');
|
|
115
|
+
utils_1.assertion.not.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
116
|
+
// Deploy with validation errors in the plugin with option deploy
|
|
117
|
+
flex_dev_utils_1.logger.info('Running {{flex:plugins:deploy}} with --option {{deploy}}');
|
|
118
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray([
|
|
119
|
+
'flex:plugins:deploy',
|
|
120
|
+
'--changelog',
|
|
121
|
+
"\"" + plugin.changelog + "\"",
|
|
122
|
+
'--patch',
|
|
123
|
+
'--option',
|
|
124
|
+
'deploy',
|
|
125
|
+
'-l',
|
|
126
|
+
'debug'
|
|
127
|
+
], __read(config.regionFlag)), {
|
|
128
|
+
cwd: plugin.dir,
|
|
129
|
+
})];
|
|
88
130
|
case 4:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
utils_1.assertion.
|
|
93
|
-
|
|
94
|
-
utils_1.assertion.
|
|
95
|
-
utils_1.assertion.
|
|
131
|
+
result = _f.sent();
|
|
132
|
+
noWarnings = ((_c = result.stdout.match(step007_1.WARNING_REGEX)) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
133
|
+
// Should display violations
|
|
134
|
+
utils_1.assertion.equal(noWarnings, 2);
|
|
135
|
+
// Should deploy the plugin
|
|
136
|
+
utils_1.assertion.stringContains(result.stdout, 'Next Steps');
|
|
137
|
+
utils_1.assertion.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
138
|
+
// Deploy the plugin bypassing validation issues found in the plugin
|
|
139
|
+
flex_dev_utils_1.logger.info('Running {{flex:plugins:deploy}} with --bypass-validation');
|
|
140
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray([
|
|
141
|
+
'flex:plugins:deploy',
|
|
142
|
+
'--changelog',
|
|
143
|
+
"\"" + plugin.changelog + "\"",
|
|
144
|
+
'--patch',
|
|
145
|
+
'--bypass-validation',
|
|
146
|
+
'-l',
|
|
147
|
+
'debug'
|
|
148
|
+
], __read(config.regionFlag)), {
|
|
149
|
+
cwd: plugin.dir,
|
|
150
|
+
})];
|
|
151
|
+
case 5:
|
|
152
|
+
result = _f.sent();
|
|
153
|
+
noWarnings = ((_d = result.stdout.match(step007_1.WARNING_REGEX)) === null || _d === void 0 ? void 0 : _d.length) || 0;
|
|
154
|
+
// Should display violations
|
|
155
|
+
utils_1.assertion.equal(noWarnings, 2);
|
|
156
|
+
// Should deploy the plugin
|
|
157
|
+
utils_1.assertion.stringContains(result.stdout, 'Next Steps');
|
|
158
|
+
utils_1.assertion.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
159
|
+
// Deploy without validation errors in the plugin
|
|
160
|
+
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
161
|
+
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
162
|
+
from: step007_1.codeWithViolation,
|
|
163
|
+
to: step007_1.originalCode,
|
|
164
|
+
})];
|
|
165
|
+
case 6:
|
|
166
|
+
// Deploy without validation errors in the plugin
|
|
167
|
+
_f.sent();
|
|
168
|
+
flex_dev_utils_1.logger.info('Running {{flex:plugins:deploy}} on a plugin with 0 valdiation issues');
|
|
169
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray(['flex:plugins:deploy', '--changelog', "\"" + plugin.changelog + "\"", '--patch', '-l', 'debug'], __read(config.regionFlag)), {
|
|
170
|
+
cwd: plugin.dir,
|
|
171
|
+
})];
|
|
172
|
+
case 7:
|
|
173
|
+
result = _f.sent();
|
|
174
|
+
return [4 /*yield*/, utils_1.api.getLatestPluginVersion(plugin.name)];
|
|
175
|
+
case 8:
|
|
176
|
+
resource = _f.sent();
|
|
177
|
+
plugin.version = (resource === null || resource === void 0 ? void 0 : resource.version) || '0.0.2'; // 0.0.2 is the default for first time plugin deployment in a Flex account
|
|
178
|
+
noWarnings = ((_e = result.stdout.match(step007_1.WARNING_REGEX)) === null || _e === void 0 ? void 0 : _e.length) || 0;
|
|
179
|
+
// Should display 0 violations
|
|
180
|
+
utils_1.assertion.equal(noWarnings, 0);
|
|
181
|
+
// Should deploy plugin
|
|
182
|
+
utils_1.assertion.fileExists([plugin.dir, 'build', plugin.name + ".js"]);
|
|
183
|
+
utils_1.assertion.fileContains([plugin.dir, 'build', plugin.name + ".js"], plugin.newlineValue);
|
|
184
|
+
utils_1.assertion.jsonFileContains([plugin.dir, 'package.json'], 'version', plugin.version);
|
|
185
|
+
utils_1.assertion.stringContains(result.stdout, 'Next Steps');
|
|
186
|
+
utils_1.assertion.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
187
|
+
utils_1.assertion.stringContains(result.stdout, plugin.name);
|
|
188
|
+
return [4 /*yield*/, utils_1.api.getPlugin(plugin.name)];
|
|
189
|
+
case 9:
|
|
190
|
+
apiPlugin = _f.sent();
|
|
191
|
+
return [4 /*yield*/, utils_1.api.getPluginVersion(plugin.name, plugin.version)];
|
|
192
|
+
case 10:
|
|
193
|
+
pluginVersion = _f.sent();
|
|
194
|
+
return [4 /*yield*/, utils_1.api.getLatestPluginVersion(plugin.name)];
|
|
195
|
+
case 11:
|
|
196
|
+
latest = _f.sent();
|
|
197
|
+
utils_1.assertion.equal(apiPlugin.unique_name, plugin.name);
|
|
198
|
+
utils_1.assertion.equal(pluginVersion.version, plugin.version);
|
|
199
|
+
utils_1.assertion.equal(pluginVersion.changelog, plugin.changelog);
|
|
200
|
+
utils_1.assertion.equal(pluginVersion, latest);
|
|
96
201
|
return [2 /*return*/];
|
|
97
202
|
}
|
|
98
203
|
});
|
|
99
204
|
});
|
|
100
205
|
};
|
|
101
|
-
testSuite.description = 'Running {{twilio flex:plugins:
|
|
206
|
+
testSuite.description = 'Running {{twilio flex:plugins:deploy}}';
|
|
102
207
|
exports.default = testSuite;
|
|
103
208
|
//# sourceMappingURL=step008.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step008.js","sourceRoot":"","sources":["../../src/tests/step008.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
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AAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;oBAEnC,qBAAM,WAAG,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAA;;oBAA5C,SAAS,GAAG,SAAgC;oBAC5B,qBAAM,WAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,EAAA;;oBAAvE,aAAa,GAAG,SAAuD;oBAC9D,qBAAM,WAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAA;;oBAAtD,MAAM,GAAG,SAA6C;oBAE5D,iBAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;oBACpD,iBAAS,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;oBACvD,iBAAS,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;oBAC3D,iBAAS,CAAC,KAAK,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;;;;;CACxC,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,wCAAwC,CAAC;AAEjE,kBAAe,SAAS,CAAC"}
|
package/dist/tests/step009.js
CHANGED
|
@@ -35,81 +35,69 @@ 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
|
+
/* eslint-disable import/no-unused-modules, @typescript-eslint/no-non-null-assertion */
|
|
39
61
|
var utils_1 = require("../utils");
|
|
40
|
-
|
|
41
|
-
var PLUGIN_RELEASED_POLL_INTERVAL = 5000;
|
|
42
|
-
// Plugin visible on the Hosted Flex
|
|
62
|
+
// Release plugin
|
|
43
63
|
var testSuite = function (_a) {
|
|
44
|
-
var scenario = _a.scenario, config = _a.config
|
|
64
|
+
var scenario = _a.scenario, config = _a.config;
|
|
45
65
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
46
|
-
var plugin, release, plugins
|
|
66
|
+
var plugin, result, release, plugins;
|
|
47
67
|
return __generator(this, function (_b) {
|
|
48
68
|
switch (_b.label) {
|
|
49
69
|
case 0:
|
|
50
70
|
plugin = scenario.plugins[0];
|
|
51
71
|
utils_1.assertion.not.isNull(plugin);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
72
|
+
return [4 /*yield*/, utils_1.spawn('twilio', __spreadArray([
|
|
73
|
+
'flex:plugins:release',
|
|
74
|
+
'--plugin',
|
|
75
|
+
plugin.name + "@" + plugin.version,
|
|
76
|
+
'-l',
|
|
77
|
+
'debug'
|
|
78
|
+
], __read(config.regionFlag)))];
|
|
56
79
|
case 1:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
throw new Error('Account does not have an active release');
|
|
60
|
-
}
|
|
61
|
-
return [4 /*yield*/, utils_1.api.getActivePlugins(release.configuration_sid)];
|
|
80
|
+
result = _b.sent();
|
|
81
|
+
return [4 /*yield*/, utils_1.sleep(1000)];
|
|
62
82
|
case 2:
|
|
63
|
-
plugins = _b.sent();
|
|
64
|
-
releasedPlugin = plugins.plugins.find(function (plgin) { return plgin.unique_name === plugin.name; });
|
|
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 })];
|
|
69
|
-
case 3:
|
|
70
83
|
_b.sent();
|
|
71
|
-
|
|
84
|
+
return [4 /*yield*/, utils_1.api.getActiveRelease()];
|
|
85
|
+
case 3:
|
|
86
|
+
release = _b.sent();
|
|
87
|
+
return [4 /*yield*/, utils_1.api.getActivePlugins(release.configuration_sid)];
|
|
72
88
|
case 4:
|
|
73
|
-
_b.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
_b.sent();
|
|
82
|
-
return [4 /*yield*/, utils_1.Browser.app.getFlexAccountSid()];
|
|
83
|
-
case 7:
|
|
84
|
-
accountSid = _b.sent();
|
|
85
|
-
utils_1.assertion.equal(accountSid, secrets.api.accountSid);
|
|
86
|
-
// Make sure that /plugins contain the plugin
|
|
87
|
-
return [4 /*yield*/, utils_1.pluginHelper.waitForPluginToRelease(releasedPlugin, PLUGIN_RELEASED_TIMEOUT, PLUGIN_RELEASED_POLL_INTERVAL)];
|
|
88
|
-
case 8:
|
|
89
|
-
// Make sure that /plugins contain the plugin
|
|
90
|
-
_b.sent();
|
|
91
|
-
return [4 /*yield*/, utils_1.Browser.app.agentDesktop.open()];
|
|
92
|
-
case 9:
|
|
93
|
-
_b.sent();
|
|
94
|
-
return [4 /*yield*/, utils_1.assertion.app.view.plugins.plugin.isVisible(plugin.newlineValue)];
|
|
95
|
-
case 10:
|
|
96
|
-
_b.sent();
|
|
97
|
-
return [3 /*break*/, 15];
|
|
98
|
-
case 11:
|
|
99
|
-
e_1 = _b.sent();
|
|
100
|
-
return [4 /*yield*/, utils_1.Browser.app.takeScreenshot(environment.cwd)];
|
|
101
|
-
case 12:
|
|
102
|
-
_b.sent();
|
|
103
|
-
throw e_1;
|
|
104
|
-
case 13: return [4 /*yield*/, utils_1.Browser.kill()];
|
|
105
|
-
case 14:
|
|
106
|
-
_b.sent();
|
|
107
|
-
return [7 /*endfinally*/];
|
|
108
|
-
case 15: return [2 /*return*/];
|
|
89
|
+
plugins = _b.sent();
|
|
90
|
+
utils_1.assertion.stringContains(result.stdout, 'successful');
|
|
91
|
+
utils_1.assertion.stringContains(result.stdout, 'Configuration FJ');
|
|
92
|
+
utils_1.assertion.stringContains(result.stdout, 'enabled');
|
|
93
|
+
utils_1.assertion.equal(1, plugins.plugins.length);
|
|
94
|
+
utils_1.assertion.equal(plugins.plugins[0].unique_name, plugin.name);
|
|
95
|
+
utils_1.assertion.equal(plugins.plugins[0].version, plugin.version);
|
|
96
|
+
return [2 /*return*/];
|
|
109
97
|
}
|
|
110
98
|
});
|
|
111
99
|
});
|
|
112
100
|
};
|
|
113
|
-
testSuite.description = '
|
|
101
|
+
testSuite.description = 'Running {{twilio flex:plugins:release}}';
|
|
114
102
|
exports.default = testSuite;
|
|
115
103
|
//# sourceMappingURL=step009.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step009.js","sourceRoot":"","sources":["../../src/tests/step009.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step009.js","sourceRoot":"","sources":["../../src/tests/step009.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uFAAuF;AACvF,kCAAwD;AAGxD,iBAAiB;AACjB,IAAM,SAAS,GAAc,UAAO,EAAgC;QAA9B,QAAQ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