@camunda/e2e-test-suite 0.0.1164 → 0.0.1166
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.
|
@@ -1546,10 +1546,36 @@ class ModelerCreatePage {
|
|
|
1546
1546
|
// deciding, then branch:
|
|
1547
1547
|
// - "Connect cluster" button visible → no cluster connected, connect one
|
|
1548
1548
|
// - Deploy button enabled → a cluster is already connected
|
|
1549
|
-
// - deploy
|
|
1549
|
+
// - deploy already complete → re-entering an already deployed
|
|
1550
1550
|
// process application, where the Deploy button is replaced by the
|
|
1551
|
-
//
|
|
1552
|
-
// two states is ever reached
|
|
1551
|
+
// deploy step's completion state and "Connect cluster" by "Change",
|
|
1552
|
+
// so neither of the first two states is ever reached
|
|
1553
|
+
//
|
|
1554
|
+
// The success badge is NOT a usable completion signal, not even by
|
|
1555
|
+
// attachment: the current Test Studio panel does not render it at all,
|
|
1556
|
+
// so a wait on it can never resolve — that is what made step 2 below
|
|
1557
|
+
// burn its whole 90s budget on every 8.10 nightly from 2026-09-10 on,
|
|
1558
|
+
// while the same flow stayed green on 8.9 and SM-8.10, both of which
|
|
1559
|
+
// already probe the panel instead. The deploy step reports completion
|
|
1560
|
+
// three other ways: the "Deployment complete" icon in the accordion
|
|
1561
|
+
// HEADING (which stays on screen when the item collapses), the
|
|
1562
|
+
// "Configure test case" step unlocking, and the configure-test panel
|
|
1563
|
+
// opening. Accept any of them, keep the badge for older modeler builds.
|
|
1564
|
+
// A failed deploy leaves all four absent, so both the settle wait and
|
|
1565
|
+
// step 2 still fail on a real deploy failure rather than masking it.
|
|
1566
|
+
//
|
|
1567
|
+
// This probe has to be shared with the settle wait, not just used in
|
|
1568
|
+
// step 2: the already-deployed state is exactly the one that renders no
|
|
1569
|
+
// "Connect cluster" button and no enabled Deploy button, so a settle
|
|
1570
|
+
// wait keyed on the badge alone can never see it and would throw here
|
|
1571
|
+
// before step 2 is ever reached.
|
|
1572
|
+
const deployCompleteIcon = this.page.locator('[aria-label="Deployment complete"]');
|
|
1573
|
+
const isDeployComplete = async () => (await isDeployReported()) ||
|
|
1574
|
+
(await deployCompleteIcon.isVisible().catch(() => false)) ||
|
|
1575
|
+
(await configureTestPanel.isVisible().catch(() => false)) ||
|
|
1576
|
+
(await configureScenarioButton
|
|
1577
|
+
.isEnabled({ timeout: 3000 })
|
|
1578
|
+
.catch(() => false));
|
|
1553
1579
|
const connectClusterButton = this.page.getByRole('button', {
|
|
1554
1580
|
name: 'Connect cluster',
|
|
1555
1581
|
});
|
|
@@ -1560,8 +1586,11 @@ class ModelerCreatePage {
|
|
|
1560
1586
|
const deployEnabled = await setupDeployButton
|
|
1561
1587
|
.isEnabled()
|
|
1562
1588
|
.catch(() => false);
|
|
1563
|
-
|
|
1564
|
-
|
|
1589
|
+
// Evaluated last and only when needed: its isEnabled() probe waits on
|
|
1590
|
+
// a button that is absent on most builds, so short-circuiting keeps
|
|
1591
|
+
// the common "Deploy is enabled" poll cheap.
|
|
1592
|
+
const settled = connectVisible || deployEnabled || (await isDeployComplete());
|
|
1593
|
+
(0, test_1.expect)(settled).toBe(true);
|
|
1565
1594
|
}).toPass({ timeout: 30000 });
|
|
1566
1595
|
const needsClusterConnect = await connectClusterButton
|
|
1567
1596
|
.isVisible()
|
|
@@ -1602,17 +1631,16 @@ class ModelerCreatePage {
|
|
|
1602
1631
|
// deploy step complete. checkExistingDeployment only runs when
|
|
1603
1632
|
// processApplicationId is defined, which it now is, so re-entering
|
|
1604
1633
|
// Play on an already-deployed process application legitimately
|
|
1605
|
-
// has nothing to deploy and renders no Deploy button at all.
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
.isEnabled({ timeout: 3000 })
|
|
1609
|
-
.catch(() => false));
|
|
1610
|
-
if (!alreadyDeployed) {
|
|
1634
|
+
// has nothing to deploy and renders no Deploy button at all. Keyed on
|
|
1635
|
+
// the shared completion probe defined above, never on the success badge.
|
|
1636
|
+
if (!(await isDeployComplete())) {
|
|
1611
1637
|
// Step 2: deploy — wait for enabled; button stays disabled until the cluster
|
|
1612
1638
|
// connection is confirmed by the backend after the Save in step 1.
|
|
1613
1639
|
await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 30000 });
|
|
1614
1640
|
await setupDeployButton.click({ timeout });
|
|
1615
|
-
await (0, test_1.expect)(
|
|
1641
|
+
await (0, test_1.expect)(async () => {
|
|
1642
|
+
(0, test_1.expect)(await isDeployComplete()).toBe(true);
|
|
1643
|
+
}).toPass({ timeout: 90000, intervals: [1000, 2000, 5000] });
|
|
1616
1644
|
}
|
|
1617
1645
|
// Step 3: reach the configure-test panel and confirm it really rendered.
|
|
1618
1646
|
// The accordion panel opens step 3 on its own once the deploy step
|
|
@@ -394,24 +394,31 @@ _curl_common() {
|
|
|
394
394
|
# runs surface as empty responses (`<none>` status) and false-positive
|
|
395
395
|
# FAILEDs in print_result. --max-time still bounds total time per attempt.
|
|
396
396
|
#
|
|
397
|
-
# Outer gateway-retry loop: an nginx `502 Bad Gateway` / `
|
|
398
|
-
# Timeout` (or an empty/no-status
|
|
399
|
-
#
|
|
400
|
-
# orchestration
|
|
401
|
-
#
|
|
402
|
-
#
|
|
403
|
-
#
|
|
404
|
-
#
|
|
405
|
-
#
|
|
406
|
-
#
|
|
397
|
+
# Outer gateway-retry loop: an nginx `502 Bad Gateway` / `503 Service
|
|
398
|
+
# Temporarily Unavailable` / `504 Gateway Timeout` (or an empty/no-status
|
|
399
|
+
# response) is emitted by the ingress when it cannot reach the upstream
|
|
400
|
+
# orchestration REST API — 502/504 when an upstream is reachable but not
|
|
401
|
+
# answering, 503 when the ingress has no ready endpoint at all (every
|
|
402
|
+
# orchestration pod unready, e.g. while a pod is rolling during an
|
|
403
|
+
# upgrade-minor run or while probes fail under the load this suite
|
|
404
|
+
# generates). Such a response is never a valid answer to any assertion in
|
|
405
|
+
# this suite (the API returns JSON status bodies, never a bare nginx HTML
|
|
406
|
+
# page), so re-issue the whole request with capped backoff to ride out a
|
|
407
|
+
# brief upstream restart window. curl's own --retry budget (~4s) is too
|
|
408
|
+
# small for a pod restart; this widens it to ~90s. A sustained outage still
|
|
409
|
+
# returns the real 502/503/504 once the budget is exhausted, so it surfaces
|
|
410
|
+
# as a genuine FAILED (not masked).
|
|
407
411
|
local gw_attempt=0 gw_max=12 gw_response gw_status
|
|
408
412
|
while :; do
|
|
409
413
|
gw_response="$(curl --http1.1 --max-time 30 --connect-timeout 10 \
|
|
410
414
|
--retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
|
|
411
415
|
-i -s -H 'Expect:' "$@")"
|
|
412
416
|
gw_status="$(echo "$gw_response" | grep -m1 -E '^HTTP/[0-9.]+' | awk '{print $2}' || true)"
|
|
413
|
-
if { [[ "$gw_status"
|
|
414
|
-
|
|
417
|
+
if { [[ -n "$gw_status" && "$gw_status" != "502" \
|
|
418
|
+
&& "$gw_status" != "503" && "$gw_status" != "504" ]] \
|
|
419
|
+
|| { [[ "$gw_status" == "503" \
|
|
420
|
+
&& "$gw_response" != *'<center>nginx</center>'* ]]; } \
|
|
421
|
+
|| (( gw_attempt >= gw_max )); then
|
|
415
422
|
printf '%s\n' "$gw_response"
|
|
416
423
|
return 0
|
|
417
424
|
fi
|
package/package.json
CHANGED
|
@@ -394,24 +394,31 @@ _curl_common() {
|
|
|
394
394
|
# runs surface as empty responses (`<none>` status) and false-positive
|
|
395
395
|
# FAILEDs in print_result. --max-time still bounds total time per attempt.
|
|
396
396
|
#
|
|
397
|
-
# Outer gateway-retry loop: an nginx `502 Bad Gateway` / `
|
|
398
|
-
# Timeout` (or an empty/no-status
|
|
399
|
-
#
|
|
400
|
-
# orchestration
|
|
401
|
-
#
|
|
402
|
-
#
|
|
403
|
-
#
|
|
404
|
-
#
|
|
405
|
-
#
|
|
406
|
-
#
|
|
397
|
+
# Outer gateway-retry loop: an nginx `502 Bad Gateway` / `503 Service
|
|
398
|
+
# Temporarily Unavailable` / `504 Gateway Timeout` (or an empty/no-status
|
|
399
|
+
# response) is emitted by the ingress when it cannot reach the upstream
|
|
400
|
+
# orchestration REST API — 502/504 when an upstream is reachable but not
|
|
401
|
+
# answering, 503 when the ingress has no ready endpoint at all (every
|
|
402
|
+
# orchestration pod unready, e.g. while a pod is rolling during an
|
|
403
|
+
# upgrade-minor run or while probes fail under the load this suite
|
|
404
|
+
# generates). Such a response is never a valid answer to any assertion in
|
|
405
|
+
# this suite (the API returns JSON status bodies, never a bare nginx HTML
|
|
406
|
+
# page), so re-issue the whole request with capped backoff to ride out a
|
|
407
|
+
# brief upstream restart window. curl's own --retry budget (~4s) is too
|
|
408
|
+
# small for a pod restart; this widens it to ~90s. A sustained outage still
|
|
409
|
+
# returns the real 502/503/504 once the budget is exhausted, so it surfaces
|
|
410
|
+
# as a genuine FAILED (not masked).
|
|
407
411
|
local gw_attempt=0 gw_max=12 gw_response gw_status
|
|
408
412
|
while :; do
|
|
409
413
|
gw_response="$(curl --http1.1 --max-time 30 --connect-timeout 10 \
|
|
410
414
|
--retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
|
|
411
415
|
-i -s -H 'Expect:' "$@")"
|
|
412
416
|
gw_status="$(echo "$gw_response" | grep -m1 -E '^HTTP/[0-9.]+' | awk '{print $2}' || true)"
|
|
413
|
-
if { [[ "$gw_status"
|
|
414
|
-
|
|
417
|
+
if { [[ -n "$gw_status" && "$gw_status" != "502" \
|
|
418
|
+
&& "$gw_status" != "503" && "$gw_status" != "504" ]] \
|
|
419
|
+
|| { [[ "$gw_status" == "503" \
|
|
420
|
+
&& "$gw_response" != *'<center>nginx</center>'* ]]; } \
|
|
421
|
+
|| (( gw_attempt >= gw_max )); then
|
|
415
422
|
printf '%s\n' "$gw_response"
|
|
416
423
|
return 0
|
|
417
424
|
fi
|