@jahia/cypress 3.29.0 → 3.31.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.
- package/dist/utils/SAMHelper.d.ts +1 -1
- package/dist/utils/SAMHelper.js +5 -3
- package/env.run.sh +1 -1
- package/package.json +1 -1
- package/src/utils/SAMHelper.ts +5 -3
|
@@ -12,7 +12,7 @@ export declare const healthCheck: (severity?: string, probeHealthFilter?: string
|
|
|
12
12
|
* @param probeHealthFilter the filter for the health check probes, default is GREEN
|
|
13
13
|
* @param timeout the timeout in milliseconds, default is 60000
|
|
14
14
|
* @param interval the interval in milliseconds, default is 500
|
|
15
|
-
* @param statusMatchCount the number of consecutive status matches before the waitUntil resolves, default is
|
|
15
|
+
* @param statusMatchCount the number of consecutive status matches before the waitUntil resolves, default is 3
|
|
16
16
|
*/
|
|
17
17
|
export declare const waitUntilSAMStatus: ({ expectedHealth, severity, probeHealthFilter, timeout, interval, statusMatchCount }: {
|
|
18
18
|
expectedHealth: any;
|
package/dist/utils/SAMHelper.js
CHANGED
|
@@ -31,10 +31,10 @@ exports.healthCheck = healthCheck;
|
|
|
31
31
|
* @param probeHealthFilter the filter for the health check probes, default is GREEN
|
|
32
32
|
* @param timeout the timeout in milliseconds, default is 60000
|
|
33
33
|
* @param interval the interval in milliseconds, default is 500
|
|
34
|
-
* @param statusMatchCount the number of consecutive status matches before the waitUntil resolves, default is
|
|
34
|
+
* @param statusMatchCount the number of consecutive status matches before the waitUntil resolves, default is 3
|
|
35
35
|
*/
|
|
36
36
|
var waitUntilSAMStatus = function (_a) {
|
|
37
|
-
var expectedHealth = _a.expectedHealth, _b = _a.severity, severity = _b === void 0 ? 'MEDIUM' : _b, _c = _a.probeHealthFilter, probeHealthFilter = _c === void 0 ? 'GREEN' : _c, _d = _a.timeout, timeout = _d === void 0 ? 60000 : _d, _e = _a.interval, interval = _e === void 0 ? 500 : _e, _f = _a.statusMatchCount, statusMatchCount = _f === void 0 ?
|
|
37
|
+
var expectedHealth = _a.expectedHealth, _b = _a.severity, severity = _b === void 0 ? 'MEDIUM' : _b, _c = _a.probeHealthFilter, probeHealthFilter = _c === void 0 ? 'GREEN' : _c, _d = _a.timeout, timeout = _d === void 0 ? 60000 : _d, _e = _a.interval, interval = _e === void 0 ? 500 : _e, _f = _a.statusMatchCount, statusMatchCount = _f === void 0 ? 3 : _f;
|
|
38
38
|
var statusCount = 0;
|
|
39
39
|
var lastGraphqlResponse = {};
|
|
40
40
|
cy.waitUntil(function () {
|
|
@@ -47,7 +47,9 @@ var waitUntilSAMStatus = function (_a) {
|
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
}, {
|
|
50
|
-
errorMsg:
|
|
50
|
+
errorMsg: function () {
|
|
51
|
+
return "Timeout waiting for SAM to be " + expectedHealth + " for severity: " + severity + " and probeHealthFilter: " + probeHealthFilter + ". Last GraphQL response: " + JSON.stringify(lastGraphqlResponse);
|
|
52
|
+
},
|
|
51
53
|
timeout: timeout,
|
|
52
54
|
verbose: true,
|
|
53
55
|
interval: interval
|
package/env.run.sh
CHANGED
|
@@ -48,7 +48,7 @@ fi
|
|
|
48
48
|
|
|
49
49
|
echo "$(date +'%d %B %Y - %k:%M') == Running Cypress with configuration file ${CYPRESS_CONFIGURATION_FILE} =="
|
|
50
50
|
|
|
51
|
-
yarn e2e:ci --config-file "${CYPRESS_CONFIGURATION_FILE}"
|
|
51
|
+
NO_COLOR=1 yarn e2e:ci --config-file "${CYPRESS_CONFIGURATION_FILE}"
|
|
52
52
|
|
|
53
53
|
if [[ $? -eq 0 ]]; then
|
|
54
54
|
echo "$(date +'%d %B %Y - %k:%M') == Full execution successful =="
|
package/package.json
CHANGED
package/src/utils/SAMHelper.ts
CHANGED
|
@@ -28,9 +28,9 @@ export const healthCheck = (severity = 'MEDIUM', probeHealthFilter = 'GREEN'): C
|
|
|
28
28
|
* @param probeHealthFilter the filter for the health check probes, default is GREEN
|
|
29
29
|
* @param timeout the timeout in milliseconds, default is 60000
|
|
30
30
|
* @param interval the interval in milliseconds, default is 500
|
|
31
|
-
* @param statusMatchCount the number of consecutive status matches before the waitUntil resolves, default is
|
|
31
|
+
* @param statusMatchCount the number of consecutive status matches before the waitUntil resolves, default is 3
|
|
32
32
|
*/
|
|
33
|
-
export const waitUntilSAMStatus = ({expectedHealth, severity = 'MEDIUM', probeHealthFilter = 'GREEN', timeout = 60000, interval = 500, statusMatchCount =
|
|
33
|
+
export const waitUntilSAMStatus = ({expectedHealth, severity = 'MEDIUM', probeHealthFilter = 'GREEN', timeout = 60000, interval = 500, statusMatchCount = 3}) : void => {
|
|
34
34
|
let statusCount = 0;
|
|
35
35
|
let lastGraphqlResponse = {};
|
|
36
36
|
cy.waitUntil(() =>
|
|
@@ -43,7 +43,9 @@ export const waitUntilSAMStatus = ({expectedHealth, severity = 'MEDIUM', probeHe
|
|
|
43
43
|
}
|
|
44
44
|
}),
|
|
45
45
|
{
|
|
46
|
-
errorMsg:
|
|
46
|
+
errorMsg: () => {
|
|
47
|
+
return `Timeout waiting for SAM to be ${expectedHealth} for severity: ${severity} and probeHealthFilter: ${probeHealthFilter}. Last GraphQL response: ${JSON.stringify(lastGraphqlResponse)}`;
|
|
48
|
+
},
|
|
47
49
|
timeout: timeout,
|
|
48
50
|
verbose: true,
|
|
49
51
|
interval: interval
|