@camunda/e2e-test-suite 0.0.966 → 0.0.968

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.
@@ -22,6 +22,7 @@ declare class ModelerCreatePage {
22
22
  readonly deployMenuItem: Locator;
23
23
  readonly additionalActionsButton: Locator;
24
24
  readonly cancelButton: Locator;
25
+ readonly reusableAssetsTab: Locator;
25
26
  readonly restConnectorOption: Locator;
26
27
  readonly webhookMessageStartEventConnectorOption: Locator;
27
28
  readonly webhookTab: Locator;
@@ -146,6 +147,7 @@ declare class ModelerCreatePage {
146
147
  clickDeployMainButton(): Promise<void>;
147
148
  clickDeploySubButton(): Promise<void>;
148
149
  clickCancelButton(): Promise<void>;
150
+ clickReusableAssetsTab(): Promise<void>;
149
151
  clickRestConnectorOption(): Promise<void>;
150
152
  clickWebhookMessageStartEventConnectorOption(): Promise<void>;
151
153
  clickWebhookTab(): Promise<void>;
@@ -27,6 +27,7 @@ class ModelerCreatePage {
27
27
  deployMenuItem;
28
28
  additionalActionsButton;
29
29
  cancelButton;
30
+ reusableAssetsTab;
30
31
  restConnectorOption;
31
32
  webhookMessageStartEventConnectorOption;
32
33
  webhookTab;
@@ -149,6 +150,11 @@ class ModelerCreatePage {
149
150
  this.deployMainButton = page.locator('[data-test="deploy-button"]');
150
151
  this.deploySubButton = page.locator('[data-test="deploy-action"]');
151
152
  this.cancelButton = page.getByRole('button', { name: 'Cancel' });
153
+ // The change-element popup now splits standard BPMN elements from element
154
+ // templates/connectors into "BPMN" and "Reusable Assets" tabs, opening on
155
+ // BPMN. Connector templates render only once the Reusable Assets tab is
156
+ // selected.
157
+ this.reusableAssetsTab = page.getByRole('tab', { name: 'Reusable Assets' });
152
158
  this.restConnectorOption = page.locator('[data-id="replace.template-io.camunda.connectors.HttpJson.v2"]');
153
159
  // Change-element popup entries are `role="option"` under
154
160
  // `.djs-popup-results`, and their accessible name now includes the entry
@@ -614,7 +620,11 @@ class ModelerCreatePage {
614
620
  async clickCancelButton() {
615
621
  await this.cancelButton.click({ timeout: 60000 });
616
622
  }
623
+ async clickReusableAssetsTab() {
624
+ await this.reusableAssetsTab.click({ timeout: 60000 });
625
+ }
617
626
  async clickRestConnectorOption() {
627
+ await this.clickReusableAssetsTab();
618
628
  await this.restConnectorOption.click({ timeout: 60000 });
619
629
  }
620
630
  async clickWebhookMessageStartEventConnectorOption() {
@@ -806,6 +816,7 @@ class ModelerCreatePage {
806
816
  await this.intermediateBoundaryEvent.click({ timeout: 60000 });
807
817
  }
808
818
  async clickIntermediateWebhookConnectorOption() {
819
+ await this.clickReusableAssetsTab();
809
820
  await this.intermediateWebhookConnectorOption.click({ timeout: 60000 });
810
821
  }
811
822
  async clickCorrelationKeyProcessInput() {
@@ -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() {
@@ -124,6 +124,7 @@ _8_7_1.test.describe('Connectors User Flow Tests', () => {
124
124
  await modelerCreatePage.enterDiagramName(processName);
125
125
  await (0, sleep_1.sleep)(10000);
126
126
  await modelerCreatePage.clickChangeTypeButton();
127
+ await modelerCreatePage.clickReusableAssetsTab();
127
128
  await (0, test_1.expect)(modelerCreatePage.webhookMessageStartEventConnectorOption).toBeVisible({
128
129
  timeout: 30000,
129
130
  });
@@ -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.968",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",