@camunda/e2e-test-suite 0.0.202 → 0.0.203
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/README.md +1 -0
- package/dist/fixtures/8.10.d.ts +75 -0
- package/dist/fixtures/8.10.js +187 -0
- package/dist/pages/8.10/AppsPage.d.ts +38 -0
- package/dist/pages/8.10/AppsPage.js +398 -0
- package/dist/pages/8.10/Authorization.d.ts +31 -0
- package/dist/pages/8.10/Authorization.js +143 -0
- package/dist/pages/8.10/ClientCredentialsDetailsPage.d.ts +12 -0
- package/dist/pages/8.10/ClientCredentialsDetailsPage.js +36 -0
- package/dist/pages/8.10/ClusterDetailsPage.d.ts +81 -0
- package/dist/pages/8.10/ClusterDetailsPage.js +475 -0
- package/dist/pages/8.10/ClusterPage.d.ts +63 -0
- package/dist/pages/8.10/ClusterPage.js +349 -0
- package/dist/pages/8.10/ClusterSecretsPage.d.ts +46 -0
- package/dist/pages/8.10/ClusterSecretsPage.js +219 -0
- package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +19 -0
- package/dist/pages/8.10/ConnectorMarketplacePage.js +56 -0
- package/dist/pages/8.10/ConnectorSettingsPage.d.ts +38 -0
- package/dist/pages/8.10/ConnectorSettingsPage.js +142 -0
- package/dist/pages/8.10/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/8.10/ConnectorTemplatePage.js +34 -0
- package/dist/pages/8.10/ConsoleOrganizationPage.d.ts +76 -0
- package/dist/pages/8.10/ConsoleOrganizationPage.js +402 -0
- package/dist/pages/8.10/FormJsPage.d.ts +28 -0
- package/dist/pages/8.10/FormJsPage.js +85 -0
- package/dist/pages/8.10/HomePage.d.ts +27 -0
- package/dist/pages/8.10/HomePage.js +88 -0
- package/dist/pages/8.10/IdpCreatePage.d.ts +81 -0
- package/dist/pages/8.10/IdpCreatePage.js +355 -0
- package/dist/pages/8.10/LoginPage.d.ts +42 -0
- package/dist/pages/8.10/LoginPage.js +93 -0
- package/dist/pages/8.10/ModelerCreatePage.d.ts +224 -0
- package/dist/pages/8.10/ModelerCreatePage.js +1166 -0
- package/dist/pages/8.10/ModelerHomePage.d.ts +54 -0
- package/dist/pages/8.10/ModelerHomePage.js +235 -0
- package/dist/pages/8.10/ModelerUserInvitePage.d.ts +29 -0
- package/dist/pages/8.10/ModelerUserInvitePage.js +136 -0
- package/dist/pages/8.10/OCIdentityAuthorizationsPage.d.ts +11 -0
- package/dist/pages/8.10/OCIdentityAuthorizationsPage.js +32 -0
- package/dist/pages/8.10/OCIdentityGroupsPage.d.ts +38 -0
- package/dist/pages/8.10/OCIdentityGroupsPage.js +166 -0
- package/dist/pages/8.10/OCIdentityHomePage.d.ts +18 -0
- package/dist/pages/8.10/OCIdentityHomePage.js +57 -0
- package/dist/pages/8.10/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/8.10/OCIdentityMappingRulesPage.js +124 -0
- package/dist/pages/8.10/OCIdentityRolesPage.d.ts +40 -0
- package/dist/pages/8.10/OCIdentityRolesPage.js +182 -0
- package/dist/pages/8.10/OperateHomePage.d.ts +23 -0
- package/dist/pages/8.10/OperateHomePage.js +73 -0
- package/dist/pages/8.10/OperateProcessInstancePage.d.ts +23 -0
- package/dist/pages/8.10/OperateProcessInstancePage.js +94 -0
- package/dist/pages/8.10/OperateProcessesPage.d.ts +25 -0
- package/dist/pages/8.10/OperateProcessesPage.js +103 -0
- package/dist/pages/8.10/OptimizeCollectionsPage.d.ts +17 -0
- package/dist/pages/8.10/OptimizeCollectionsPage.js +68 -0
- package/dist/pages/8.10/OptimizeDashboardPage.d.ts +11 -0
- package/dist/pages/8.10/OptimizeDashboardPage.js +65 -0
- package/dist/pages/8.10/OptimizeHomePage.d.ts +13 -0
- package/dist/pages/8.10/OptimizeHomePage.js +55 -0
- package/dist/pages/8.10/OptimizeReportPage.d.ts +48 -0
- package/dist/pages/8.10/OptimizeReportPage.js +159 -0
- package/dist/pages/8.10/PlayPage.d.ts +14 -0
- package/dist/pages/8.10/PlayPage.js +68 -0
- package/dist/pages/8.10/SettingsPage.d.ts +10 -0
- package/dist/pages/8.10/SettingsPage.js +43 -0
- package/dist/pages/8.10/SignUpPage.d.ts +42 -0
- package/dist/pages/8.10/SignUpPage.js +134 -0
- package/dist/pages/8.10/TaskDetailsPage.d.ts +75 -0
- package/dist/pages/8.10/TaskDetailsPage.js +269 -0
- package/dist/pages/8.10/TaskPanelPage.d.ts +21 -0
- package/dist/pages/8.10/TaskPanelPage.js +93 -0
- package/dist/pages/8.10/TaskProcessesPage.d.ts +13 -0
- package/dist/pages/8.10/TaskProcessesPage.js +68 -0
- package/dist/pages/8.10/UtilitiesPage.d.ts +47 -0
- package/dist/pages/8.10/UtilitiesPage.js +489 -0
- package/dist/tests/8.10/access-user-role-management.spec.d.ts +1 -0
- package/dist/tests/8.10/access-user-role-management.spec.js +323 -0
- package/dist/tests/8.10/agentic-ai-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/agentic-ai-user-flows.spec.js +185 -0
- package/dist/tests/8.10/api-tests-v2.spec.d.ts +1 -0
- package/dist/tests/8.10/api-tests-v2.spec.js +20 -0
- package/dist/tests/8.10/aws-cluster-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/aws-cluster-user-flows.spec.js +178 -0
- package/dist/tests/8.10/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/8.10/cluster-variables.spec.js +70 -0
- package/dist/tests/8.10/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/connectors-user-flows.spec.js +479 -0
- package/dist/tests/8.10/console-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/console-user-flows.spec.js +187 -0
- package/dist/tests/8.10/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/hto-user-flows.spec.js +471 -0
- package/dist/tests/8.10/idp-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/idp-user-flows.spec.js +214 -0
- package/dist/tests/8.10/login-negative-tests.spec.d.ts +1 -0
- package/dist/tests/8.10/login-negative-tests.spec.js +29 -0
- package/dist/tests/8.10/login.spec.d.ts +1 -0
- package/dist/tests/8.10/login.spec.js +26 -0
- package/dist/tests/8.10/navigation.spec.d.ts +1 -0
- package/dist/tests/8.10/navigation.spec.js +65 -0
- package/dist/tests/8.10/operate-access-flow.spec.d.ts +1 -0
- package/dist/tests/8.10/operate-access-flow.spec.js +51 -0
- package/dist/tests/8.10/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/8.10/optimize-api-tests.spec.js +268 -0
- package/dist/tests/8.10/optimize-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/optimize-user-flows.spec.js +255 -0
- package/dist/tests/8.10/play.spec.d.ts +1 -0
- package/dist/tests/8.10/play.spec.js +85 -0
- package/dist/tests/8.10/rba-enabled-v1-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/rba-enabled-v1-user-flows.spec.js +443 -0
- package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.js +446 -0
- package/dist/tests/8.10/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/8.10/smoke-tests.spec.js +181 -0
- package/dist/tests/8.10/test-setup.spec.d.ts +1 -0
- package/dist/tests/8.10/test-setup.spec.js +94 -0
- package/dist/tests/8.10/utr-enabled-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/utr-enabled-user-flows.spec.js +182 -0
- package/dist/tests/8.10/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/web-modeler-user-flows.spec.js +544 -0
- package/package.json +1 -1
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClusterPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
|
+
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
8
|
+
class ClusterPage {
|
|
9
|
+
page;
|
|
10
|
+
defaultClusterType = 'G3-Dev';
|
|
11
|
+
belgiumRegion;
|
|
12
|
+
londonRegion;
|
|
13
|
+
finlandRegion;
|
|
14
|
+
testInfo;
|
|
15
|
+
createNewClusterButton;
|
|
16
|
+
clusterNameInput;
|
|
17
|
+
createClusterButton;
|
|
18
|
+
clusterCreatingStatusText;
|
|
19
|
+
clusterHealthyStatusText;
|
|
20
|
+
clusterHealthyIndicatorSelector;
|
|
21
|
+
clusterGenerationCompleteMessage;
|
|
22
|
+
clustersBreadcrumb;
|
|
23
|
+
deleteClusterButton;
|
|
24
|
+
confirmDeleteInput;
|
|
25
|
+
dangerDeleteButton;
|
|
26
|
+
testClusterLink;
|
|
27
|
+
connectorSecretsTab;
|
|
28
|
+
createAClusterButton;
|
|
29
|
+
clusterVersionOption;
|
|
30
|
+
g3DevClusterType;
|
|
31
|
+
alphaTab;
|
|
32
|
+
devTab;
|
|
33
|
+
stableTab;
|
|
34
|
+
qaGenerationsTab;
|
|
35
|
+
gcpRegion;
|
|
36
|
+
clustersList;
|
|
37
|
+
tasklistV1Api;
|
|
38
|
+
tasklistV2Api;
|
|
39
|
+
cluster;
|
|
40
|
+
clusterHealthiness;
|
|
41
|
+
clusterLink;
|
|
42
|
+
constructor(page, testInfo) {
|
|
43
|
+
this.page = page;
|
|
44
|
+
this.testInfo = testInfo;
|
|
45
|
+
this.createNewClusterButton = page.getByRole('button', {
|
|
46
|
+
name: 'Create new Cluster',
|
|
47
|
+
});
|
|
48
|
+
this.clusterNameInput = page.getByPlaceholder('Enter a name for the cluster');
|
|
49
|
+
this.createClusterButton = page.getByRole('button', {
|
|
50
|
+
name: 'Create cluster',
|
|
51
|
+
});
|
|
52
|
+
this.clusterCreatingStatusText = page.getByText('Creating', { exact: true });
|
|
53
|
+
this.clusterHealthyStatusText = page.getByText('Healthy', { exact: true });
|
|
54
|
+
this.clusterHealthyIndicatorSelector = '[class="healthy healthIndicator"]';
|
|
55
|
+
this.clusterGenerationCompleteMessage = page.getByText('Test Cluster is healthy and ready to use');
|
|
56
|
+
this.clustersBreadcrumb = page
|
|
57
|
+
.getByLabel('Breadcrumb')
|
|
58
|
+
.getByText('Clusters', { exact: true });
|
|
59
|
+
this.deleteClusterButton = page.getByRole('button', { name: 'Delete' });
|
|
60
|
+
this.confirmDeleteInput = page.getByRole('textbox', {
|
|
61
|
+
name: 'Type the word DELETE to confirm',
|
|
62
|
+
});
|
|
63
|
+
this.dangerDeleteButton = page.getByRole('button', { name: 'danger Delete' });
|
|
64
|
+
this.testClusterLink = page.getByRole('link', { name: 'Test Cluster' });
|
|
65
|
+
this.connectorSecretsTab = page.getByRole('tab', {
|
|
66
|
+
name: 'Connector Secrets',
|
|
67
|
+
});
|
|
68
|
+
this.belgiumRegion = page.locator('label').filter({
|
|
69
|
+
hasText: 'Chaos, Belgium, Europe (europe-west1)',
|
|
70
|
+
});
|
|
71
|
+
this.londonRegion = page.locator('label').filter({
|
|
72
|
+
hasText: 'London, Europe (europe-west2)',
|
|
73
|
+
});
|
|
74
|
+
this.finlandRegion = page.locator('label').filter({
|
|
75
|
+
hasText: 'Finland, Europe (europe-north1)',
|
|
76
|
+
});
|
|
77
|
+
this.createAClusterButton = page.getByRole('button', {
|
|
78
|
+
name: 'Create a Cluster',
|
|
79
|
+
});
|
|
80
|
+
this.clusterVersionOption = page.getByText(`${process.env.CLUSTER_VERSION}`, { exact: true });
|
|
81
|
+
this.g3DevClusterType = page.locator('label').filter({
|
|
82
|
+
hasText: this.defaultClusterType,
|
|
83
|
+
});
|
|
84
|
+
this.alphaTab = page.getByRole('tab', { name: 'Alpha' });
|
|
85
|
+
this.devTab = page.getByRole('tab', { name: 'Internal Dev' });
|
|
86
|
+
this.stableTab = page.getByRole('tab', { name: 'Stable' });
|
|
87
|
+
this.qaGenerationsTab = page.getByRole('tab', { name: 'QA Generations' });
|
|
88
|
+
this.gcpRegion = page.getByRole('tab', {
|
|
89
|
+
name: 'GCP',
|
|
90
|
+
});
|
|
91
|
+
this.clustersList = page
|
|
92
|
+
.getByRole('row')
|
|
93
|
+
.filter({ hasNotText: 'Generation' }); //Filter out header row
|
|
94
|
+
this.tasklistV1Api = page.getByText('Tasklist API v1 (legacy)');
|
|
95
|
+
this.tasklistV2Api = page.getByText('Tasklist API v2');
|
|
96
|
+
this.cluster = (clusterName) => this.clustersList.filter({ hasText: clusterName });
|
|
97
|
+
this.clusterHealthiness = (clusterName) => this.cluster(clusterName).getByText(`Healthy`, {
|
|
98
|
+
exact: true,
|
|
99
|
+
});
|
|
100
|
+
this.clusterLink = (clusterName) => this.cluster(clusterName).getByRole('link', {
|
|
101
|
+
name: clusterName,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
async clickClusterBanner() {
|
|
105
|
+
await this.page
|
|
106
|
+
.getByRole('banner')
|
|
107
|
+
.getByRole('link', { name: 'Clusters' })
|
|
108
|
+
.click({ timeout: 60000 });
|
|
109
|
+
}
|
|
110
|
+
async deleteCluster(name) {
|
|
111
|
+
await this.page.waitForTimeout(1000);
|
|
112
|
+
const clusterInstance = this.cluster(name).first();
|
|
113
|
+
if ((await clusterInstance.count()) <= 0) {
|
|
114
|
+
console.log(`No clusters found with name ${name}, skipping deletion.`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
await clusterInstance.waitFor({ timeout: 10000 });
|
|
118
|
+
let deleteButtons = this.cluster(name).getByRole('button', {
|
|
119
|
+
name: 'Delete',
|
|
120
|
+
});
|
|
121
|
+
while ((await deleteButtons.count()) > 0) {
|
|
122
|
+
const deleteButton = deleteButtons.nth(0);
|
|
123
|
+
if (await deleteButton.isVisible()) {
|
|
124
|
+
try {
|
|
125
|
+
await deleteButton.click({ force: true, timeout: 60000 });
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
await this.clickClusterBanner();
|
|
129
|
+
await (0, test_1.expect)(deleteButton).toBeVisible({ timeout: 60000 });
|
|
130
|
+
await deleteButton.click({ force: true, timeout: 60000 });
|
|
131
|
+
}
|
|
132
|
+
await this.confirmDeleteInput.click({ force: true, timeout: 60000 });
|
|
133
|
+
await this.confirmDeleteInput.fill('DELETE', { timeout: 60000 });
|
|
134
|
+
const dangerDeleteButtons = await this.dangerDeleteButton.all();
|
|
135
|
+
const lastDangerDeleteButton = dangerDeleteButtons[dangerDeleteButtons.length - 1];
|
|
136
|
+
await lastDangerDeleteButton.click();
|
|
137
|
+
await (0, test_1.expect)(this.page.getByText('Deleting...')).not.toBeVisible({
|
|
138
|
+
timeout: 60000,
|
|
139
|
+
});
|
|
140
|
+
// Refresh the list of delete buttons
|
|
141
|
+
deleteButtons = this.cluster(name).getByRole('button', {
|
|
142
|
+
name: 'Delete',
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
await this.page.waitForTimeout(500);
|
|
147
|
+
}
|
|
148
|
+
async clickClusterTab() {
|
|
149
|
+
await Promise.race([
|
|
150
|
+
this.page.waitForURL(/\/clusters/, {
|
|
151
|
+
timeout: 60000,
|
|
152
|
+
}),
|
|
153
|
+
this.clickClusterBanner(),
|
|
154
|
+
]);
|
|
155
|
+
}
|
|
156
|
+
async clickCreateNewClusterButton() {
|
|
157
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createNewClusterButton, {
|
|
158
|
+
visibilityTimeout: 20000,
|
|
159
|
+
totalTimeout: 80000,
|
|
160
|
+
postAction: async () => {
|
|
161
|
+
await this.clickClusterBanner();
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
async clickClusterNameInput() {
|
|
166
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.clusterNameInput, {
|
|
167
|
+
postAction: async () => {
|
|
168
|
+
await this.clickClusterBanner();
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
async fillClusterNameInput(name) {
|
|
173
|
+
await this.clusterNameInput.fill(name);
|
|
174
|
+
}
|
|
175
|
+
extractClusterIdFromUrl(url) {
|
|
176
|
+
const clusterIdMatch = url.match(/\/cluster\/([a-f0-9-]+)/);
|
|
177
|
+
return clusterIdMatch ? clusterIdMatch[1] : null;
|
|
178
|
+
}
|
|
179
|
+
async logClusterCreationInfo(clusterName) {
|
|
180
|
+
try {
|
|
181
|
+
await this.page.waitForURL(/\/cluster\/[a-f0-9-]+$/, { timeout: 60000 });
|
|
182
|
+
const currentUrl = this.page.url();
|
|
183
|
+
const clusterId = this.extractClusterIdFromUrl(currentUrl);
|
|
184
|
+
console.log(`🎉 Cluster "${clusterName}" created successfully with ID: ${clusterId || 'Unknown'} at ${new Date().toISOString()}`);
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
console.warn(`⚠️ Could not extract cluster info for "${clusterName}": ${error}`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async createCluster(name, region = 'GCP', tasklistV1Api) {
|
|
191
|
+
await this.clickClusterTab();
|
|
192
|
+
await this.deleteCluster(name);
|
|
193
|
+
await this.clickCreateNewClusterButton();
|
|
194
|
+
await this.clickClusterNameInput();
|
|
195
|
+
await this.fillClusterNameInput(name);
|
|
196
|
+
await this.clickClusterType();
|
|
197
|
+
await this.page.getByRole('tab', { name: region }).click();
|
|
198
|
+
await this.selectSubRegion(region);
|
|
199
|
+
await this.clickClusterOption();
|
|
200
|
+
await this.determineTasklistAPI(tasklistV1Api);
|
|
201
|
+
await this.clickCreateClusterButton();
|
|
202
|
+
await this.logClusterCreationInfo(name);
|
|
203
|
+
await this.clickClustersBreadcrumb(name);
|
|
204
|
+
}
|
|
205
|
+
async determineTasklistAPI(tasklistV1Api) {
|
|
206
|
+
// Determine tasklistV1Api from project name if not explicitly provided
|
|
207
|
+
if (tasklistV1Api === undefined) {
|
|
208
|
+
const projectName = this.testInfo?.project.name || '';
|
|
209
|
+
tasklistV1Api =
|
|
210
|
+
projectName.includes('v1') || projectName.includes('8.10-v1');
|
|
211
|
+
console.log(`Auto-detected Tasklist API version from project '${projectName}': ${tasklistV1Api ? 'V1' : 'V2'}`);
|
|
212
|
+
}
|
|
213
|
+
if (tasklistV1Api) {
|
|
214
|
+
await this.clickTasklistV1Api();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
async clickClusterType() {
|
|
218
|
+
if (process.env.IS_PROD !== 'true') {
|
|
219
|
+
await (0, test_1.expect)(this.g3DevClusterType).toBeVisible({ timeout: 60000 });
|
|
220
|
+
await this.g3DevClusterType.click();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
async clickCreateClusterButton() {
|
|
224
|
+
await this.createClusterButton.click();
|
|
225
|
+
}
|
|
226
|
+
async clickClustersBreadcrumb(clusterName) {
|
|
227
|
+
const creatingCheckRegex = new RegExp(`${clusterName}.*?Creatingdev`);
|
|
228
|
+
const healthyCheckRegex = new RegExp(`${clusterName}.*?Healthydev`);
|
|
229
|
+
try {
|
|
230
|
+
await (0, test_1.expect)(this.clustersBreadcrumb).toBeVisible({ timeout: 60000 });
|
|
231
|
+
await this.clustersBreadcrumb.click({ timeout: 60000 });
|
|
232
|
+
await (0, test_1.expect)(this.page.getByText(creatingCheckRegex)).toBeVisible({
|
|
233
|
+
timeout: 30000,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
await this.clickClusterBanner();
|
|
238
|
+
await (0, test_1.expect)(this.page
|
|
239
|
+
.getByText(creatingCheckRegex)
|
|
240
|
+
.or(this.page.getByText(healthyCheckRegex))).toBeVisible({
|
|
241
|
+
timeout: 30000,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
async clickClusterLink(name) {
|
|
246
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.clusterLink(name), {
|
|
247
|
+
postAction: async () => {
|
|
248
|
+
await this.clickClusterBanner();
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
async clickConnectorSecretsTab(clusterName) {
|
|
253
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.connectorSecretsTab, {
|
|
254
|
+
postAction: async () => {
|
|
255
|
+
await this.clickClusterBanner();
|
|
256
|
+
await this.clickClusterLink(clusterName);
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
async clickClusterOption() {
|
|
261
|
+
const tabs = [
|
|
262
|
+
this.clickDevTab,
|
|
263
|
+
this.clickQAGenerationsTab,
|
|
264
|
+
this.clickStableTab,
|
|
265
|
+
this.clickAlphaTab,
|
|
266
|
+
];
|
|
267
|
+
for (const clickTab of tabs) {
|
|
268
|
+
try {
|
|
269
|
+
await clickTab.call(this);
|
|
270
|
+
await this.clusterVersionOption.click({ timeout: 60000 });
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
console.error('Error clicking tab or cluster version option:', error);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
throw new Error('Failed to find cluster generation');
|
|
278
|
+
}
|
|
279
|
+
async createClusterIfNotExists(clusterName, region = 'GCP') {
|
|
280
|
+
await (0, sleep_1.sleep)(15000);
|
|
281
|
+
if ((await this.cluster(clusterName).isVisible({ timeout: 20000 })) &&
|
|
282
|
+
(await this.clusterHealthiness(clusterName).isVisible({ timeout: 20000 }))) {
|
|
283
|
+
console.log(`${clusterName} exists and is healthy.`);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
await this.createCluster(clusterName, region);
|
|
287
|
+
await this.assertClusterHealthyStatusWithRetry(clusterName, 120000, 600000);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 500000) {
|
|
291
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.clusterHealthiness(name), {
|
|
292
|
+
visibilityTimeout: visibilityTimeout,
|
|
293
|
+
totalTimeout: totalTimeout,
|
|
294
|
+
maxRetries: 5,
|
|
295
|
+
preAction: async () => {
|
|
296
|
+
await this.page.reload();
|
|
297
|
+
await (0, test_1.expect)(this.cluster(name)).toBeVisible({ timeout: 10000 });
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
console.log('Cluster is healthy:', name);
|
|
301
|
+
}
|
|
302
|
+
async clickAlphaTab() {
|
|
303
|
+
await this.alphaTab.click();
|
|
304
|
+
}
|
|
305
|
+
async clickDevTab() {
|
|
306
|
+
await this.devTab.click();
|
|
307
|
+
}
|
|
308
|
+
async clickStableTab() {
|
|
309
|
+
await this.stableTab.click();
|
|
310
|
+
}
|
|
311
|
+
async clickQAGenerationsTab() {
|
|
312
|
+
await this.qaGenerationsTab.click();
|
|
313
|
+
}
|
|
314
|
+
async selectSubRegion(region) {
|
|
315
|
+
if (region === 'GCP') {
|
|
316
|
+
if (process.env.IS_PROD == 'true') {
|
|
317
|
+
await (0, test_1.expect)(this.londonRegion).toBeVisible({ timeout: 20000 });
|
|
318
|
+
await this.londonRegion.click();
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
const regions = [
|
|
322
|
+
{ name: 'Belgium', locator: this.belgiumRegion },
|
|
323
|
+
{ name: 'Finland', locator: this.finlandRegion },
|
|
324
|
+
];
|
|
325
|
+
const chosen = regions[Math.floor(Math.random() * regions.length)];
|
|
326
|
+
console.log(`Selected region: ${chosen.name}`);
|
|
327
|
+
await (0, test_1.expect)(chosen.locator).toBeVisible({ timeout: 20000 });
|
|
328
|
+
await chosen.locator.click();
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
async clickGCPRegion() {
|
|
333
|
+
const regionSelectionEnabled = process.env.REGION_SELECTION === 'true';
|
|
334
|
+
if (regionSelectionEnabled) {
|
|
335
|
+
await (0, test_1.expect)(this.gcpRegion).toBeVisible({ timeout: 40000 });
|
|
336
|
+
await this.gcpRegion.click();
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
async clickTasklistV1Api() {
|
|
340
|
+
try {
|
|
341
|
+
await (0, test_1.expect)(this.tasklistV1Api).toBeVisible({ timeout: 60000 });
|
|
342
|
+
await this.tasklistV1Api.click({ timeout: 30000 });
|
|
343
|
+
}
|
|
344
|
+
catch {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
exports.ClusterPage = ClusterPage;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class ClusterSecretsPage {
|
|
3
|
+
private page;
|
|
4
|
+
readonly createNewSecretButton: Locator;
|
|
5
|
+
readonly keyInput: Locator;
|
|
6
|
+
readonly valueInput: Locator;
|
|
7
|
+
readonly createButton: Locator;
|
|
8
|
+
readonly optionsButton: Locator;
|
|
9
|
+
readonly deleteConnectorSecretButton: Locator;
|
|
10
|
+
readonly deleteConnectorSecretSubButton: Locator;
|
|
11
|
+
readonly dialog: Locator;
|
|
12
|
+
readonly importButton: Locator;
|
|
13
|
+
readonly fromFileButton: Locator;
|
|
14
|
+
readonly bulkImportTextArea: Locator;
|
|
15
|
+
readonly dialogImportButton: Locator;
|
|
16
|
+
readonly secretsSearchBox: Locator;
|
|
17
|
+
readonly clusterBanner: Locator;
|
|
18
|
+
readonly clusterLink: (name: string) => Locator;
|
|
19
|
+
readonly clusterSecretTab: Locator;
|
|
20
|
+
readonly confirmDeleteInput: Locator;
|
|
21
|
+
constructor(page: Page);
|
|
22
|
+
deleteConnectorSecretsIfExist(): Promise<void>;
|
|
23
|
+
clickCreateNewSecretButton(cluster: string): Promise<void>;
|
|
24
|
+
clickClusterBanner(): Promise<void>;
|
|
25
|
+
clickCluster(name: string): Promise<void>;
|
|
26
|
+
clickKeyInput(): Promise<void>;
|
|
27
|
+
fillKeyInput(key: string): Promise<void>;
|
|
28
|
+
clickValueInput(): Promise<void>;
|
|
29
|
+
fillValueInput(value: string): Promise<void>;
|
|
30
|
+
clickCreateButton(): Promise<void>;
|
|
31
|
+
createNewSecret(key: string, value: string, cluster: string): Promise<void>;
|
|
32
|
+
createSetOfSecrets(cluster: string, secrets: {
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[]): Promise<void>;
|
|
36
|
+
assertSecretsOrCreate(cluster: string, secrets: {
|
|
37
|
+
name: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}[]): Promise<void>;
|
|
40
|
+
clickImportButton(): Promise<void>;
|
|
41
|
+
bulkImportSecrets(secrets: {
|
|
42
|
+
name: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}[]): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
export { ClusterSecretsPage };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClusterSecretsPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
|
+
class ClusterSecretsPage {
|
|
8
|
+
page;
|
|
9
|
+
createNewSecretButton;
|
|
10
|
+
keyInput;
|
|
11
|
+
valueInput;
|
|
12
|
+
createButton;
|
|
13
|
+
optionsButton;
|
|
14
|
+
deleteConnectorSecretButton;
|
|
15
|
+
deleteConnectorSecretSubButton;
|
|
16
|
+
dialog;
|
|
17
|
+
importButton;
|
|
18
|
+
fromFileButton;
|
|
19
|
+
bulkImportTextArea;
|
|
20
|
+
dialogImportButton;
|
|
21
|
+
secretsSearchBox;
|
|
22
|
+
clusterBanner;
|
|
23
|
+
clusterLink;
|
|
24
|
+
clusterSecretTab;
|
|
25
|
+
confirmDeleteInput;
|
|
26
|
+
constructor(page) {
|
|
27
|
+
this.page = page;
|
|
28
|
+
this.createNewSecretButton = page.getByRole('button', {
|
|
29
|
+
name: 'Create new secret',
|
|
30
|
+
});
|
|
31
|
+
this.keyInput = page.getByLabel('Key');
|
|
32
|
+
this.valueInput = page.getByLabel('Value', { exact: true });
|
|
33
|
+
this.createButton = page.getByRole('button', { name: 'Create', exact: true });
|
|
34
|
+
this.optionsButton = page
|
|
35
|
+
.getByRole('cell', { name: 'Options' })
|
|
36
|
+
.getByRole('button');
|
|
37
|
+
this.deleteConnectorSecretButton = page.getByRole('menuitem', {
|
|
38
|
+
name: 'Delete',
|
|
39
|
+
exact: true,
|
|
40
|
+
});
|
|
41
|
+
this.deleteConnectorSecretSubButton = page.getByRole('button', {
|
|
42
|
+
name: 'danger Delete',
|
|
43
|
+
});
|
|
44
|
+
this.dialog = page.getByRole('dialog');
|
|
45
|
+
this.importButton = page.getByRole('button', { name: 'Import', exact: true });
|
|
46
|
+
this.fromFileButton = page.getByText('from File', { exact: true });
|
|
47
|
+
this.bulkImportTextArea = page.locator('[id="env-content-input-secrets-bulk-import"]');
|
|
48
|
+
this.dialogImportButton = this.page
|
|
49
|
+
.getByRole('dialog')
|
|
50
|
+
.getByRole('button', { name: 'Import', exact: true });
|
|
51
|
+
this.secretsSearchBox = page.getByRole('searchbox', { name: 'Filter table' });
|
|
52
|
+
this.clusterBanner = this.page
|
|
53
|
+
.getByRole('banner')
|
|
54
|
+
.getByRole('link', { name: 'Clusters' });
|
|
55
|
+
this.clusterLink = (name) => page.getByRole('link', { name: name });
|
|
56
|
+
this.clusterSecretTab = this.page.getByRole('tab', {
|
|
57
|
+
name: 'Connector Secrets',
|
|
58
|
+
});
|
|
59
|
+
this.confirmDeleteInput = page.getByRole('textbox', {
|
|
60
|
+
name: 'Type the word DELETE to confirm',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async deleteConnectorSecretsIfExist() {
|
|
64
|
+
try {
|
|
65
|
+
await (0, test_1.expect)(this.optionsButton.first()).toBeVisible({
|
|
66
|
+
timeout: 10000,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
return; //No Connector Secrets found in the list
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
let options = await this.optionsButton.all();
|
|
74
|
+
while (options.length > 0) {
|
|
75
|
+
const operationButton = options[0];
|
|
76
|
+
if (await operationButton.isVisible()) {
|
|
77
|
+
await operationButton.click({ timeout: 60000 });
|
|
78
|
+
await this.deleteConnectorSecretButton.click({ timeout: 60000 });
|
|
79
|
+
await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 40000 });
|
|
80
|
+
await this.deleteConnectorSecretSubButton.click();
|
|
81
|
+
await (0, test_1.expect)(this.page.getByText('Deleting...')).not.toBeVisible({
|
|
82
|
+
timeout: 60000,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
86
|
+
await sleep(3000);
|
|
87
|
+
options = await this.optionsButton.all();
|
|
88
|
+
}
|
|
89
|
+
await (0, test_1.expect)(this.optionsButton).not.toBeVisible({
|
|
90
|
+
timeout: 30000,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
console.error('Error during Connector Secrets deletion: ', error);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async clickCreateNewSecretButton(cluster) {
|
|
98
|
+
try {
|
|
99
|
+
await this.createNewSecretButton.click({ timeout: 60000 });
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
await this.clickClusterBanner();
|
|
103
|
+
await this.clickCluster(cluster);
|
|
104
|
+
await this.clusterSecretTab.click({ timeout: 30000 });
|
|
105
|
+
await this.createNewSecretButton.click({ timeout: 30000 });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async clickClusterBanner() {
|
|
109
|
+
await (0, test_1.expect)(this.clusterBanner).toBeVisible({ timeout: 30000 });
|
|
110
|
+
await this.clusterBanner.click({ timeout: 60000 });
|
|
111
|
+
}
|
|
112
|
+
async clickCluster(name) {
|
|
113
|
+
await (0, test_1.expect)(this.clusterLink(name)).toBeVisible({ timeout: 30000 });
|
|
114
|
+
await this.clusterLink(name).click();
|
|
115
|
+
}
|
|
116
|
+
async clickKeyInput() {
|
|
117
|
+
await (0, test_1.expect)(this.keyInput).toBeVisible({ timeout: 60000 });
|
|
118
|
+
await this.keyInput.click({ timeout: 30000 });
|
|
119
|
+
}
|
|
120
|
+
async fillKeyInput(key) {
|
|
121
|
+
await this.keyInput.fill(key, { timeout: 30000 });
|
|
122
|
+
}
|
|
123
|
+
async clickValueInput() {
|
|
124
|
+
await (0, test_1.expect)(this.valueInput).toBeVisible({ timeout: 60000 });
|
|
125
|
+
await this.valueInput.click({ timeout: 30000 });
|
|
126
|
+
}
|
|
127
|
+
async fillValueInput(value) {
|
|
128
|
+
const maxRetries = 3;
|
|
129
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
130
|
+
try {
|
|
131
|
+
await this.valueInput.fill(value, { timeout: 30000 });
|
|
132
|
+
const inputValue = await this.valueInput.inputValue();
|
|
133
|
+
if (inputValue === value) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
console.log(`Attempt ${attempt}: Value input not filled correctly. Expected: "${value}", Got: "${inputValue}"`);
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
console.log(`Attempt ${attempt}: Error filling value input:`, error);
|
|
140
|
+
}
|
|
141
|
+
if (attempt < maxRetries) {
|
|
142
|
+
await this.valueInput.clear();
|
|
143
|
+
await this.valueInput.click({ timeout: 30000 });
|
|
144
|
+
await (0, sleep_1.sleep)(1000);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
throw new Error(`Failed to fill value input after ${maxRetries} attempts`);
|
|
148
|
+
}
|
|
149
|
+
async clickCreateButton() {
|
|
150
|
+
await (0, test_1.expect)(this.createButton).toBeVisible({ timeout: 60000 });
|
|
151
|
+
await this.createButton.click({ timeout: 30000 });
|
|
152
|
+
}
|
|
153
|
+
async createNewSecret(key, value, cluster) {
|
|
154
|
+
await this.clickCreateNewSecretButton(cluster);
|
|
155
|
+
await this.clickKeyInput();
|
|
156
|
+
await this.fillKeyInput(key);
|
|
157
|
+
await (0, sleep_1.sleep)(1000);
|
|
158
|
+
await this.clickValueInput();
|
|
159
|
+
await this.fillValueInput(value);
|
|
160
|
+
await (0, sleep_1.sleep)(1000);
|
|
161
|
+
await this.clickCreateButton();
|
|
162
|
+
await (0, test_1.expect)(this.page.getByText('Creating...')).not.toBeVisible({
|
|
163
|
+
timeout: 60000,
|
|
164
|
+
});
|
|
165
|
+
await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
|
|
166
|
+
timeout: 60000,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
async createSetOfSecrets(cluster, secrets) {
|
|
170
|
+
await this.bulkImportSecrets(secrets);
|
|
171
|
+
await this.assertSecretsOrCreate(cluster, secrets);
|
|
172
|
+
}
|
|
173
|
+
async assertSecretsOrCreate(cluster, secrets) {
|
|
174
|
+
for (const secret of secrets) {
|
|
175
|
+
try {
|
|
176
|
+
await (0, test_1.expect)(this.secretsSearchBox).toBeVisible();
|
|
177
|
+
await this.secretsSearchBox.click();
|
|
178
|
+
await this.secretsSearchBox.fill(secret.name);
|
|
179
|
+
const row = this.page.getByRole('row', {
|
|
180
|
+
name: new RegExp(`^${secret.name}\\b`, 'i'),
|
|
181
|
+
});
|
|
182
|
+
await (0, test_1.expect)(row).toBeVisible({ timeout: 5000 });
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
console.error(`Creating secret for ${secret.name}`);
|
|
186
|
+
await this.createNewSecret(secret.name, secret.value, cluster);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async clickImportButton() {
|
|
191
|
+
await (0, test_1.expect)(this.importButton).toBeVisible({ timeout: 30000 });
|
|
192
|
+
await this.importButton.click();
|
|
193
|
+
}
|
|
194
|
+
async bulkImportSecrets(secrets) {
|
|
195
|
+
const mapped = secrets
|
|
196
|
+
.map((secret) => `${secret.name}=${secret.value}`)
|
|
197
|
+
.join('\n');
|
|
198
|
+
await this.clickImportButton();
|
|
199
|
+
if (!(await this.dialog.isVisible())) {
|
|
200
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.fromFileButton, {
|
|
201
|
+
postAction: async () => {
|
|
202
|
+
await this.clickImportButton();
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
await this.fromFileButton.click();
|
|
206
|
+
}
|
|
207
|
+
await (0, test_1.expect)(this.dialog).toBeVisible();
|
|
208
|
+
await this.bulkImportTextArea.click();
|
|
209
|
+
await this.bulkImportTextArea.fill(mapped);
|
|
210
|
+
await this.dialogImportButton.click();
|
|
211
|
+
await (0, test_1.expect)(this.page.getByText('Importing secrets...')).not.toBeVisible({
|
|
212
|
+
timeout: 60000,
|
|
213
|
+
});
|
|
214
|
+
await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
|
|
215
|
+
timeout: 60000,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.ClusterSecretsPage = ClusterSecretsPage;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class ConnectorMarketplacePage {
|
|
3
|
+
private page;
|
|
4
|
+
readonly searchForConnectorTextbox: Locator;
|
|
5
|
+
readonly downloadToProjectButton: Locator;
|
|
6
|
+
readonly snackbar: Locator;
|
|
7
|
+
readonly closeButton: Locator;
|
|
8
|
+
readonly replaceResourceButton: Locator;
|
|
9
|
+
readonly cancelButton: Locator;
|
|
10
|
+
constructor(page: Page);
|
|
11
|
+
clickSearchForConnectorTextbox(): Promise<void>;
|
|
12
|
+
fillSearchForConnectorTextbox(connectorName: string): Promise<void>;
|
|
13
|
+
clickDownloadToProjectButton(): Promise<void>;
|
|
14
|
+
clickSnackbar(): Promise<void>;
|
|
15
|
+
clickCloseButton(): Promise<void>;
|
|
16
|
+
clickReplaceResourceButton(): Promise<void>;
|
|
17
|
+
downloadConnectorToProject(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export { ConnectorMarketplacePage };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectorMarketplacePage = void 0;
|
|
4
|
+
class ConnectorMarketplacePage {
|
|
5
|
+
page;
|
|
6
|
+
searchForConnectorTextbox;
|
|
7
|
+
downloadToProjectButton;
|
|
8
|
+
snackbar;
|
|
9
|
+
closeButton;
|
|
10
|
+
replaceResourceButton;
|
|
11
|
+
cancelButton;
|
|
12
|
+
constructor(page) {
|
|
13
|
+
this.page = page;
|
|
14
|
+
this.searchForConnectorTextbox = page.getByPlaceholder('Search for a connector');
|
|
15
|
+
this.downloadToProjectButton = page
|
|
16
|
+
.getByRole('button', { name: 'Download to project' })
|
|
17
|
+
.first();
|
|
18
|
+
this.snackbar = page.locator('[data-test="snackbar"]');
|
|
19
|
+
this.closeButton = page.getByRole('button', { name: 'Close' });
|
|
20
|
+
this.replaceResourceButton = page.getByRole('button', {
|
|
21
|
+
name: 'Replace resource',
|
|
22
|
+
});
|
|
23
|
+
this.cancelButton = page.getByRole('button', { name: 'Cancel' });
|
|
24
|
+
}
|
|
25
|
+
async clickSearchForConnectorTextbox() {
|
|
26
|
+
await this.searchForConnectorTextbox.click({ timeout: 60000 });
|
|
27
|
+
}
|
|
28
|
+
async fillSearchForConnectorTextbox(connectorName) {
|
|
29
|
+
await this.searchForConnectorTextbox.fill(connectorName, { timeout: 60000 });
|
|
30
|
+
}
|
|
31
|
+
async clickDownloadToProjectButton() {
|
|
32
|
+
await this.downloadToProjectButton.click({ timeout: 60000 });
|
|
33
|
+
}
|
|
34
|
+
async clickSnackbar() {
|
|
35
|
+
await this.snackbar.click({ timeout: 120000 });
|
|
36
|
+
}
|
|
37
|
+
async clickCloseButton() {
|
|
38
|
+
await this.closeButton.click({ timeout: 60000 });
|
|
39
|
+
}
|
|
40
|
+
async clickReplaceResourceButton() {
|
|
41
|
+
await this.replaceResourceButton.click({ timeout: 60000 });
|
|
42
|
+
}
|
|
43
|
+
async downloadConnectorToProject() {
|
|
44
|
+
await this.clickDownloadToProjectButton();
|
|
45
|
+
try {
|
|
46
|
+
await Promise.race([
|
|
47
|
+
this.replaceResourceButton.click({ timeout: 20000 }),
|
|
48
|
+
this.cancelButton.click({ timeout: 20000 }),
|
|
49
|
+
]);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.ConnectorMarketplacePage = ConnectorMarketplacePage;
|