@camunda/e2e-test-suite 0.0.1225 → 0.0.1226

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.
@@ -223,6 +223,7 @@ declare class ModelerCreatePage {
223
223
  selectCluster(clusterName: string, healthCheckTimeout?: number): Promise<void>;
224
224
  embedForm(formName: string): Promise<void>;
225
225
  fillStartEventVariablesForDocHandling(zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
226
+ private openOutputMappingRow;
226
227
  fillZeebeClientId(clientId: string): Promise<void>;
227
228
  fillZeebeSecretValue(zeebeSecret: string): Promise<void>;
228
229
  fillZeebeRestValue(zeebeUrl: string): Promise<void>;
@@ -311,7 +311,10 @@ class ModelerCreatePage {
311
311
  this.backupDeployButton = page.getByRole('button', {
312
312
  name: 'Deploy',
313
313
  });
314
- this.globalConnectToolButton = page.locator('[title="Activate global connect tool"]');
314
+ // bpmn-js now labels palette entries with `aria-label` + `role="button"`
315
+ // and no longer renders a `title` attribute, so match on the palette
316
+ // entry's own action id, which is stable across that relabelling.
317
+ this.globalConnectToolButton = page.locator('.djs-palette [data-action="global-connect-tool"]');
315
318
  this.publicationSection = page.locator('[data-group-id="group-process-publication"]');
316
319
  this.publicAccessToggle = page.getByRole('switch', {
317
320
  name: 'Toggle public access',
@@ -531,6 +534,12 @@ class ModelerCreatePage {
531
534
  }
532
535
  }
533
536
  async clickDeployAndRunMainButton() {
537
+ // This runs straight after a navigation back to the diagram, so the
538
+ // modeler still has to boot and render its toolbar. The trace shows the
539
+ // button first resolving ~35s after that navigation, which the previous
540
+ // flat 30s click budget expired just short of. Wait for it to render
541
+ // before spending the click budget on it.
542
+ await (0, test_1.expect)(this.deployAndRunMainButton).toBeVisible({ timeout: 120000 });
534
543
  await this.deployAndRunMainButton.click({ timeout: 30000 });
535
544
  }
536
545
  async clickDeployAndRunSubButton() {
@@ -1621,6 +1630,13 @@ class ModelerCreatePage {
1621
1630
  }
1622
1631
  async fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret) {
1623
1632
  console.log(`URL: ${zeebeUrl}, ClientId: ${zeebeClientId}, Secret: ${zeebeClientSecret}`);
1633
+ // The caller reloads the page to pick up the connector it just downloaded,
1634
+ // so the bpmn canvas is still being rendered when this runs. The trace
1635
+ // shows the start event first resolving ~30s after that reload, right as
1636
+ // the click budget ran out. Wait for the canvas to render it first.
1637
+ await (0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
1638
+ timeout: 120000,
1639
+ });
1624
1640
  await this.connectorsDocHandlingStartEventElement.click();
1625
1641
  await this.startEventVariableInputWithThreeVariables.click();
1626
1642
  await this.fillZeebeRestValue(zeebeUrl);
@@ -1628,8 +1644,34 @@ class ModelerCreatePage {
1628
1644
  await this.fillZeebeClientId(zeebeClientId);
1629
1645
  await (0, sleep_1.sleep)(1000);
1630
1646
  }
1647
+ // Each output-mapping row is a collapsible entry whose FEEL editor stays
1648
+ // `display: none` until the row itself carries the `open` class. One click on
1649
+ // the row header is not always enough: the properties panel re-renders and
1650
+ // re-scrolls while the previous row's editor commits, which can swallow the
1651
+ // click and leave the row collapsed. Toggle until the row reports itself
1652
+ // open, so the editor is genuinely visible before it is filled.
1653
+ async openOutputMappingRow(rowHeader, outputIndex) {
1654
+ const row = this.page.locator(`[data-entry-id="StartEvent_1-output-${outputIndex}"]`);
1655
+ const openClass = /(^|\s)open(\s|$)/;
1656
+ await (0, test_1.expect)(row).toBeAttached({ timeout: 60000 });
1657
+ for (let attempt = 0; attempt < 3; attempt++) {
1658
+ const classes = (await row.getAttribute('class')) ?? '';
1659
+ if (openClass.test(classes)) {
1660
+ return;
1661
+ }
1662
+ await rowHeader.click({ timeout: 30000 });
1663
+ try {
1664
+ await (0, test_1.expect)(row).toHaveClass(openClass, { timeout: 15000 });
1665
+ return;
1666
+ }
1667
+ catch {
1668
+ await (0, sleep_1.sleep)(1000);
1669
+ }
1670
+ }
1671
+ await (0, test_1.expect)(row).toHaveClass(openClass, { timeout: 30000 });
1672
+ }
1631
1673
  async fillZeebeClientId(clientId) {
1632
- await this.zeebeClientIdVariable.click();
1674
+ await this.openOutputMappingRow(this.zeebeClientIdVariable, 2);
1633
1675
  await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toBeVisible({
1634
1676
  timeout: 60000,
1635
1677
  });
@@ -1640,7 +1682,7 @@ class ModelerCreatePage {
1640
1682
  await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toHaveText(clientId);
1641
1683
  }
1642
1684
  async fillZeebeSecretValue(zeebeSecret) {
1643
- await this.zeebeSecretVariable.click();
1685
+ await this.openOutputMappingRow(this.zeebeSecretVariable, 1);
1644
1686
  await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toBeVisible({
1645
1687
  timeout: 60000,
1646
1688
  });
@@ -1651,7 +1693,7 @@ class ModelerCreatePage {
1651
1693
  await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toHaveText(zeebeSecret);
1652
1694
  }
1653
1695
  async fillZeebeRestValue(zeebeUrl) {
1654
- await this.zeebeRestAddressVariable.click();
1696
+ await this.openOutputMappingRow(this.zeebeRestAddressVariable, 0);
1655
1697
  await (0, test_1.expect)(this.variableAssignmentValueTextbox).toBeVisible({
1656
1698
  timeout: 60000,
1657
1699
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1225",
3
+ "version": "0.0.1226",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",