@camunda/e2e-test-suite 0.0.1393 → 0.0.1395

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.
@@ -271,34 +271,42 @@ class FormJsPage {
271
271
  await (0, hubDeployDialog_1.selectOnlyThisResourceInDialog)(this.page, this.dialog);
272
272
  }
273
273
  async deployForm(clusterName) {
274
- await this.processApplicationPage.ensureStageCluster(clusterName);
275
- await this.clickDeployButton();
276
- await (0, test_1.expect)(this.dialog).toBeVisible({
277
- timeout: 30000,
278
- });
279
- // Same recovery as ModelerCreatePage.runProcessInstance: selectCluster
280
- // clears the stage binding when the dialog does not offer the cluster, so
281
- // ensureStageCluster rebinds here and reports that it navigated. Any other
282
- // failure leaves the binding in place, it returns false, and the original
283
- // error stands. This path has no surrounding retry loop, hence the one
284
- // explicit second attempt.
285
- try {
286
- await this.selectCluster(clusterName);
287
- }
288
- catch (error) {
289
- const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
290
- if (!rebound) {
291
- throw error;
274
+ // Retried as a whole, mirroring ModelerCreatePage.runProcessInstance: the
275
+ // process-deploy path survives this suite's transient conditions only
276
+ // because it reloads and retries, and the form-deploy path has to too.
277
+ // Two of them land on this flow. selectCluster clears the stage binding
278
+ // when the dialog does not offer the cluster, so ensureStageCluster inside
279
+ // the loop rebinds on the next attempt rather than reopening an unchanged
280
+ // dialog. And the reload clears a transient 429 (local_rate_limited) on
281
+ // Hub's clusters?useCache=false endpoint: when that fetch is throttled the
282
+ // deploy dialog renders its "no clusters" empty state and hides a cluster
283
+ // that exists, so a single rebind cannot recover -- the cluster list has
284
+ // to be re-fetched after the throttle window passes.
285
+ const maxRetries = 10;
286
+ const retryDelayMs = 20000;
287
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
288
+ try {
289
+ await this.processApplicationPage.ensureStageCluster(clusterName);
290
+ await this.clickDeployButton();
291
+ await (0, test_1.expect)(this.dialog).toBeVisible({
292
+ timeout: 30000,
293
+ });
294
+ await this.selectCluster(clusterName);
295
+ await this.selectOnlyThisResource();
296
+ await this.clickDeploySubButton();
297
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({
298
+ timeout: 60000,
299
+ });
300
+ return;
301
+ }
302
+ catch (error) {
303
+ if (attempt === maxRetries) {
304
+ throw error;
305
+ }
306
+ await this.page.reload();
307
+ await this.page.waitForTimeout(retryDelayMs);
292
308
  }
293
- await this.clickDeployButton();
294
- await (0, test_1.expect)(this.dialog).toBeVisible({
295
- timeout: 30000,
296
- });
297
- await this.selectCluster(clusterName);
298
309
  }
299
- await this.selectOnlyThisResource();
300
- await this.clickDeploySubButton();
301
- await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 60000 });
302
310
  }
303
311
  }
304
312
  exports.FormJsPage = FormJsPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1393",
3
+ "version": "0.0.1395",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",