@camunda/e2e-test-suite 0.0.1318 → 0.0.1320

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.
@@ -1,6 +1,9 @@
1
1
  import { Page, Locator } from '@playwright/test';
2
2
  declare class ConnectorMarketplacePage {
3
3
  private page;
4
+ private browseAllConnectorMarketplacePage;
5
+ private connectorName?;
6
+ private legacyMarketplaceDialog;
4
7
  readonly searchForConnectorTextbox: Locator;
5
8
  readonly downloadToProjectButton: Locator;
6
9
  readonly snackbar: Locator;
@@ -10,10 +13,6 @@ declare class ConnectorMarketplacePage {
10
13
  readonly saveAsCopyButton: Locator;
11
14
  readonly cancelButton: Locator;
12
15
  readonly dialogTitle: Locator;
13
- readonly browseAllDialog: Locator;
14
- readonly browseAllMarketplaceDetailsButton: Locator;
15
- readonly browseAllAddButton: Locator;
16
- readonly importModal: Locator;
17
16
  constructor(page: Page);
18
17
  clickSearchForConnectorTextbox(): Promise<void>;
19
18
  fillSearchForConnectorTextbox(connectorName: string): Promise<void>;
@@ -21,10 +20,10 @@ declare class ConnectorMarketplacePage {
21
20
  clickSnackbar(): Promise<void>;
22
21
  clickCloseButton(): Promise<void>;
23
22
  clickReplaceResourceButton(): Promise<void>;
23
+ waitForConnectorSearchResults(): Promise<void>;
24
24
  downloadConnectorToProject(): Promise<boolean>;
25
- private addConnectorFromBrowseAll;
26
25
  private closeMarketplaceDialog;
27
- private closeBrowseAllDialog;
28
26
  searchAndDownloadConnector(connectorName: string): Promise<boolean>;
27
+ private getLegacyDownloadButton;
29
28
  }
30
29
  export { ConnectorMarketplacePage };
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConnectorMarketplacePage = void 0;
4
- const test_1 = require("@playwright/test");
4
+ const BrowseAllConnectorMarketplacePage_1 = require("../BrowseAllConnectorMarketplacePage");
5
5
  class ConnectorMarketplacePage {
6
6
  page;
7
+ browseAllConnectorMarketplacePage;
8
+ connectorName;
9
+ legacyMarketplaceDialog;
7
10
  searchForConnectorTextbox;
8
11
  downloadToProjectButton;
9
12
  snackbar;
@@ -13,40 +16,22 @@ class ConnectorMarketplacePage {
13
16
  saveAsCopyButton;
14
17
  cancelButton;
15
18
  dialogTitle;
16
- browseAllDialog;
17
- browseAllMarketplaceDetailsButton;
18
- browseAllAddButton;
19
- importModal;
20
19
  constructor(page) {
21
20
  this.page = page;
21
+ this.browseAllConnectorMarketplacePage =
22
+ new BrowseAllConnectorMarketplacePage_1.BrowseAllConnectorMarketplacePage(page);
22
23
  // Title of the marketplace dialog itself — present both while the listing
23
24
  // renders and while it is stuck on its loading spinner, so it is the one
24
25
  // reliable marker of "the dialog is still up".
25
26
  this.dialogTitle = page.getByText('Browse Marketplace connectors');
26
- // camunda-hub's "Browse all" dialog (BrowseAllDialog.tsx) replaced the
27
- // marketplace modal: it lists Marketplace connectors alongside the
28
- // diagram's own elements and reusable assets. Its root view carries the
29
- // search box, its connector review step the "Back to all results" button.
30
- this.browseAllDialog = page.getByRole('dialog').filter({
31
- has: page
32
- .locator('#browse-all-search')
33
- .or(page.getByRole('button', { name: 'Back to all results' })),
34
- });
35
- this.searchForConnectorTextbox = page
36
- .getByPlaceholder('Search for a connector')
37
- .or(page.locator('#browse-all-search'))
38
- .first();
39
- // A Browse all Marketplace card opens its review step through this
40
- // button; self-hosted connectors only link to setup docs.
41
- this.browseAllMarketplaceDetailsButton = page
42
- .getByRole('list', { name: 'Marketplace connectors' })
43
- .getByRole('button', { name: /^View details for .+ from Marketplace$/ })
27
+ this.legacyMarketplaceDialog = page
28
+ .getByRole('dialog', { name: 'Browse Marketplace connectors' })
29
+ .or(page.getByRole('dialog', { name: 'Discover Connectors Dialog' }))
44
30
  .first();
45
- // The review step's primary action (MarketplaceConnectorDetails.tsx).
46
- this.browseAllAddButton = this.browseAllDialog.getByRole('button', {
47
- name: /^(Add to project|Add remaining elements)$/,
48
- });
49
- this.importModal = page.locator('[data-test="import-modal"]');
31
+ this.searchForConnectorTextbox =
32
+ this.browseAllConnectorMarketplacePage.searchForConnectorTextbox
33
+ .or(page.getByPlaceholder('Search for a connector'))
34
+ .first();
50
35
  this.downloadToProjectButton = page
51
36
  .getByRole('button', { name: 'Download to project' })
52
37
  .first();
@@ -65,10 +50,11 @@ class ConnectorMarketplacePage {
65
50
  await this.searchForConnectorTextbox.click({ timeout: 60000 });
66
51
  }
67
52
  async fillSearchForConnectorTextbox(connectorName) {
53
+ this.connectorName = connectorName;
68
54
  await this.searchForConnectorTextbox.fill(connectorName, { timeout: 60000 });
69
55
  }
70
56
  async clickDownloadToProjectButton() {
71
- await this.downloadToProjectButton.click({ timeout: 60000 });
57
+ await this.getLegacyDownloadButton().click({ timeout: 60000 });
72
58
  }
73
59
  async clickSnackbar() {
74
60
  await this.snackbar.click({ timeout: 120000 });
@@ -79,17 +65,20 @@ class ConnectorMarketplacePage {
79
65
  async clickReplaceResourceButton() {
80
66
  await this.replaceResourceButton.click({ timeout: 60000 });
81
67
  }
68
+ async waitForConnectorSearchResults() {
69
+ if (await this.browseAllConnectorMarketplacePage.isOpen()) {
70
+ await this.browseAllConnectorMarketplacePage.waitForConnectorSearchResult(this.connectorName);
71
+ return;
72
+ }
73
+ await this.getLegacyDownloadButton().waitFor({
74
+ state: 'visible',
75
+ timeout: 60000,
76
+ });
77
+ }
82
78
  async downloadConnectorToProject() {
83
- // Browse all has no "Download to project": a result is a card that opens
84
- // its own review step, which is where the import action lives. Wait for
85
- // whichever entry point this shell renders before deciding.
86
- await (0, test_1.expect)(this.downloadToProjectButton
87
- .or(this.browseAllMarketplaceDetailsButton)
88
- .first()).toBeVisible({ timeout: 60000 });
89
- if (!(await this.downloadToProjectButton.isVisible())) {
90
- const imported = await this.addConnectorFromBrowseAll();
91
- await this.closeMarketplaceDialog();
92
- return imported;
79
+ if (await this.browseAllConnectorMarketplacePage.isOpen()) {
80
+ await this.browseAllConnectorMarketplacePage.importConnectorToProject(this.connectorName);
81
+ return true;
93
82
  }
94
83
  await this.clickDownloadToProjectButton();
95
84
  // After clicking "Download to project", Hub fetches the connector detail
@@ -126,45 +115,7 @@ class ConnectorMarketplacePage {
126
115
  await this.closeMarketplaceDialog();
127
116
  return imported;
128
117
  }
129
- // The review step fetches the connector's details before it renders its
130
- // primary action. Hub either imports straight away or hands off to its
131
- // "Import resource" modal, whose confirming button depends on project state.
132
- // The modal probe is scoped to that modal: the review step's own button also
133
- // reads "Add to project".
134
- async addConnectorFromBrowseAll() {
135
- await this.browseAllMarketplaceDetailsButton.click({ timeout: 30000 });
136
- const canAdd = await this.browseAllAddButton
137
- .waitFor({ state: 'visible', timeout: 60000 })
138
- .then(() => true)
139
- .catch(() => false);
140
- if (!canAdd) {
141
- return false;
142
- }
143
- await this.browseAllAddButton.click({ timeout: 30000 });
144
- const importModalButton = this.importModal
145
- .getByRole('button', { name: 'Add to project' })
146
- .or(this.importModal.getByRole('button', { name: 'Replace resource' }))
147
- .or(this.importModal.getByRole('button', { name: 'Save as copy' }))
148
- .first();
149
- const needsConfirmation = await importModalButton
150
- .waitFor({ state: 'visible', timeout: 20000 })
151
- .then(() => true)
152
- .catch(() => false);
153
- if (needsConfirmation) {
154
- await importModalButton.click({ timeout: 20000 });
155
- await this.importModal.waitFor({ state: 'hidden', timeout: 60000 });
156
- }
157
- return true;
158
- }
159
118
  async closeMarketplaceDialog() {
160
- const browseAllOpen = await this.browseAllDialog
161
- .waitFor({ state: 'visible', timeout: 5000 })
162
- .then(() => true)
163
- .catch(() => false);
164
- if (browseAllOpen) {
165
- await this.closeBrowseAllDialog();
166
- return;
167
- }
168
119
  // Only click "Close" while the marketplace is up: a bare "Close" button
169
120
  // otherwise matches the properties panel's own close (x) and collapses it,
170
121
  // hiding the connector's "Input" tab the caller needs next.
@@ -185,39 +136,21 @@ class ConnectorMarketplacePage {
185
136
  await this.page.keyboard.press('Escape');
186
137
  await this.dialogTitle.waitFor({ state: 'hidden', timeout: 30000 });
187
138
  }
188
- async closeBrowseAllDialog() {
189
- await this.browseAllDialog
190
- .getByRole('button', { name: 'Close', exact: true })
191
- .first()
192
- .click({ timeout: 10000 });
193
- if (await this.browseAllDialog
194
- .waitFor({ state: 'hidden', timeout: 10000 })
195
- .then(() => true)
196
- .catch(() => false)) {
197
- return;
198
- }
199
- // Escape inside the review step only returns to the root view
200
- // (BrowseAllDialog onEscapeKeyDown), so a second one closes the dialog.
201
- await this.page.keyboard.press('Escape');
202
- if (await this.browseAllDialog
203
- .waitFor({ state: 'hidden', timeout: 5000 })
204
- .then(() => true)
205
- .catch(() => false)) {
206
- return;
207
- }
208
- await this.page.keyboard.press('Escape');
209
- await this.browseAllDialog.waitFor({ state: 'hidden', timeout: 30000 });
210
- }
211
139
  async searchAndDownloadConnector(connectorName) {
212
140
  await this.clickSearchForConnectorTextbox();
213
141
  await this.fillSearchForConnectorTextbox(connectorName);
214
- // Wait for the searched connector's card to render before downloading, so
215
- // the click cannot land on a leftover card from the unfiltered listing.
216
- await this.page
217
- .getByText(connectorName, { exact: true })
218
- .first()
219
- .waitFor({ state: 'visible', timeout: 60000 });
142
+ await this.waitForConnectorSearchResults();
220
143
  return await this.downloadConnectorToProject();
221
144
  }
145
+ getLegacyDownloadButton() {
146
+ if (!this.connectorName) {
147
+ return this.downloadToProjectButton;
148
+ }
149
+ return this.legacyMarketplaceDialog
150
+ .getByText(this.connectorName, { exact: true })
151
+ .first()
152
+ .locator('xpath=ancestor::*[.//button[normalize-space()="Download to project"]][1]')
153
+ .getByRole('button', { name: 'Download to project' });
154
+ }
222
155
  }
223
156
  exports.ConnectorMarketplacePage = ConnectorMarketplacePage;
@@ -182,9 +182,13 @@ class ModelerHomePage {
182
182
  // strict-mode violation the moment a duplicate exists, which fails every
183
183
  // later run in that org rather than just the run that created it.
184
184
  // On the Camunda Hub Workspaces overview the folder is a workspace tile
185
- // whose "Open workspace <name>" button navigates into it.
185
+ // whose "Open workspace <name>" button navigates into it; a list-view row
186
+ // opens it through a link of the same name.
186
187
  this.crossComponentProjectFolder = page
187
188
  .getByRole('button', { name: `Open workspace ${this.defaultFolderName}` })
189
+ .or(page.getByRole('link', {
190
+ name: `Open workspace ${this.defaultFolderName}`,
191
+ }))
188
192
  .or(page.getByTitle(this.defaultFolderName, {
189
193
  exact: true,
190
194
  }))
@@ -402,7 +406,15 @@ class ModelerHomePage {
402
406
  // resource is one level down, so re-enter the container first.
403
407
  async clickProcessDiagram(name) {
404
408
  await this.ensureInResourceContainer();
405
- const process = this.rows.filter({ hasText: name }).getByTitle(name).first();
409
+ // A Design System table row opens through a link laid over the row, which
410
+ // sits on top of the title text and takes its clicks -- so click the link.
411
+ // The link comes before the title in DOM order, so `first()` picks it
412
+ // whenever it exists; the title stays as the fallback for the classic table.
413
+ const row = this.rows.filter({ hasText: name });
414
+ const process = row
415
+ .getByRole('link', { name })
416
+ .or(row.getByTitle(name))
417
+ .first();
406
418
  await (0, test_1.expect)(process).toBeVisible({ timeout: 90000 });
407
419
  await process.click();
408
420
  }
@@ -460,10 +460,12 @@ class ProcessApplicationPage {
460
460
  // creation that did land but rendered slowly is re-entered instead of being
461
461
  // duplicated by the next attempt.
462
462
  async openByNameIfPresent(name, timeout = 15000) {
463
- const processApplication = this.page
464
- .getByRole('row')
465
- .filter({ hasText: name })
466
- .getByTitle(name)
463
+ // Link first: a Design System row link lies over the title and takes its
464
+ // clicks (see ModelerHomePage.clickProcessDiagram).
465
+ const row = this.page.getByRole('row').filter({ hasText: name });
466
+ const processApplication = row
467
+ .getByRole('link', { name })
468
+ .or(row.getByTitle(name))
467
469
  .first();
468
470
  const present = await processApplication
469
471
  .waitFor({ state: 'visible', timeout })
@@ -479,10 +481,12 @@ class ProcessApplicationPage {
479
481
  .catch(() => false);
480
482
  }
481
483
  async openByName(name) {
482
- const processApplication = this.page
483
- .getByRole('row')
484
- .filter({ hasText: name })
485
- .getByTitle(name)
484
+ // Link first: a Design System row link lies over the title and takes its
485
+ // clicks (see ModelerHomePage.clickProcessDiagram).
486
+ const row = this.page.getByRole('row').filter({ hasText: name });
487
+ const processApplication = row
488
+ .getByRole('link', { name })
489
+ .or(row.getByTitle(name))
486
490
  .first();
487
491
  await (0, test_1.expect)(processApplication).toBeVisible({ timeout: 90000 });
488
492
  await processApplication.click({ timeout: 60000 });
@@ -47,7 +47,7 @@ export declare function assertLatestAlertEmail(id: string, mailSlurp: MailSlurp,
47
47
  export declare function assertTestUsesCorrectOrganization(page: Page): Promise<void>;
48
48
  export declare function deleteAllUserGroups(homePage: HomePage, organizationPage: ConsoleOrganizationPage, appsPage: AppsPage): Promise<void>;
49
49
  export declare function deleteCluster(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, appsPage: AppsPage): Promise<void>;
50
- export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, clusterName: string, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
50
+ export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, clusterName: string, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
51
51
  export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, clusterName: string, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
52
52
  export declare function createAPIClient(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
53
53
  export declare function ensureDefaultClusterApiCredentials(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
@@ -872,7 +872,7 @@ async function deleteCluster(clusterName, homePage, clusterPage, appsPage) {
872
872
  await clusterPage.deleteCluster(clusterName);
873
873
  }
874
874
  exports.deleteCluster = deleteCluster;
875
- async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, clusterName, zeebeUrl, zeebeClientId, zeebeClientSecret) {
875
+ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, clusterName, zeebeUrl, zeebeClientId, zeebeClientSecret) {
876
876
  await modelerHomePage.clickCrossComponentProjectFolder();
877
877
  await modelerHomePage.clickDiagramTypeDropdown();
878
878
  await modelerHomePage.clickUploadFilesButton();
@@ -887,15 +887,10 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
887
887
  await modelerCreatePage.clickIdInput();
888
888
  await modelerCreatePage.fillIdInput(processName);
889
889
  await (0, sleep_1.sleep)(10000);
890
- await modelerCreatePage.clickSecondPlacedElement();
891
- await modelerCreatePage.clickChangeTypeButton();
892
- await (0, test_1.expect)(modelerCreatePage.marketPlaceButton).toBeVisible({
893
- timeout: 120000,
894
- });
895
- await modelerCreatePage.clickMarketPlaceButton();
896
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
897
- await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
898
- await connectorMarketplacePage.downloadConnectorToProject();
890
+ // The uploaded fixture embeds the REST connector template id, version,
891
+ // task definition, mappings, and headers on every service task. It deploys
892
+ // without adding the template to the project; opening Marketplace here was
893
+ // redundant setup and previously continued even when that import timed out.
899
894
  await (0, sleep_1.sleep)(5000);
900
895
  await page.reload();
901
896
  await (0, sleep_1.sleep)(5000);
@@ -918,13 +913,7 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
918
913
  timeout: 120000,
919
914
  });
920
915
  await modelerCreatePage.clickMarketPlaceButton();
921
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
922
- await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
923
- await (0, sleep_1.sleep)(10000);
924
- await (0, test_1.expect)(page.getByText('REST ConnectorBy CamundaConnect, interact, and synchronize processes')).toBeVisible({
925
- timeout: 60000,
926
- });
927
- await connectorMarketplacePage.downloadConnectorToProject();
916
+ await connectorMarketplacePage.searchAndDownloadConnector('REST Connector');
928
917
  // Both lookups are container-relative: clickProjectBreadcrumb() returns to
929
918
  // this test's process application, which is where the uploaded diagram
930
919
  // lives. The downloaded element template is the open question -- hub
@@ -99,8 +99,11 @@ class AppsPage {
99
99
  // that doesn't reliably exist. Ported from pages/8.9/AppsPage.ts, where
100
100
  // this shape is already nightly-proven.
101
101
  async expandHubClusterGroup(clusterName) {
102
+ // Anchored at the start: a plain substring match also hits "UI Test
103
+ // Cluster", which this suite creates too and which can precede "Test
104
+ // Cluster" in the sidebar.
102
105
  const toggle = this.hubSidebar
103
- .getByRole('button', { name: clusterName })
106
+ .getByRole('button', { name: new RegExp(`^${escapeRegExp(clusterName)}`) })
104
107
  .first();
105
108
  // The diagram editor (and other full-screen views reached from it, e.g.
106
109
  // right after runProcessInstance/deployDiagram) has no "Main navigation"
@@ -193,8 +193,13 @@ class ModelerHomePage {
193
193
  this.manageButton = page.getByRole('menuitem', { name: 'Manage' });
194
194
  // On the Camunda Hub Workspaces overview the folder is a workspace tile
195
195
  // whose "Open workspace <name>" button navigates into it.
196
+ // A grid tile opens the workspace through a button, a list-view row
197
+ // through a link.
196
198
  this.crossComponentProjectFolder = page
197
199
  .getByRole('button', { name: `Open workspace ${this.defaultFolderName}` })
200
+ .or(page.getByRole('link', {
201
+ name: `Open workspace ${this.defaultFolderName}`,
202
+ }))
198
203
  .or(page.getByTitle(this.defaultFolderName, { exact: true }))
199
204
  .first();
200
205
  this.rows = page.getByRole('row');
@@ -537,7 +542,15 @@ class ModelerHomePage {
537
542
  async clickProcessDiagram(name) {
538
543
  await this.ensureInResourceContainer();
539
544
  await (0, sessionRecovery_1.recoverStuckModelerLogin)(this.page);
540
- const process = this.rows.filter({ hasText: name }).getByTitle(name).first();
545
+ // A Design System table row opens through a link laid over the row, which
546
+ // sits on top of the title text and takes its clicks -- so click the link.
547
+ // The link comes before the title in DOM order, so `first()` picks it
548
+ // whenever it exists; the title stays as the fallback for the classic table.
549
+ const row = this.rows.filter({ hasText: name });
550
+ const process = row
551
+ .getByRole('link', { name })
552
+ .or(row.getByTitle(name))
553
+ .first();
541
554
  await (0, test_1.expect)(process).toBeVisible({ timeout: 90000 });
542
555
  await process.click();
543
556
  }
@@ -259,10 +259,12 @@ class ProcessApplicationPage {
259
259
  await reopen.click({ timeout: 30000 });
260
260
  }
261
261
  async openByName(name) {
262
- const processApplication = this.page
263
- .getByRole('row')
264
- .filter({ hasText: name })
265
- .getByTitle(name)
262
+ // Link first: a Design System row link lies over the title and takes its
263
+ // clicks (see ModelerHomePage.clickProcessDiagram).
264
+ const row = this.page.getByRole('row').filter({ hasText: name });
265
+ const processApplication = row
266
+ .getByRole('link', { name })
267
+ .or(row.getByTitle(name))
266
268
  .first();
267
269
  await (0, test_1.expect)(processApplication).toBeVisible({ timeout: 90000 });
268
270
  await processApplication.click({ timeout: 60000 });
@@ -11,6 +11,7 @@ declare class BrowseAllConnectorMarketplacePage {
11
11
  isOpen(): Promise<boolean>;
12
12
  waitForConnectorSearchResult(connectorName?: string): Promise<Locator>;
13
13
  importConnectorToProject(connectorName?: string): Promise<void>;
14
+ private waitForInspectionReady;
14
15
  private waitForAnyVisible;
15
16
  private completeImportReviewIfNecessary;
16
17
  private findConnectorCard;
@@ -2,6 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BrowseAllConnectorMarketplacePage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
+ // Hub automatically retries one transient inspection failure. SaaS can spend
6
+ // 60 seconds on each metadata request, so budget both reads plus UI headroom;
7
+ // successful inspections still return as soon as an actionable state appears.
8
+ const MARKETPLACE_INSPECTION_TIMEOUT = 150000;
5
9
  class BrowseAllConnectorMarketplacePage {
6
10
  page;
7
11
  searchForConnectorTextbox;
@@ -33,10 +37,13 @@ class BrowseAllConnectorMarketplacePage {
33
37
  return await this.searchForConnectorTextbox.isVisible();
34
38
  }
35
39
  async waitForConnectorSearchResult(connectorName) {
36
- await this.marketplaceConnectorCard.waitFor({
37
- state: 'visible',
38
- timeout: 120000,
39
- });
40
+ if (!connectorName) {
41
+ await this.marketplaceConnectorCard.waitFor({
42
+ state: 'visible',
43
+ timeout: 120000,
44
+ });
45
+ return this.marketplaceConnectorCard;
46
+ }
40
47
  return await this.findConnectorCard(connectorName);
41
48
  }
42
49
  async importConnectorToProject(connectorName) {
@@ -54,7 +61,7 @@ class BrowseAllConnectorMarketplacePage {
54
61
  name: 'Try again',
55
62
  });
56
63
  for (let attempt = 1; attempt <= 3; attempt++) {
57
- await this.waitForAnyVisible([addButton, addedStatus, retryButton], 120000);
64
+ await this.waitForInspectionReady(addButton, addedStatus, retryButton);
58
65
  if (await addedStatus.isVisible()) {
59
66
  break;
60
67
  }
@@ -66,7 +73,7 @@ class BrowseAllConnectorMarketplacePage {
66
73
  continue;
67
74
  }
68
75
  await addButton.click({ timeout: 60000 });
69
- if (await this.completeImportReviewIfNecessary(retryButton, addedStatus)) {
76
+ if (await this.completeImportReviewIfNecessary(addButton, retryButton, addedStatus)) {
70
77
  break;
71
78
  }
72
79
  if (attempt === 3) {
@@ -79,6 +86,20 @@ class BrowseAllConnectorMarketplacePage {
79
86
  .click({ timeout: 60000 });
80
87
  await browseAllDialog.waitFor({ state: 'hidden', timeout: 60000 });
81
88
  }
89
+ async waitForInspectionReady(addButton, addedStatus, retryButton) {
90
+ const checkingStatus = this.marketplaceDetailFooter.getByText('Checking this project…', { exact: true });
91
+ await (0, test_1.expect)(async () => {
92
+ const retryReady = !(await checkingStatus.isVisible()) &&
93
+ (await retryButton.isVisible()) &&
94
+ (await retryButton.isEnabled());
95
+ (0, test_1.expect)((await addButton.isVisible()) ||
96
+ (await addedStatus.isVisible()) ||
97
+ retryReady).toBe(true);
98
+ }).toPass({
99
+ timeout: MARKETPLACE_INSPECTION_TIMEOUT,
100
+ intervals: [1000, 2000, 5000],
101
+ });
102
+ }
82
103
  // Waits until any one of `locators` is visible.
83
104
  //
84
105
  // `Locator.or()` cannot do this: the union it builds is strict, so the
@@ -95,7 +116,7 @@ class BrowseAllConnectorMarketplacePage {
95
116
  (0, test_1.expect)(visible).toContain(true);
96
117
  }).toPass({ timeout, intervals: [1000, 2000, 5000] });
97
118
  }
98
- async completeImportReviewIfNecessary(retryButton, addedStatus) {
119
+ async completeImportReviewIfNecessary(addButton, retryButton, addedStatus) {
99
120
  await this.waitForAnyVisible([
100
121
  this.importModal,
101
122
  this.availableElementsHeading,
@@ -110,19 +131,20 @@ class BrowseAllConnectorMarketplacePage {
110
131
  }
111
132
  const confirmButton = this.importModal
112
133
  .getByRole('button', {
113
- name: /^(Add to project|Replace resource|Save as copy)$/,
134
+ name: /^(Add to project|Add to workspace|Replace resource|Save as copy)$/,
114
135
  })
115
136
  .first();
116
- const confirmationVisible = await confirmButton
117
- .waitFor({ state: 'visible', timeout: 10000 })
118
- .then(() => true)
119
- .catch(() => false);
120
- if (confirmationVisible) {
137
+ await (0, test_1.expect)(async () => {
138
+ (0, test_1.expect)((await confirmButton.isVisible()) ||
139
+ !(await this.importModal.isVisible())).toBe(true);
140
+ }).toPass({ timeout: 60000, intervals: [1000, 2000, 5000] });
141
+ if (await confirmButton.isVisible()) {
121
142
  await confirmButton.click({ timeout: 60000 });
122
143
  }
123
144
  await this.importModal.waitFor({ state: 'hidden', timeout: 120000 });
124
- await this.waitForAnyVisible([this.availableElementsHeading, addedStatus, retryButton], 120000);
125
- return !(await retryButton.isVisible());
145
+ await this.waitForAnyVisible([this.availableElementsHeading, addedStatus, addButton, retryButton], 120000);
146
+ return ((await this.availableElementsHeading.isVisible()) ||
147
+ (await addedStatus.isVisible()));
126
148
  }
127
149
  async findConnectorCard(connectorName) {
128
150
  if (!connectorName) {
@@ -136,20 +158,27 @@ class BrowseAllConnectorMarketplacePage {
136
158
  .replace(/\s+connector$/i, '')
137
159
  .trim()
138
160
  .split(/\s+/)
139
- .map(escapeRegExp)
161
+ .map((word) => `\\b${escapeRegExp(word)}\\b`)
140
162
  .join('.*');
141
163
  const relatedCard = this.marketplaceConnectorList
142
164
  .getByRole('button', {
143
165
  name: new RegExp(`^View details for .*${searchWords}.* from Marketplace$`, 'i'),
144
166
  })
145
167
  .first();
146
- if (await exactCard.isVisible()) {
168
+ const exactVisible = await exactCard
169
+ .waitFor({ state: 'visible', timeout: 15000 })
170
+ .then(() => true)
171
+ .catch(() => false);
172
+ if (exactVisible) {
147
173
  return exactCard;
148
174
  }
149
- if (await relatedCard.isVisible()) {
175
+ try {
176
+ await relatedCard.waitFor({ state: 'visible', timeout: 105000 });
150
177
  return relatedCard;
151
178
  }
152
- return this.marketplaceConnectorCard;
179
+ catch {
180
+ throw new Error(`Browse All returned no Marketplace connector matching "${connectorName}".`);
181
+ }
153
182
  }
154
183
  }
155
184
  exports.BrowseAllConnectorMarketplacePage = BrowseAllConnectorMarketplacePage;
@@ -3,6 +3,7 @@ declare class ConnectorMarketplacePage {
3
3
  private page;
4
4
  private browseAllConnectorMarketplacePage;
5
5
  private connectorName?;
6
+ private legacyMarketplaceDialog;
6
7
  readonly searchForConnectorTextbox: Locator;
7
8
  readonly downloadToProjectButton: Locator;
8
9
  readonly addToProjectButton: Locator;
@@ -21,5 +22,6 @@ declare class ConnectorMarketplacePage {
21
22
  downloadConnectorToProject(): Promise<void>;
22
23
  private confirmImport;
23
24
  private waitForImportToSettle;
25
+ private getLegacyDownloadButton;
24
26
  }
25
27
  export { ConnectorMarketplacePage };
@@ -8,6 +8,7 @@ class ConnectorMarketplacePage {
8
8
  page;
9
9
  browseAllConnectorMarketplacePage;
10
10
  connectorName;
11
+ legacyMarketplaceDialog;
11
12
  searchForConnectorTextbox;
12
13
  downloadToProjectButton;
13
14
  addToProjectButton;
@@ -21,7 +22,13 @@ class ConnectorMarketplacePage {
21
22
  this.browseAllConnectorMarketplacePage =
22
23
  new BrowseAllConnectorMarketplacePage_1.BrowseAllConnectorMarketplacePage(page);
23
24
  this.searchForConnectorTextbox =
24
- this.browseAllConnectorMarketplacePage.searchForConnectorTextbox.or(page.getByPlaceholder('Search for a connector'));
25
+ this.browseAllConnectorMarketplacePage.searchForConnectorTextbox
26
+ .or(page.getByPlaceholder('Search for a connector'))
27
+ .first();
28
+ this.legacyMarketplaceDialog = page
29
+ .getByRole('dialog', { name: 'Browse Marketplace connectors' })
30
+ .or(page.getByRole('dialog', { name: 'Discover Connectors Dialog' }))
31
+ .first();
25
32
  this.downloadToProjectButton = page
26
33
  .getByRole('button', { name: 'Download to project' })
27
34
  .first();
@@ -46,7 +53,7 @@ class ConnectorMarketplacePage {
46
53
  await (0, sleep_1.sleep)(2000);
47
54
  }
48
55
  async clickDownloadToProjectButton() {
49
- await this.downloadToProjectButton.click({ timeout: 60000 });
56
+ await this.getLegacyDownloadButton().click({ timeout: 60000 });
50
57
  }
51
58
  async clickCancelButton() {
52
59
  await this.cancelButton.click({ timeout: 30000 });
@@ -61,10 +68,11 @@ class ConnectorMarketplacePage {
61
68
  }
62
69
  const MAX_RETRIES = 4;
63
70
  for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
64
- await (0, test_1.expect)(this.downloadToProjectButton
71
+ const downloadButton = this.getLegacyDownloadButton();
72
+ await (0, test_1.expect)(downloadButton
65
73
  .or(this.marketplaceErrorMessage)
66
74
  .or(this.noResultsMessage)).toBeVisible({ timeout: 60000 });
67
- if (await this.downloadToProjectButton.isVisible()) {
75
+ if (await downloadButton.isVisible()) {
68
76
  return;
69
77
  }
70
78
  console.log(`Marketplace search attempt ${attempt} of ${MAX_RETRIES} returned an error or no results. Retrying search...`);
@@ -165,5 +173,15 @@ class ConnectorMarketplacePage {
165
173
  async waitForImportToSettle() {
166
174
  await this.page.waitForLoadState('networkidle').catch(() => { });
167
175
  }
176
+ getLegacyDownloadButton() {
177
+ if (!this.connectorName) {
178
+ return this.downloadToProjectButton;
179
+ }
180
+ return this.legacyMarketplaceDialog
181
+ .getByText(this.connectorName, { exact: true })
182
+ .first()
183
+ .locator('xpath=ancestor::*[.//button[normalize-space()="Download to project"]][1]')
184
+ .getByRole('button', { name: 'Download to project' });
185
+ }
168
186
  }
169
187
  exports.ConnectorMarketplacePage = ConnectorMarketplacePage;
@@ -166,8 +166,13 @@ class ModelerHomePage {
166
166
  .first();
167
167
  this.openOrganizationsButton = page.getByLabel('Open Organizations');
168
168
  this.manageButton = page.getByRole('button', { name: 'Manage' });
169
+ // A grid tile opens the workspace through a button, a list-view row
170
+ // through a link.
169
171
  this.crossComponentProjectFolder = page
170
172
  .getByRole('button', { name: `Open workspace ${this.defaultFolderName}` })
173
+ .or(page.getByRole('link', {
174
+ name: `Open workspace ${this.defaultFolderName}`,
175
+ }))
171
176
  .or(page.getByTitle(this.defaultFolderName, { exact: true }))
172
177
  .first();
173
178
  // The Design System shell drops the breadcrumb-home hook and labels the
@@ -609,7 +614,15 @@ class ModelerHomePage {
609
614
  // resource is one level down, so re-enter the container first.
610
615
  async clickProcessDiagram(name) {
611
616
  await this.ensureInResourceContainer();
612
- const process = this.rows.filter({ hasText: name }).getByTitle(name).first();
617
+ // A Design System table row opens through a link laid over the row, which
618
+ // sits on top of the title text and takes its clicks -- so click the link.
619
+ // The link comes before the title in DOM order, so `first()` picks it
620
+ // whenever it exists; the title stays as the fallback for the classic table.
621
+ const row = this.rows.filter({ hasText: name });
622
+ const process = row
623
+ .getByRole('link', { name })
624
+ .or(row.getByTitle(name))
625
+ .first();
613
626
  await (0, test_1.expect)(process).toBeVisible({ timeout: 90000 });
614
627
  await process.click();
615
628
  }
@@ -411,10 +411,7 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
411
411
  await modelerCreatePage.clickMarketPlaceButton();
412
412
  await connectorMarketplacePage.clickSearchForConnectorTextbox();
413
413
  await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
414
- await (0, sleep_1.sleep)(10000);
415
- await (0, test_1.expect)(page.getByText('REST ConnectorBy CamundaConnect, interact, and synchronize processes')).toBeVisible({
416
- timeout: 60000,
417
- });
414
+ await connectorMarketplacePage.waitForConnectorSearchResults();
418
415
  await connectorMarketplacePage.downloadConnectorToProject();
419
416
  // Both lookups are container-relative: clickProjectBreadcrumb() returns to
420
417
  // this test's process application, which is where the uploaded diagram
@@ -130,7 +130,7 @@ _8_10_1.test.describe('AWS Cluster User Flows Test', () => {
130
130
  await operateProcessInstancePage.assertProcessVariableHasDocumentCount('Upload_Files', 3);
131
131
  });
132
132
  });
133
- (0, _8_10_1.test)('Document Handling Connectors User Flow - AWS @tasklistV2', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, connectorMarketplacePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
133
+ (0, _8_10_1.test)('Document Handling Connectors User Flow - AWS @tasklistV2', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
134
134
  const apiClientName = await (0, _setup_1.generateRandomStringAsync)(6);
135
135
  const processName = 'Document_Handling_Connectors_User_Flow_AWS_Process' +
136
136
  (await (0, _setup_1.generateRandomStringAsync)(3));
@@ -150,7 +150,7 @@ _8_10_1.test.describe('AWS Cluster User Flows Test', () => {
150
150
  });
151
151
  });
152
152
  await _8_10_1.test.step('Open Cross Component Test Project and Create a REST Connector Document Handling Flow', async () => {
153
- await (0, UtilitiesPage_2.modelAndRunConnectorsDocHandlingDiagram)(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, clusterName, `"${credentials.zeebeUrl}"`, `"${credentials.zeebeClientId}"`, `"${credentials.zeebeClientSecret}"`);
153
+ await (0, UtilitiesPage_2.modelAndRunConnectorsDocHandlingDiagram)(modelerCreatePage, modelerHomePage, processName, page, clusterName, `"${credentials.zeebeUrl}"`, `"${credentials.zeebeClientId}"`, `"${credentials.zeebeClientSecret}"`);
154
154
  });
155
155
  await _8_10_1.test.step('View Process Instance in Operate, assert it completes and assert variable values are correct', async () => {
156
156
  await appsPage.clickCamundaApps();
@@ -332,10 +332,7 @@ _8_10_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
332
332
  timeout: 120000,
333
333
  });
334
334
  await modelerCreatePage.clickMarketPlaceButton();
335
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
336
- await connectorMarketplacePage.fillSearchForConnectorTextbox('Public Holiday Connector');
337
- await (0, sleep_1.sleep)(10000);
338
- await connectorMarketplacePage.downloadConnectorToProject();
335
+ await connectorMarketplacePage.searchAndDownloadConnector('Public Holiday Connector');
339
336
  await modelerCreatePage.clickPublicHolidayConnectorOption();
340
337
  await connectorSettingsPage.clickInputTab();
341
338
  await modelerCreatePage.clickPublicHolidayYearOption();
@@ -448,7 +445,7 @@ _8_10_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
448
445
  await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateProcessInstancePage, operateProcessInstancePage.completedIcon, 'Completed icon', 60000);
449
446
  });
450
447
  });
451
- (0, _8_10_1.test)('Document Handling Connectors User Flow - GCP', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, connectorMarketplacePage, }) => {
448
+ (0, _8_10_1.test)('Document Handling Connectors User Flow - GCP', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, }) => {
452
449
  _8_10_1.test.slow();
453
450
  const apiClientName = await (0, _setup_1.generateRandomStringAsync)(6);
454
451
  const processName = 'Document_Handling_Connectors_User_Flow_GCP_Process' +
@@ -469,7 +466,7 @@ _8_10_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
469
466
  });
470
467
  });
471
468
  await _8_10_1.test.step('Open Cross Component Test Project and Create a REST Connector Document Handling Flow', async () => {
472
- await (0, UtilitiesPage_3.modelAndRunConnectorsDocHandlingDiagram)(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, defaultClusterName, `"${credentials.zeebeUrl}"`, `"${credentials.zeebeClientId}"`, `"${credentials.zeebeClientSecret}"`);
469
+ await (0, UtilitiesPage_3.modelAndRunConnectorsDocHandlingDiagram)(modelerCreatePage, modelerHomePage, processName, page, defaultClusterName, `"${credentials.zeebeUrl}"`, `"${credentials.zeebeClientId}"`, `"${credentials.zeebeClientSecret}"`);
473
470
  });
474
471
  await _8_10_1.test.step('View Process Instance in Operate, assert it completes and assert variable values are correct', async () => {
475
472
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1318",
3
+ "version": "0.0.1320",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",