@camunda/e2e-test-suite 0.0.810 → 0.0.811

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.
@@ -568,14 +568,20 @@ async function getOptimizeCookieSm(page) {
568
568
  const optimizeUrl = process.env.CAMUNDA_OPTIMIZE_BASE_URL;
569
569
  const username = 'demo';
570
570
  const password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD;
571
- const maxLoginAttempts = 3;
571
+ const maxLoginAttempts = 6;
572
572
  // Upgrade scenarios trigger rolling restarts of Optimize; page.goto can
573
- // briefly receive a 5xx and the Keycloak login form never renders, causing
574
- // the #username selector to time out. Retry the whole login flow.
573
+ // briefly receive a 5xx (nginx "503 Service Temporarily Unavailable") and the
574
+ // Keycloak login form never renders, causing the #username selector to time
575
+ // out. A 5xx does not reject page.goto, so detect it from the response status
576
+ // and retry immediately instead of burning the full waitForSelector timeout,
577
+ // widening the readiness window until Optimize finishes restarting.
575
578
  let lastLoginError;
576
579
  for (let attempt = 1; attempt <= maxLoginAttempts; attempt++) {
577
580
  try {
578
- await page.goto(optimizeUrl, { timeout: 30000 });
581
+ const response = await page.goto(optimizeUrl, { timeout: 30000 });
582
+ if (response && response.status() >= 500) {
583
+ throw new Error(`getOptimizeCookieSm: Optimize returned ${response.status()} on load (service not ready yet)`);
584
+ }
579
585
  await page.waitForSelector('#username', { timeout: 30000 });
580
586
  await page.fill('#username', username);
581
587
  await page.fill('#password', password);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.810",
3
+ "version": "0.0.811",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",