@camunda/e2e-test-suite 0.0.1292 → 0.0.1293

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.
@@ -525,13 +525,27 @@ class ModelerCreatePage {
525
525
  await this.secondPlacedElement.click({ timeout: 60000 });
526
526
  }
527
527
  async clickFirstPlacedGateway() {
528
- try {
529
- await this.firstPlacedGateway.click({ timeout: 3000 });
530
- await this.appendElementButton.isVisible({ timeout: 3000 });
531
- }
532
- catch (error) {
533
- await this.page.reload();
534
- await this.firstPlacedGateway.click({ timeout: 3000 });
528
+ // isVisible() ignores its timeout, so wait for the context pad or the
529
+ // append indicator to confirm the gateway is actually selected. Right
530
+ // after switching back from Play the canvas may still be re-importing and
531
+ // drop the first click's selection.
532
+ const selectionIndicator = this.appendElementButton
533
+ .or(this.appendPreButton)
534
+ .first();
535
+ const maxAttempts = 3;
536
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
537
+ try {
538
+ await (0, test_1.expect)(this.firstPlacedGateway).toBeVisible({ timeout: 30000 });
539
+ await this.firstPlacedGateway.click({ timeout: 10000 });
540
+ await (0, test_1.expect)(selectionIndicator).toBeVisible({ timeout: 10000 });
541
+ return;
542
+ }
543
+ catch (error) {
544
+ if (attempt === maxAttempts)
545
+ throw error;
546
+ if (attempt > 1)
547
+ await this.page.reload();
548
+ }
535
549
  }
536
550
  }
537
551
  async clickSecondPlacedGateway() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1292",
3
+ "version": "0.0.1293",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",