@camunda/e2e-test-suite 0.0.1737 → 0.0.1738

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.
@@ -344,7 +344,7 @@ class ModelerCreatePage {
344
344
  this.appendGatewayButton = page.getByRole('button', {
345
345
  name: 'Append gateway',
346
346
  });
347
- this.parallelGatewayOption = page.getByText('parallel gateway');
347
+ this.parallelGatewayOption = page.locator('.djs-popup-results [data-id="replace-with-parallel-gateway"]');
348
348
  this.firstPlacedGateway = page
349
349
  .locator('[data-element-id*="Gateway"]')
350
350
  .first();
@@ -374,7 +374,7 @@ class ModelerCreatePage {
374
374
  this.appendGatewayButton = page.getByRole('button', {
375
375
  name: 'Append gateway',
376
376
  });
377
- this.parallelGatewayOption = page.getByText('parallel gateway');
377
+ this.parallelGatewayOption = page.locator('.djs-popup-results [data-id="replace-with-parallel-gateway"]');
378
378
  this.firstPlacedGateway = page
379
379
  .locator('[data-element-id*="Gateway"]')
380
380
  .first();
@@ -1533,8 +1533,30 @@ class ModelerCreatePage {
1533
1533
  await this.appendGatewayButton.click({ timeout: 30000 });
1534
1534
  }
1535
1535
  async clickParallelGatewayOption() {
1536
- await (0, test_1.expect)(this.parallelGatewayOption).toBeVisible({ timeout: 30000 });
1537
- await this.parallelGatewayOption.click({ timeout: 90000 });
1536
+ // bpmn-js renders a parallel gateway's marker as a <path> in its visual
1537
+ // (exclusive has none); confirm the replace took and retry, else an invalid
1538
+ // diagram is saved and fails deploy validation.
1539
+ const parallelMarker = this.secondPlacedGateway
1540
+ .locator('.djs-visual path')
1541
+ .first();
1542
+ for (let attempt = 1; attempt <= 3; attempt++) {
1543
+ const popupOpen = await this.parallelGatewayOption
1544
+ .isVisible()
1545
+ .catch(() => false);
1546
+ if (!popupOpen) {
1547
+ await this.clickChangeTypeButton();
1548
+ }
1549
+ await (0, test_1.expect)(this.parallelGatewayOption).toBeVisible({ timeout: 30000 });
1550
+ await this.parallelGatewayOption.click({ timeout: 90000 });
1551
+ const converted = await parallelMarker
1552
+ .waitFor({ state: 'visible', timeout: 15000 })
1553
+ .then(() => true)
1554
+ .catch(() => false);
1555
+ if (converted) {
1556
+ return;
1557
+ }
1558
+ }
1559
+ throw new Error('Gateway was not converted to a parallel gateway');
1538
1560
  }
1539
1561
  async clickFirstPlacedGateway() {
1540
1562
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1737",
3
+ "version": "0.0.1738",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",