@camunda/e2e-test-suite 0.0.1319 → 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.
- package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +5 -6
- package/dist/pages/8.10/ConnectorMarketplacePage.js +39 -106
- package/dist/pages/8.10/UtilitiesPage.d.ts +1 -1
- package/dist/pages/8.10/UtilitiesPage.js +6 -17
- package/dist/pages/BrowseAllConnectorMarketplacePage.d.ts +1 -0
- package/dist/pages/BrowseAllConnectorMarketplacePage.js +48 -19
- package/dist/pages/SM-8.10/ConnectorMarketplacePage.d.ts +2 -0
- package/dist/pages/SM-8.10/ConnectorMarketplacePage.js +22 -4
- package/dist/pages/SM-8.10/UtilitiesPage.js +1 -4
- package/dist/tests/8.10/aws-cluster-user-flows.spec.js +2 -2
- package/dist/tests/8.10/connectors-user-flows.spec.js +3 -6
- package/package.json +1 -1
|
@@ -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
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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.
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -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,
|
|
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,
|
|
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
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
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.
|
|
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
|
|
@@ -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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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.
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
175
|
+
try {
|
|
176
|
+
await relatedCard.waitFor({ state: 'visible', timeout: 105000 });
|
|
150
177
|
return relatedCard;
|
|
151
178
|
}
|
|
152
|
-
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
|
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;
|
|
@@ -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
|
|
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,
|
|
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,
|
|
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.
|
|
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,
|
|
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,
|
|
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({
|