@camunda/e2e-test-suite 0.0.966 → 0.0.967

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.
@@ -26,6 +26,9 @@ declare class ModelerCreatePage {
26
26
  readonly additionalActionsButton: Locator;
27
27
  readonly cancelButton: Locator;
28
28
  readonly restConnectorOption: Locator;
29
+ readonly changeElementSearchInput: Locator;
30
+ readonly changeElementTabStrip: Locator;
31
+ readonly reusableAssetsTab: Locator;
29
32
  readonly webhookMessageStartEventConnectorOption: Locator;
30
33
  readonly webhookTab: Locator;
31
34
  readonly webhookIsActiveButton: Locator;
@@ -154,6 +157,8 @@ declare class ModelerCreatePage {
154
157
  clickNewForm(): Promise<void>;
155
158
  clickDeploySubButton(): Promise<void>;
156
159
  clickCancelButton(): Promise<void>;
160
+ private waitForVisible;
161
+ revealChangeElementTemplate(option: Locator, searchTerm: string): Promise<void>;
157
162
  clickRestConnectorOption(): Promise<void>;
158
163
  clickWebhookStartEventConnectorOption(): Promise<void>;
159
164
  clickWebhookTab(): Promise<void>;
@@ -32,6 +32,9 @@ class ModelerCreatePage {
32
32
  additionalActionsButton;
33
33
  cancelButton;
34
34
  restConnectorOption;
35
+ changeElementSearchInput;
36
+ changeElementTabStrip;
37
+ reusableAssetsTab;
35
38
  webhookMessageStartEventConnectorOption;
36
39
  webhookTab;
37
40
  webhookIsActiveButton;
@@ -170,6 +173,12 @@ class ModelerCreatePage {
170
173
  this.deploySubButton = page.locator('[data-test="deploy-action"]');
171
174
  this.cancelButton = page.getByRole('button', { name: 'Cancel' });
172
175
  this.restConnectorOption = page.locator('[data-id="replace.template-io.camunda.connectors.HttpJson.v2"]');
176
+ this.changeElementSearchInput = page.locator('.djs-popup-search input');
177
+ this.changeElementTabStrip = page.locator('.djs-popup-tabs-container');
178
+ // The tab renders its label as text content, which wins over its `title`
179
+ // attribute in the accessible-name computation. Match case-insensitively:
180
+ // the label is capitalised differently across bpmn-js releases.
181
+ this.reusableAssetsTab = page.getByRole('tab', { name: /reusable assets/i });
173
182
  // Change-element popup entries are `role="option"` under
174
183
  // `.djs-popup-results`, and their accessible name now includes the entry
175
184
  // description, so no role+name matcher resolves them. Target the stable
@@ -717,10 +726,50 @@ class ModelerCreatePage {
717
726
  async clickCancelButton() {
718
727
  await this.cancelButton.click({ timeout: 60000 });
719
728
  }
729
+ // `waitFor` actually blocks up to the timeout; `isVisible()` would return
730
+ // immediately and report false while the popup is still rendering.
731
+ async waitForVisible(locator, timeout) {
732
+ return locator
733
+ .first()
734
+ .waitFor({ state: 'visible', timeout })
735
+ .then(() => true)
736
+ .catch(() => false);
737
+ }
738
+ // The change-element popup is now tabbed: every `replace.template-*` entry
739
+ // is assigned to the "Reusable Assets" tab, so connector templates are not
740
+ // in the DOM at all while the default "BPMN" tab is selected - which is why
741
+ // the template locators time out with `<element(s) not found>`.
742
+ // Opening that tab is version-tolerant: on an untabbed popup the strip is
743
+ // absent and this is a no-op.
744
+ // Search is the fallback, because it spans the full entry set across every
745
+ // tab. It must be typed with `pressSequentially`: the popup's search input
746
+ // is uncontrolled and its state is written by a `keyup` handler only, so
747
+ // `fill()` (which dispatches `input` alone) never applies the filter.
748
+ async revealChangeElementTemplate(option, searchTerm) {
749
+ if (await this.waitForVisible(option, 5000)) {
750
+ return;
751
+ }
752
+ if (await this.waitForVisible(this.changeElementTabStrip, 5000)) {
753
+ await this.reusableAssetsTab.click({ timeout: 30000 });
754
+ if (await this.waitForVisible(option, 15000)) {
755
+ return;
756
+ }
757
+ }
758
+ if (!(await this.waitForVisible(this.changeElementSearchInput, 5000))) {
759
+ return;
760
+ }
761
+ await this.changeElementSearchInput.click();
762
+ await this.changeElementSearchInput.fill('');
763
+ await this.changeElementSearchInput.pressSequentially(searchTerm, {
764
+ delay: 50,
765
+ });
766
+ }
720
767
  async clickRestConnectorOption() {
768
+ await this.revealChangeElementTemplate(this.restConnectorOption, 'REST');
721
769
  await this.restConnectorOption.click({ timeout: 60000 });
722
770
  }
723
771
  async clickWebhookStartEventConnectorOption() {
772
+ await this.revealChangeElementTemplate(this.webhookMessageStartEventConnectorOption, 'Webhook');
724
773
  await this.webhookMessageStartEventConnectorOption.click({ timeout: 60000 });
725
774
  }
726
775
  async clickWebhookTab() {
@@ -992,6 +1041,7 @@ class ModelerCreatePage {
992
1041
  await this.intermediateBoundaryEvent.click({ timeout: 60000 });
993
1042
  }
994
1043
  async clickIntermediateWebhookConnectorOption() {
1044
+ await this.revealChangeElementTemplate(this.intermediateWebhookConnectorOption, 'Webhook');
995
1045
  await this.intermediateWebhookConnectorOption.click({ timeout: 60000 });
996
1046
  }
997
1047
  async clickCorrelationKeyProcessInput() {
@@ -125,6 +125,9 @@ _8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
125
125
  await modelerCreatePage.enterDiagramName(processName);
126
126
  await (0, sleep_1.sleep)(10000);
127
127
  await modelerCreatePage.clickChangeTypeButton();
128
+ // Connector templates now sit behind the change-element popup's
129
+ // "Reusable Assets" tab, so surface the entry before asserting on it.
130
+ await modelerCreatePage.revealChangeElementTemplate(modelerCreatePage.webhookMessageStartEventConnectorOption, 'Webhook');
128
131
  await (0, test_1.expect)(modelerCreatePage.webhookMessageStartEventConnectorOption).toBeVisible({
129
132
  timeout: 30000,
130
133
  });
@@ -16,6 +16,7 @@ const resetSession_1 = require("../../utils/resetSession");
16
16
  const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
17
17
  const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
18
18
  const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
19
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
19
20
  const users_1 = require("../../utils/users");
20
21
  const testUser = (0, users_1.getTestUser)('nineteenthUser');
21
22
  _8_8_1.test.describe.configure({ mode: 'parallel' });
@@ -248,8 +249,20 @@ _8_8_1.test.describe('HTO User Flow Tests', () => {
248
249
  await (0, test_1.expect)(page.getByText('"testValue"')).not.toBeVisible({
249
250
  timeout: 60000,
250
251
  });
251
- await (0, test_1.expect)(page.getByText('"updatedValue"')).toBeVisible({
252
- timeout: 90000,
252
+ // Operate's variables panel stops polling after its last search, so a
253
+ // stale read right after the update pins the old value on screen for
254
+ // the rest of the wait: the nightly trace shows the PUT succeed, then
255
+ // `/v2/variables/search` return "updatedValue" and, 100ms later, a
256
+ // second query return "testValue" again - and that stale response is
257
+ // the one the panel keeps rendering. Reload between attempts to force
258
+ // a re-fetch instead of waiting on a poll that never comes.
259
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText('"updatedValue"'), {
260
+ totalTimeout: 180000,
261
+ visibilityTimeout: 30000,
262
+ maxRetries: 5,
263
+ postAction: async () => {
264
+ await page.reload();
265
+ },
253
266
  });
254
267
  await appsPage.clickCamundaApps();
255
268
  await appsPage.clickTasklist(clusterName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.966",
3
+ "version": "0.0.967",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",