@camunda/e2e-test-suite 0.0.1004 → 0.0.1005

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.
@@ -42,6 +42,7 @@ declare class ModelerCreatePage {
42
42
  readonly firstPlacedElement: Locator;
43
43
  readonly secondPlacedElement: Locator;
44
44
  readonly appendElementButton: Locator;
45
+ readonly appendIndicator: Locator;
45
46
  readonly payloadInput: Locator;
46
47
  readonly marketPlaceButton: Locator;
47
48
  readonly publicHolidayConnectorOption: Locator;
@@ -176,6 +177,7 @@ declare class ModelerCreatePage {
176
177
  clickFirstPlacedElement(): Promise<void>;
177
178
  clickSecondPlacedElement(): Promise<void>;
178
179
  clickSecondElement(): Promise<void>;
180
+ openAppendCreatePad(): Promise<void>;
179
181
  clickAppendElementButton(): Promise<void>;
180
182
  clickMarketPlaceButton(): Promise<void>;
181
183
  clickPublicHolidayConnectorOption(): Promise<void>;
@@ -48,6 +48,7 @@ class ModelerCreatePage {
48
48
  firstPlacedElement;
49
49
  secondPlacedElement;
50
50
  appendElementButton;
51
+ appendIndicator;
51
52
  payloadInput;
52
53
  marketPlaceButton;
53
54
  publicHolidayConnectorOption;
@@ -120,6 +121,10 @@ class ModelerCreatePage {
120
121
  this.appendElementButton = page
121
122
  .locator('[class="djs-create-pad open djs-append-create-pad"]')
122
123
  .first();
124
+ // Every element keeps an indicator overlay in the DOM and hides the ones
125
+ // that do not apply, so match on the visible call-to-action indicator —
126
+ // the one belonging to the currently selected element.
127
+ this.appendIndicator = page.locator('.djs-append-indicator.selected:visible');
123
128
  this.appendTaskButton = page.getByRole('button', { name: 'Append task' });
124
129
  this.changeTypeButton = page.getByRole('button', {
125
130
  name: 'Change element',
@@ -510,6 +515,7 @@ class ModelerCreatePage {
510
515
  else if (parentElement == 'parallelGateway') {
511
516
  await this.clickSecondPlacedGateway();
512
517
  }
518
+ await this.openAppendCreatePad();
513
519
  await this.appendElementButton.hover();
514
520
  await this.appendEndEventButton.click({ timeout: 120000 });
515
521
  }
@@ -883,6 +889,13 @@ class ModelerCreatePage {
883
889
  await this.endEventCanvas.click({ timeout: 60000 });
884
890
  }
885
891
  async clickConnectToOtherElementButton() {
892
+ // 'Connect to other element' is a create-pad entry
893
+ // (`data-entry-id="connect"`), so the pad has to be open before the entry
894
+ // exists at all. The element this is called on already has an outgoing
895
+ // sequence flow, which is exactly the case that no longer auto-opens the
896
+ // pad since improved-canvas 1.11.0 — go through the append indicator
897
+ // first, which is what clickAppendElementButton does (with its retries).
898
+ await this.clickAppendElementButton();
886
899
  await (0, test_1.expect)(this.connectToOtherElementButton).toBeVisible({
887
900
  timeout: 60000,
888
901
  });
@@ -899,11 +912,35 @@ class ModelerCreatePage {
899
912
  await (0, test_1.expect)(this.secondElement).toBeVisible({ timeout: 60000 });
900
913
  await this.secondElement.click({ timeout: 60000 });
901
914
  }
915
+ // Selecting an element does not open the append create pad on its own. The
916
+ // improved canvas gives the selected element a "+" overlay
917
+ // (.djs-append-indicator) instead, and only a mouseenter on that indicator
918
+ // opens the pad. The pad still opens by itself right after an append, and
919
+ // the indicator is hidden while the pad is open, so both lookups are
920
+ // best-effort and this is a no-op in that case.
921
+ async openAppendCreatePad() {
922
+ const padAlreadyOpen = await this.appendElementButton
923
+ .isVisible()
924
+ .catch(() => false);
925
+ if (padAlreadyOpen) {
926
+ return;
927
+ }
928
+ const indicator = this.appendIndicator.first();
929
+ const indicatorShown = await indicator
930
+ .waitFor({ state: 'visible', timeout: 10000 })
931
+ .then(() => true)
932
+ .catch(() => false);
933
+ if (!indicatorShown) {
934
+ return;
935
+ }
936
+ await indicator.hover({ force: true, timeout: 30000 });
937
+ }
902
938
  async clickAppendElementButton() {
903
939
  const maxRetries = 3;
904
940
  for (let retries = 0; retries < maxRetries; retries++) {
905
941
  try {
906
942
  await this.page.waitForTimeout(1000);
943
+ await this.openAppendCreatePad();
907
944
  await (0, test_1.expect)(this.appendElementButton).toBeVisible({ timeout: 10000 });
908
945
  await this.appendElementButton.hover({ force: true });
909
946
  return;
@@ -1117,6 +1154,7 @@ class ModelerCreatePage {
1117
1154
  async clickFirstPlacedGateway() {
1118
1155
  try {
1119
1156
  await this.firstPlacedGateway.click({ timeout: 60000 });
1157
+ await this.openAppendCreatePad();
1120
1158
  await (0, test_1.expect)(this.appendElementButton).toBeVisible({ timeout: 60000 });
1121
1159
  }
1122
1160
  catch (error) {
@@ -1153,6 +1191,7 @@ class ModelerCreatePage {
1153
1191
  await this.page.reload();
1154
1192
  await (0, sleep_1.sleep)(20000);
1155
1193
  await this.clickFirstPlacedElement();
1194
+ await this.openAppendCreatePad();
1156
1195
  await this.appendElementButton.hover();
1157
1196
  }
1158
1197
  await this.clickAppendGatewayButton();
@@ -311,10 +311,7 @@ _8_8_1.test.describe('HTO User Flow Tests', () => {
311
311
  await (0, expectTextWithPagination_1.expectTextWithPagination)(page, processName + '2');
312
312
  });
313
313
  });
314
- // Temporarily skipped pending fix PR #3144:
315
- // https://github.com/camunda/c8-cross-component-e2e-tests/pull/3144
316
- // Re-enable in the same change that lands #3144.
317
- _8_8_1.test.skip('Zeebe User Task With Priority', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, taskPanelPage, taskDetailsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
314
+ (0, _8_8_1.test)('Zeebe User Task With Priority', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, taskPanelPage, taskDetailsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
318
315
  const randomName = await (0, _setup_1.generateRandomStringAsync)(3);
319
316
  const processName = 'Zeebe_User_Task_Process_With_Priority' + randomName;
320
317
  const taskName = 'priorityTest' + randomName;
@@ -37,10 +37,7 @@ _8_8_1.test.describe('Smoke Tests', () => {
37
37
  await (0, _setup_1.captureScreenshot)(page, testInfo);
38
38
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
39
39
  });
40
- // Temporarily skipped pending fix PR #3144:
41
- // https://github.com/camunda/c8-cross-component-e2e-tests/pull/3144
42
- // Re-enable in the same change that lands #3144.
43
- _8_8_1.test.skip('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, }) => {
40
+ (0, _8_8_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, }) => {
44
41
  _8_8_1.test.slow();
45
42
  const randomString = useFixedNames
46
43
  ? 'UpgradeTest'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1004",
3
+ "version": "0.0.1005",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",