@camunda/e2e-test-suite 0.0.725 → 0.0.727

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.
@@ -7,7 +7,7 @@ declare class ConnectorMarketplacePage {
7
7
  readonly closeButton: Locator;
8
8
  readonly replaceResourceButton: Locator;
9
9
  readonly addToProjectButton: Locator;
10
- readonly cancelButton: Locator;
10
+ readonly saveAsCopyButton: Locator;
11
11
  constructor(page: Page);
12
12
  clickSearchForConnectorTextbox(): Promise<void>;
13
13
  fillSearchForConnectorTextbox(connectorName: string): Promise<void>;
@@ -9,7 +9,7 @@ class ConnectorMarketplacePage {
9
9
  closeButton;
10
10
  replaceResourceButton;
11
11
  addToProjectButton;
12
- cancelButton;
12
+ saveAsCopyButton;
13
13
  constructor(page) {
14
14
  this.page = page;
15
15
  this.searchForConnectorTextbox = page.getByPlaceholder('Search for a connector');
@@ -24,7 +24,7 @@ class ConnectorMarketplacePage {
24
24
  this.addToProjectButton = page.getByRole('button', {
25
25
  name: 'Add to project',
26
26
  });
27
- this.cancelButton = page.getByRole('button', { name: 'Cancel' });
27
+ this.saveAsCopyButton = page.getByRole('button', { name: 'Save as copy' });
28
28
  }
29
29
  async clickSearchForConnectorTextbox() {
30
30
  await this.searchForConnectorTextbox.click({ timeout: 60000 });
@@ -46,18 +46,30 @@ class ConnectorMarketplacePage {
46
46
  }
47
47
  async downloadConnectorToProject() {
48
48
  await this.clickDownloadToProjectButton();
49
+ // "Download to project" opens Web Modeler's "Import resource" modal, which
50
+ // can take ~20s to appear. The import-confirming button depends on whether
51
+ // the connector template already exists in the project: an existing one
52
+ // shows "Save as copy" (the conflict view), a brand-new resource shows
53
+ // "Add to project", and older modeler builds used "Replace resource".
54
+ // Probe each with isVisible() and click the first that is present; never
55
+ // "Cancel", which aborts the import and leaves the connector out of the
56
+ // project, breaking the downstream change-element selection.
57
+ const importConfirmButtons = [
58
+ this.saveAsCopyButton,
59
+ this.addToProjectButton,
60
+ this.replaceResourceButton,
61
+ ];
49
62
  let imported = false;
50
- try {
51
- await Promise.race([
52
- this.addToProjectButton.click({ timeout: 20000 }),
53
- this.replaceResourceButton.click({ timeout: 20000 }),
54
- ]);
55
- imported = true;
56
- }
57
- catch (e) {
58
- if (await this.cancelButton.isVisible({ timeout: 3000 }).catch(() => false)) {
59
- await this.cancelButton.click({ timeout: 10000 });
63
+ // The first probe gets a long timeout to absorb the modal's slow (~20s)
64
+ // appearance; once the modal is up the remaining buttons resolve at once.
65
+ let probeTimeout = 60000;
66
+ for (const button of importConfirmButtons) {
67
+ if (await button.isVisible({ timeout: probeTimeout }).catch(() => false)) {
68
+ await button.click({ timeout: 30000 });
69
+ imported = true;
70
+ break;
60
71
  }
72
+ probeTimeout = 5000;
61
73
  }
62
74
  // After a successful import, wait for the snackbar (confirms the connector
63
75
  // template was received by the modeler) then close the marketplace panel so
@@ -801,11 +801,14 @@ class ModelerCreatePage {
801
801
  .catch(() => false)) {
802
802
  await changeElementSearch.pressSequentially('Worldwide Public Holiday', { delay: 50 });
803
803
  }
804
- await this.publicHolidayConnectorOption.waitFor({
804
+ // Importing via "Save as copy" can leave both the pre-existing and the
805
+ // newly imported template in the change-element list, so target the
806
+ // first match to avoid a strict-mode violation.
807
+ await this.publicHolidayConnectorOption.first().waitFor({
805
808
  state: 'visible',
806
809
  timeout: 60000,
807
810
  });
808
- await this.publicHolidayConnectorOption.click({ timeout: 30000 });
811
+ await this.publicHolidayConnectorOption.first().click({ timeout: 30000 });
809
812
  return;
810
813
  }
811
814
  catch (error) {
@@ -415,7 +415,8 @@ _8_9_1.test.describe('Web Modeler User Flow Tests', () => {
415
415
  await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateProcessInstancePage, operateProcessInstancePage.completedIcon, 'Completed icon', 60000, false, 5);
416
416
  });
417
417
  });
418
- (0, _8_9_1.test)('Form.js Integration with User Task and Public Form', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, browser, }) => {
418
+ //Skipped due to 25521: https://github.com/camunda/camunda-hub/issues/25521
419
+ _8_9_1.test.skip('Form.js Integration with User Task and Public Form @tasklistV1', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, browser, }) => {
419
420
  _8_9_1.test.slow();
420
421
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
421
422
  const processName = 'User_Task_Process_With_Public_Form' + randomString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.725",
3
+ "version": "0.0.727",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",