@twilio/flex-plugin-e2e-tests 6.3.3-alpha.202403191418 → 6.3.3-alpha.202403191805
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
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TestSuite } from '../core';
|
|
2
2
|
export declare const originalCode = "const [isOpen, setIsOpen] = useState(true);";
|
|
3
|
-
export declare const codeWithViolation = "
|
|
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;
|
|
4
5
|
declare const testSuite: TestSuite;
|
|
5
6
|
export default testSuite;
|
package/dist/tests/step007.js
CHANGED
|
@@ -57,13 +57,14 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
57
57
|
return to;
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.codeWithViolation = exports.originalCode = void 0;
|
|
60
|
+
exports.WARNING_REGEX = exports.codeWithViolation = exports.originalCode = void 0;
|
|
61
61
|
/* eslint-disable import/no-unused-modules */
|
|
62
62
|
var replace_in_file_1 = require("replace-in-file");
|
|
63
63
|
var flex_dev_utils_1 = require("@twilio/flex-dev-utils");
|
|
64
64
|
var utils_1 = require("../utils");
|
|
65
65
|
exports.originalCode = 'const [isOpen, setIsOpen] = useState(true);';
|
|
66
|
-
exports.codeWithViolation = "
|
|
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:)/;
|
|
67
68
|
// Validate plugin
|
|
68
69
|
var testSuite = function (_a) {
|
|
69
70
|
var scenario = _a.scenario, config = _a.config;
|
|
@@ -88,8 +89,8 @@ var testSuite = function (_a) {
|
|
|
88
89
|
})];
|
|
89
90
|
case 2:
|
|
90
91
|
result = _d.sent();
|
|
91
|
-
noWarnings = ((_b = result.stdout.match(
|
|
92
|
-
utils_1.assertion.equal(noWarnings,
|
|
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);
|
|
93
94
|
return [4 /*yield*/, replace_in_file_1.replaceInFile({
|
|
94
95
|
files: utils_1.joinPath(plugin.dir, 'src', 'components', 'CustomTaskList', "CustomTaskList." + ext),
|
|
95
96
|
from: exports.codeWithViolation,
|
|
@@ -103,7 +104,7 @@ var testSuite = function (_a) {
|
|
|
103
104
|
})];
|
|
104
105
|
case 4:
|
|
105
106
|
result = _d.sent();
|
|
106
|
-
noWarnings = ((_c = result.stdout.match(
|
|
107
|
+
noWarnings = ((_c = result.stdout.match(exports.WARNING_REGEX)) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
107
108
|
utils_1.assertion.equal(noWarnings, 0);
|
|
108
109
|
return [2 /*return*/];
|
|
109
110
|
}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
1
|
+
{"version":3,"file":"step007.js","sourceRoot":"","sources":["../../src/tests/step007.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,mD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,yBAAiB;4BACvB,EAAE,EAAE,oBAAY;yBACjB,CAAC,EAAA;;oBAJF,SAIE,CAAC;oBAEH,uBAAM,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAC;oBAEpF,qBAAM,aAAK,CAAC,QAAQ,iBAAG,uBAAuB,EAAE,IAAI,EAAE,OAAO,UAAK,MAAM,CAAC,UAAU,IAAG;4BAC7F,GAAG,EAAE,MAAM,CAAC,GAAG;yBAChB,CAAC,EAAA;;oBAFF,MAAM,GAAG,SAEP,CAAC;oBACH,UAAU,GAAG,CAAA,MAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAa,CAAC,0CAAE,MAAM,KAAI,CAAC,CAAC;oBAE7D,iBAAS,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;;;;;CAChC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,0CAA0C,CAAC;AAEnE,kBAAe,SAAS,CAAC"}
|
package/dist/tests/step008.js
CHANGED
|
@@ -107,9 +107,9 @@ var testSuite = function (_a) {
|
|
|
107
107
|
})];
|
|
108
108
|
case 3:
|
|
109
109
|
result = _e.sent();
|
|
110
|
-
noWarnings = ((_b = result.stdout.match(
|
|
110
|
+
noWarnings = ((_b = result.stdout.match(step007_1.WARNING_REGEX)) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
111
111
|
// Should display violations
|
|
112
|
-
utils_1.assertion.equal(noWarnings,
|
|
112
|
+
utils_1.assertion.equal(noWarnings, 2);
|
|
113
113
|
// Should not deploy the plugin
|
|
114
114
|
utils_1.assertion.not.stringContains(result.stdout, 'Next Steps');
|
|
115
115
|
utils_1.assertion.not.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
@@ -129,9 +129,9 @@ var testSuite = function (_a) {
|
|
|
129
129
|
})];
|
|
130
130
|
case 4:
|
|
131
131
|
result = _e.sent();
|
|
132
|
-
noWarnings = ((_c = result.stdout.match(
|
|
132
|
+
noWarnings = ((_c = result.stdout.match(step007_1.WARNING_REGEX)) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
133
133
|
// Should display violations
|
|
134
|
-
utils_1.assertion.equal(noWarnings,
|
|
134
|
+
utils_1.assertion.equal(noWarnings, 2);
|
|
135
135
|
// Should deploy the plugin
|
|
136
136
|
utils_1.assertion.stringContains(result.stdout, 'Next Steps');
|
|
137
137
|
utils_1.assertion.stringContains(result.stdout, 'twilio flex:plugins:release');
|
|
@@ -154,7 +154,7 @@ var testSuite = function (_a) {
|
|
|
154
154
|
case 7:
|
|
155
155
|
resource = _e.sent();
|
|
156
156
|
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
|
|
157
|
-
noWarnings = ((_d = result.stdout.match(
|
|
157
|
+
noWarnings = ((_d = result.stdout.match(step007_1.WARNING_REGEX)) === null || _d === void 0 ? void 0 : _d.length) || 0;
|
|
158
158
|
// Should display 0 violations
|
|
159
159
|
utils_1.assertion.equal(noWarnings, 0);
|
|
160
160
|
// Should deploy plugin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step008.js","sourceRoot":"","sources":["../../src/tests/step008.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,mDAAgD;
|
|
1
|
+
{"version":3,"file":"step008.js","sourceRoot":"","sources":["../../src/tests/step008.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,mDAAgD;AAChD,yDAAgD;AAEhD,kCAA2D;AAE3D,qCAA2E;AAE3E,gBAAgB;AAChB,IAAM,SAAS,GAAc,UAAO,EAAgC;QAA9B,QAAQ,cAAA,EAAE,MAAM,YAAA;;;;;;;oBAC9C,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,C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,EAAE,YAAY,CAAC,CAAC;oBACtD,iBAAS,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;oBACvE,iBAAS,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twilio/flex-plugin-e2e-tests",
|
|
3
|
-
"version": "6.3.3-alpha.
|
|
3
|
+
"version": "6.3.3-alpha.202403191805",
|
|
4
4
|
"description": "Flex Plugin E2E Tests framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flex",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"test": "exit 0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@twilio/flex-dev-utils": "6.3.3-alpha.
|
|
38
|
-
"@twilio/flex-plugins-api-client": "6.3.3-alpha.
|
|
37
|
+
"@twilio/flex-dev-utils": "6.3.3-alpha.202403191805",
|
|
38
|
+
"@twilio/flex-plugins-api-client": "6.3.3-alpha.202403191805",
|
|
39
39
|
"axios": "^0.24.0",
|
|
40
40
|
"lodash": "4.17.21",
|
|
41
41
|
"package-json": "^7.0.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "1ef8d0c76526328fc4a57d2ab8dc1cc8ea77b7f6"
|
|
57
57
|
}
|