@jahia/cypress 3.21.2 → 3.23.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/ci.startup.sh
CHANGED
|
@@ -12,6 +12,7 @@ echo " MANIFEST: ${MANIFEST}"
|
|
|
12
12
|
echo " TESTS_IMAGE: ${TESTS_IMAGE}"
|
|
13
13
|
echo " JAHIA_IMAGE: ${JAHIA_IMAGE}"
|
|
14
14
|
echo " JAHIA_CLUSTER_ENABLED: ${JAHIA_CLUSTER_ENABLED}"
|
|
15
|
+
echo " NEXUS_USERNAME: ${NEXUS_USERNAME:0:3}***${NEXUS_USERNAME:(-6)}"
|
|
15
16
|
|
|
16
17
|
echo "$(date +'%d %B %Y - %k:%M') [LICENSE] == Check if license exists in env variable (JAHIA_LICENSE) =="
|
|
17
18
|
if [[ -z ${JAHIA_LICENSE} ]]; then
|
package/dist/utils/SAMHelper.js
CHANGED
|
@@ -17,6 +17,7 @@ var waitUntilSAMStatusGreen = function (severity, timeout, interval, greenMatchC
|
|
|
17
17
|
if (interval === void 0) { interval = 500; }
|
|
18
18
|
if (greenMatchCount === void 0) { greenMatchCount = 10; }
|
|
19
19
|
var greenCount = 0;
|
|
20
|
+
var lastGraphqlResponse = {};
|
|
20
21
|
cy.waitUntil(function () {
|
|
21
22
|
return cy.apollo({
|
|
22
23
|
fetchPolicy: 'no-cache',
|
|
@@ -25,15 +26,16 @@ var waitUntilSAMStatusGreen = function (severity, timeout, interval, greenMatchC
|
|
|
25
26
|
severity: severity
|
|
26
27
|
}
|
|
27
28
|
}).then(function (result) {
|
|
28
|
-
var _a, _b, _c, _d;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
29
30
|
var healthStatus = (_d = (_c = (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.admin) === null || _b === void 0 ? void 0 : _b.jahia) === null || _c === void 0 ? void 0 : _c.healthCheck) === null || _d === void 0 ? void 0 : _d.status;
|
|
31
|
+
lastGraphqlResponse = (_g = (_f = (_e = result === null || result === void 0 ? void 0 : result.data) === null || _e === void 0 ? void 0 : _e.admin) === null || _f === void 0 ? void 0 : _f.jahia) === null || _g === void 0 ? void 0 : _g.healthCheck;
|
|
30
32
|
if (healthStatus) {
|
|
31
33
|
greenCount = healthStatus.health === 'GREEN' ? greenCount + 1 : 0;
|
|
32
34
|
return greenCount >= greenMatchCount;
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
}, {
|
|
36
|
-
errorMsg: "Timeout waiting for SAM to be green for severity: " + severity,
|
|
38
|
+
errorMsg: "Timeout waiting for SAM to be green for severity: " + severity + ". Last GraphQL response: " + JSON.stringify(lastGraphqlResponse),
|
|
37
39
|
timeout: timeout,
|
|
38
40
|
verbose: true,
|
|
39
41
|
interval: interval
|
package/env.provision.sh
CHANGED
|
@@ -11,6 +11,7 @@ START_TIME=$SECONDS
|
|
|
11
11
|
|
|
12
12
|
echo "$(date +'%d %B %Y - %k:%M') == Printing the most important environment variables"
|
|
13
13
|
echo " MANIFEST: ${MANIFEST}"
|
|
14
|
+
echo " NEXUS_USERNAME: ${NEXUS_USERNAME:0:3}***${NEXUS_USERNAME:(-6)}"
|
|
14
15
|
echo " TESTS_IMAGE: ${TESTS_IMAGE}"
|
|
15
16
|
echo " JAHIA_IMAGE: ${JAHIA_IMAGE}"
|
|
16
17
|
echo " JAHIA_CLUSTER_ENABLED: ${JAHIA_CLUSTER_ENABLED}"
|
package/env.run.sh
CHANGED
|
@@ -8,6 +8,9 @@ bash $BASEDIR/env.provision.sh
|
|
|
8
8
|
|
|
9
9
|
source $BASEDIR/set-env.sh
|
|
10
10
|
|
|
11
|
+
echo "$(date +'%d %B %Y - %k:%M') == env.run.sh == Printing the most important environment variables"
|
|
12
|
+
echo "$(date +'%d %B %Y - %k:%M') == NEXUS_USERNAME: ${NEXUS_USERNAME:0:3}***${NEXUS_USERNAME:(-6)}"
|
|
13
|
+
|
|
11
14
|
echo "$(date +'%d %B %Y - %k:%M') == Fetching the list of installed modules =="
|
|
12
15
|
bash -c "unset npm_config_package; npx --yes @jahia/jahia-reporter@latest utils:modules \
|
|
13
16
|
--moduleId=\"${MODULE_ID}\" \
|
package/package.json
CHANGED
package/src/utils/SAMHelper.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export const waitUntilSAMStatusGreen = (severity = 'MEDIUM', timeout = 60000, interval = 500, greenMatchCount = 10) : void => {
|
|
12
12
|
let greenCount = 0;
|
|
13
|
+
let lastGraphqlResponse = {};
|
|
13
14
|
cy.waitUntil(() =>
|
|
14
15
|
cy.apollo({
|
|
15
16
|
fetchPolicy: 'no-cache',
|
|
@@ -19,13 +20,14 @@ export const waitUntilSAMStatusGreen = (severity = 'MEDIUM', timeout = 60000, in
|
|
|
19
20
|
}
|
|
20
21
|
}).then(result => {
|
|
21
22
|
const healthStatus = result?.data?.admin?.jahia?.healthCheck?.status;
|
|
23
|
+
lastGraphqlResponse = result?.data?.admin?.jahia?.healthCheck;
|
|
22
24
|
if (healthStatus) {
|
|
23
25
|
greenCount = healthStatus.health === 'GREEN' ? greenCount + 1 : 0;
|
|
24
26
|
return greenCount >= greenMatchCount;
|
|
25
27
|
}
|
|
26
28
|
}),
|
|
27
29
|
{
|
|
28
|
-
errorMsg: `Timeout waiting for SAM to be green for severity: ${severity}`,
|
|
30
|
+
errorMsg: `Timeout waiting for SAM to be green for severity: ${severity}. Last GraphQL response: ${JSON.stringify(lastGraphqlResponse)}`,
|
|
29
31
|
timeout: timeout,
|
|
30
32
|
verbose: true,
|
|
31
33
|
interval: interval
|