@camunda/e2e-test-suite 0.0.1294 → 0.0.1295
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/AppsPage.d.ts +7 -3
- package/dist/pages/8.10/AppsPage.js +166 -49
- package/dist/pages/8.10/ClusterDetailsPage.d.ts +2 -0
- package/dist/pages/8.10/ClusterDetailsPage.js +49 -2
- package/dist/pages/8.10/ClusterSecretsPage.js +5 -1
- package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +6 -0
- package/dist/pages/8.10/ConnectorMarketplacePage.js +107 -1
- package/dist/pages/8.10/ConsoleOrganizationPage.d.ts +3 -2
- package/dist/pages/8.10/ConsoleOrganizationPage.js +64 -27
- package/dist/pages/8.10/FormJsPage.js +36 -18
- package/dist/pages/8.10/IdpCreatePage.js +6 -2
- package/dist/pages/8.10/ModelerCreatePage.d.ts +8 -0
- package/dist/pages/8.10/ModelerCreatePage.js +316 -40
- package/dist/pages/8.10/ModelerHomePage.d.ts +10 -0
- package/dist/pages/8.10/ModelerHomePage.js +165 -55
- package/dist/pages/8.10/OCIdentityClusterVariablesPage.js +3 -1
- package/dist/pages/8.10/OCIdentityHomePage.js +7 -3
- package/dist/pages/8.10/OptimizeHomePage.d.ts +0 -1
- package/dist/pages/8.10/OptimizeHomePage.js +10 -46
- package/dist/pages/8.10/PlayPage.js +9 -3
- package/dist/pages/8.10/ProcessApplicationPage.d.ts +1 -0
- package/dist/pages/8.10/ProcessApplicationPage.js +128 -6
- package/dist/pages/8.10/UtilitiesPage.js +44 -17
- package/dist/pages/8.10/WorkspaceMembersPage.d.ts +21 -0
- package/dist/pages/8.10/WorkspaceMembersPage.js +264 -0
- package/dist/resources/agentic_ai/ai-agent-chat-with-tools_gemini_vertex.bpmn +1 -1
- package/dist/tests/8.10/access-user-role-management.spec.js +142 -26
- package/dist/tests/8.10/idp-user-flows.spec.js +2 -1
- package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.js +13 -4
- package/dist/tests/8.10/smoke-tests.spec.js +9 -25
- package/dist/tests/8.10/test-setup.spec.js +57 -4
- package/dist/tests/8.10/web-modeler-user-flows.spec.js +2 -1
- package/package.json +1 -1
- package/resources/agentic_ai/ai-agent-chat-with-tools_gemini_vertex.bpmn +1 -1
|
@@ -26,13 +26,17 @@ declare class AppsPage {
|
|
|
26
26
|
readonly consoleMenuItem: Locator;
|
|
27
27
|
readonly modelerMenuItem: Locator;
|
|
28
28
|
readonly hubSidebar: Locator;
|
|
29
|
+
private hubReturnUrl?;
|
|
29
30
|
constructor(page: Page);
|
|
30
31
|
private reloadForRecovery;
|
|
31
32
|
private entryAppeared;
|
|
32
33
|
private expandHubClusterGroup;
|
|
34
|
+
private showAllWorkspaces;
|
|
33
35
|
private hubAppLink;
|
|
34
36
|
private clickHubClusterApp;
|
|
37
|
+
private assertHubClusterAppPresent;
|
|
35
38
|
clickCluster(component: Locator, name: string): Promise<void>;
|
|
39
|
+
goBackToHub(): Promise<void>;
|
|
36
40
|
clickModeler(): Promise<void>;
|
|
37
41
|
private isModelerAuthTransit;
|
|
38
42
|
openModelerWithRetry(banner: Locator, timeout?: number, maxRetries?: number, ready?: Locator, beforeReady?: () => Promise<void>): Promise<void>;
|
|
@@ -49,8 +53,8 @@ declare class AppsPage {
|
|
|
49
53
|
clickOptimize(clusterName: string): Promise<void>;
|
|
50
54
|
clickCamundaApps(maxRetries?: number): Promise<void>;
|
|
51
55
|
clickConsoleLink(): Promise<void>;
|
|
52
|
-
assertOperatePresent(shouldBeVisible?: boolean): Promise<void>;
|
|
53
|
-
assertTasklistPresent(shouldBeVisible?: boolean): Promise<void>;
|
|
54
|
-
assertOptimizePresent(shouldBeVisible?: boolean): Promise<void>;
|
|
56
|
+
assertOperatePresent(clusterName?: string, shouldBeVisible?: boolean): Promise<void>;
|
|
57
|
+
assertTasklistPresent(clusterName?: string, shouldBeVisible?: boolean): Promise<void>;
|
|
58
|
+
assertOptimizePresent(clusterName?: string, shouldBeVisible?: boolean): Promise<void>;
|
|
55
59
|
}
|
|
56
60
|
export { AppsPage };
|
|
@@ -34,6 +34,7 @@ class AppsPage {
|
|
|
34
34
|
consoleMenuItem;
|
|
35
35
|
modelerMenuItem;
|
|
36
36
|
hubSidebar;
|
|
37
|
+
hubReturnUrl;
|
|
37
38
|
constructor(page) {
|
|
38
39
|
this.page = page;
|
|
39
40
|
// Camunda Hub's persistent "Main navigation" sidebar lists each cluster
|
|
@@ -41,7 +42,14 @@ class AppsPage {
|
|
|
41
42
|
// -- there is no per-app switcher panel to open on Hub (see
|
|
42
43
|
// clickCamundaApps below). Mirrors pages/8.9/AppsPage.ts.
|
|
43
44
|
this.hubSidebar = page.getByRole('navigation', { name: 'Main navigation' });
|
|
44
|
-
|
|
45
|
+
// Hub has no "Modeler" switcher entry; Modeler is Hub's home, behind the
|
|
46
|
+
// header logo link clickModeler() uses (NavShellDs.common.tsx).
|
|
47
|
+
this.modelerLink = page
|
|
48
|
+
.getByRole('link', { name: 'Modeler', exact: true })
|
|
49
|
+
.or(page
|
|
50
|
+
.locator('header[data-slot="app-header"]')
|
|
51
|
+
.getByRole('link', { name: /^Camunda (Modeler|Hub) home$/ }))
|
|
52
|
+
.first();
|
|
45
53
|
this.appSwitcherButton = page.getByLabel('App Switcher');
|
|
46
54
|
this.tasklistLink = page.getByRole('link', { name: 'Tasklist', exact: true });
|
|
47
55
|
this.adminLink = page.getByRole('link', { name: /^(Admin|Identity)$/ });
|
|
@@ -164,9 +172,33 @@ class AppsPage {
|
|
|
164
172
|
// earlier action on the same page), and `.first()` would then silently
|
|
165
173
|
// resolve to THAT cluster's app link instead of throwing.
|
|
166
174
|
async expandHubClusterGroup(clusterName) {
|
|
175
|
+
// Anchored at the start: the row's accessible name can carry more than
|
|
176
|
+
// the bare cluster name (e.g. an environment badge), and a plain
|
|
177
|
+
// substring match also hits "UI Test Cluster", which this suite creates
|
|
178
|
+
// too and which can precede "Test Cluster" in the sidebar.
|
|
167
179
|
const toggle = this.hubSidebar
|
|
168
|
-
.getByRole('button', { name: clusterName })
|
|
180
|
+
.getByRole('button', { name: new RegExp(`^${escapeRegExp(clusterName)}`) })
|
|
169
181
|
.first();
|
|
182
|
+
// The diagram editor, where callers land after "Deploy & run", has no
|
|
183
|
+
// "Main navigation" sidebar at all, and a page freshly reached after a
|
|
184
|
+
// re-login can render the sidebar before this cluster's group. Go home
|
|
185
|
+
// through clickModeler() in both cases. Leave the rail as Hub renders it:
|
|
186
|
+
// opening a collapsed rail first makes the group click that follows miss
|
|
187
|
+
// (pages/8.9 a84128e), and collapsed, the group trigger opens its flyout.
|
|
188
|
+
const sidebarReady = (await this.hubSidebar.isVisible({ timeout: 5000 }).catch(() => false)) &&
|
|
189
|
+
(await toggle
|
|
190
|
+
.waitFor({ state: 'visible', timeout: 10000 })
|
|
191
|
+
.then(() => true)
|
|
192
|
+
.catch(() => false));
|
|
193
|
+
if (!sidebarReady) {
|
|
194
|
+
await this.clickModeler();
|
|
195
|
+
await (0, test_1.expect)(this.hubSidebar).toBeVisible({ timeout: 30000 });
|
|
196
|
+
// Hub's Workspaces overview defaults to "My workspaces" (camunda-hub
|
|
197
|
+
// #28956), where a role-flow user who is no explicit member of the
|
|
198
|
+
// shared workspace never gets this cluster's group in the sidebar.
|
|
199
|
+
await this.showAllWorkspaces(5000);
|
|
200
|
+
await (0, test_1.expect)(toggle).toBeVisible({ timeout: 30000 });
|
|
201
|
+
}
|
|
170
202
|
// Check THIS cluster's own toggle state via aria-expanded, not "is any
|
|
171
203
|
// app link with this name visible anywhere in the sidebar" -- the latter
|
|
172
204
|
// is exactly the unscoped check that let a different, already-expanded
|
|
@@ -179,56 +211,85 @@ class AppsPage {
|
|
|
179
211
|
// appear, hiding the actionable error behind an unrelated timeout.
|
|
180
212
|
await toggle.click({ timeout: 10000 });
|
|
181
213
|
}
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
// expanded chevron can be labelled via aria-label with no text content of
|
|
192
|
-
// its own, in which case hasNotText would fail to exclude the toggle we
|
|
193
|
-
// just expanded and this loop would immediately collapse it again. Match
|
|
194
|
-
// by accessible name instead, excluding any name CONTAINING clusterName
|
|
195
|
-
// -- not just one exactly equal to it, since the rendered toggle name
|
|
196
|
-
// carries more than the bare cluster name.
|
|
197
|
-
const otherExpandedToggles = this.hubSidebar.getByRole('button', {
|
|
214
|
+
// Collapse every other expanded group, so an earlier action on the same
|
|
215
|
+
// page cannot leave a second cluster's links next to this one's. Match by
|
|
216
|
+
// accessible name, excluding any name containing clusterName, since the
|
|
217
|
+
// expanded chevron can carry its name in aria-label only. The rail's own
|
|
218
|
+
// "Collapse sidebar" toggle is also an expanded button in this nav:
|
|
219
|
+
// clicking it collapses the rail and takes the inline app links with it
|
|
220
|
+
// (the 8.8 nightly after #3746), so exclude it.
|
|
221
|
+
const otherExpandedToggles = this.hubSidebar
|
|
222
|
+
.getByRole('button', {
|
|
198
223
|
expanded: true,
|
|
199
224
|
name: new RegExp(`^(?!.*${escapeRegExp(clusterName)}).+$`),
|
|
200
|
-
})
|
|
225
|
+
})
|
|
226
|
+
.and(this.page.locator(':not([data-slot="app-sidebar-collapse-toggle"])'));
|
|
201
227
|
for (let i = 0; i < 5 && (await otherExpandedToggles.count()) > 0; i++) {
|
|
202
|
-
// Let a failed collapse throw rather than swallowing it:
|
|
203
|
-
// is
|
|
204
|
-
// the wrong cluster's link below anyway -- failing at the actual cause
|
|
205
|
-
// is more useful than at that symptom.
|
|
228
|
+
// Let a failed collapse throw rather than swallowing it: failing at the
|
|
229
|
+
// actual cause is more useful than at the wrong-link symptom below.
|
|
206
230
|
await otherExpandedToggles.first().click({ timeout: 10000 });
|
|
207
231
|
}
|
|
208
232
|
}
|
|
233
|
+
// Widens Hub's Workspaces scope filter to "All workspaces". Duplicated from
|
|
234
|
+
// ModelerHomePage.showAllWorkspaces() rather than imported, as in
|
|
235
|
+
// pages/8.9: ModelerHomePage constructs page objects of its own. The
|
|
236
|
+
// control is absent for non-elevated users, where a membership-scoped list
|
|
237
|
+
// is already correct, so a missing control is a no-op.
|
|
238
|
+
async showAllWorkspaces(probeTimeout) {
|
|
239
|
+
const switchButton = this.page.getByRole('button', {
|
|
240
|
+
name: 'Switch to All workspaces',
|
|
241
|
+
});
|
|
242
|
+
const scopeFilter = this.page.getByRole('combobox', {
|
|
243
|
+
name: 'Filter workspaces',
|
|
244
|
+
});
|
|
245
|
+
const appeared = await switchButton
|
|
246
|
+
.or(scopeFilter)
|
|
247
|
+
.first()
|
|
248
|
+
.waitFor({ state: 'visible', timeout: probeTimeout })
|
|
249
|
+
.then(() => true)
|
|
250
|
+
.catch(() => false);
|
|
251
|
+
if (!appeared) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (await switchButton.isVisible().catch(() => false)) {
|
|
255
|
+
await switchButton.click({ timeout: 10000 });
|
|
256
|
+
await (0, test_1.expect)(switchButton).toBeHidden({ timeout: 10000 });
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if ((await scopeFilter.innerText()).includes('All workspaces')) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
await scopeFilter.click({ timeout: 10000 });
|
|
263
|
+
await this.page
|
|
264
|
+
.getByRole('option', { name: 'All workspaces' })
|
|
265
|
+
.click({ timeout: 10000 });
|
|
266
|
+
await (0, test_1.expect)(scopeFilter).toContainText('All workspaces', {
|
|
267
|
+
timeout: 10000,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
209
270
|
// When the sidebar is collapsed (the default on a fresh session), the
|
|
210
271
|
// group toggle opens a Radix popover -- a role="dialog" labelled with the
|
|
211
272
|
// cluster name and portalled OUTSIDE the "Main navigation" <nav> -- so a
|
|
212
273
|
// sidebar-scoped lookup finds nothing there. Look in that popover first;
|
|
213
274
|
// keep the sidebar-scoped lookup for the expanded-sidebar layout, where the
|
|
214
|
-
// links render inline.
|
|
215
|
-
//
|
|
216
|
-
//
|
|
275
|
+
// links render inline.
|
|
276
|
+
//
|
|
277
|
+
// Hub names every app link "<app> in <environment>", plus " (opens in a
|
|
278
|
+
// new tab)" when it leads to the live app (camunda-hub
|
|
279
|
+
// environment-sidebar-rows.ts). Anchor both halves: the flyout's first link
|
|
280
|
+
// is "Details of <environment>", so for "Admin Role Cluster" a bare
|
|
281
|
+
// /Admin|Identity/ picked that link, and inline it picked "Operate in Admin
|
|
282
|
+
// Role Cluster (opens in a new tab)". Anchoring also keeps "Test Cluster"
|
|
283
|
+
// from matching "UI Test Cluster".
|
|
217
284
|
hubAppLink(clusterName, appName) {
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (typeof appName === 'string') {
|
|
227
|
-
candidates.push(this.page.getByRole('link', {
|
|
228
|
-
name: new RegExp(`^${escapeRegExp(appName)} in ${escapeRegExp(clusterName)}\\b`),
|
|
229
|
-
}));
|
|
230
|
-
}
|
|
231
|
-
return candidates.reduce((acc, locator) => acc.or(locator)).first();
|
|
285
|
+
const appPattern = typeof appName === 'string' ? escapeRegExp(appName) : appName.source;
|
|
286
|
+
const cluster = escapeRegExp(clusterName);
|
|
287
|
+
const appLinkName = new RegExp(`^(?:${appPattern}) in ${cluster}(?: \\(opens in a new tab\\))?$`);
|
|
288
|
+
return this.page
|
|
289
|
+
.getByRole('dialog', { name: clusterName, exact: true })
|
|
290
|
+
.getByRole('link', { name: appLinkName })
|
|
291
|
+
.or(this.hubSidebar.getByRole('link', { name: appLinkName }))
|
|
292
|
+
.first();
|
|
232
293
|
}
|
|
233
294
|
async clickHubClusterApp(clusterName, appName) {
|
|
234
295
|
await this.expandHubClusterGroup(clusterName);
|
|
@@ -240,11 +301,28 @@ class AppsPage {
|
|
|
240
301
|
// navigation the Console app switcher gave these callers.
|
|
241
302
|
const href = await appLink.getAttribute('href');
|
|
242
303
|
if (href) {
|
|
304
|
+
this.hubReturnUrl = this.page.url();
|
|
243
305
|
await this.page.goto(new URL(href, this.page.url()).toString());
|
|
244
306
|
return;
|
|
245
307
|
}
|
|
246
308
|
await appLink.click({ timeout: 10000 });
|
|
247
309
|
}
|
|
310
|
+
// Hub's replacement for the app switcher check: a cluster's apps are the
|
|
311
|
+
// child links of its sidebar group.
|
|
312
|
+
async assertHubClusterAppPresent(clusterName, appName, shouldBeVisible) {
|
|
313
|
+
if (clusterName === undefined) {
|
|
314
|
+
throw new Error(`Hub has no app switcher: pass the cluster name to check ${appName} in its sidebar group.`);
|
|
315
|
+
}
|
|
316
|
+
const appLink = this.hubAppLink(clusterName, appName);
|
|
317
|
+
// Not expanded for an absence check: expandHubClusterGroup throws when
|
|
318
|
+
// the user cannot see the environment at all, which is a pass here.
|
|
319
|
+
if (!shouldBeVisible) {
|
|
320
|
+
await (0, test_1.expect)(appLink).toBeHidden({ timeout: 30000 });
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
await this.expandHubClusterGroup(clusterName);
|
|
324
|
+
await (0, test_1.expect)(appLink).toBeVisible({ timeout: 30000 });
|
|
325
|
+
}
|
|
248
326
|
async clickCluster(component, name) {
|
|
249
327
|
// Cluster names are not unique in an org, so this app's sub-menu can list
|
|
250
328
|
// the same name twice; pick the first entry (same row the Console cluster
|
|
@@ -255,6 +333,16 @@ class AppsPage {
|
|
|
255
333
|
await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
|
|
256
334
|
await cluster.click();
|
|
257
335
|
}
|
|
336
|
+
// Returns from an app that clickHubClusterApp opened. page.goBack() alone
|
|
337
|
+
// can stop on one of the app's own login-redirect entries, and the next
|
|
338
|
+
// Hub sidebar lookup then runs against the app instead of Hub.
|
|
339
|
+
async goBackToHub() {
|
|
340
|
+
await this.page.goBack();
|
|
341
|
+
if (this.hubReturnUrl &&
|
|
342
|
+
!new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
343
|
+
await this.page.goto(this.hubReturnUrl);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
258
346
|
async clickModeler() {
|
|
259
347
|
const maxRetries = 5;
|
|
260
348
|
const modelerErrorPage = this.page
|
|
@@ -274,6 +362,14 @@ class AppsPage {
|
|
|
274
362
|
// ModelerHomePage.clickHomeBreadcrumb -- clicking it when already on the
|
|
275
363
|
// Modeler home is a harmless in-SPA no-op. Ported from
|
|
276
364
|
// pages/8.9/AppsPage.ts.
|
|
365
|
+
//
|
|
366
|
+
// An 8.10 cluster app that clickHubClusterApp opened has no way back to
|
|
367
|
+
// Modeler: its nav V2 switcher lists only the cluster's own apps. Return
|
|
368
|
+
// to the Hub page the hop started from instead.
|
|
369
|
+
if (this.hubReturnUrl &&
|
|
370
|
+
!new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
371
|
+
await this.page.goto(this.hubReturnUrl, { waitUntil: 'domcontentloaded' });
|
|
372
|
+
}
|
|
277
373
|
if (new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
278
374
|
const header = this.page.locator('header[data-slot="app-header"]');
|
|
279
375
|
// The href stays literally "/login" until the client's auth state
|
|
@@ -604,11 +700,8 @@ class AppsPage {
|
|
|
604
700
|
}
|
|
605
701
|
async clickAdmin(clusterName) {
|
|
606
702
|
// Camunda Hub replaced the global app switcher with a per-cluster
|
|
607
|
-
// sidebar; ported from pages/8.9/AppsPage.ts.
|
|
608
|
-
//
|
|
609
|
-
// -- an anchored pattern fails the same way an exact-string match did for
|
|
610
|
-
// those apps if the rendered link's accessible name carries any extra
|
|
611
|
-
// content (icon/badge).
|
|
703
|
+
// sidebar; ported from pages/8.9/AppsPage.ts. hubAppLink anchors the
|
|
704
|
+
// alternation into the full "<app> in <environment>" link name.
|
|
612
705
|
if (new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
613
706
|
await this.clickHubClusterApp(clusterName, /Admin|Identity/);
|
|
614
707
|
return;
|
|
@@ -809,8 +902,14 @@ class AppsPage {
|
|
|
809
902
|
// app to switch into. Its header banner (homePage.consoleBanner, via
|
|
810
903
|
// hubHeader) is already visible from any Hub page, so there is no
|
|
811
904
|
// navigation action needed here -- mirrors the same hostname guard in
|
|
812
|
-
// clickModeler(). Ported from pages/8.9/AppsPage.ts.
|
|
905
|
+
// clickModeler(). Ported from pages/8.9/AppsPage.ts. The diagram editor
|
|
906
|
+
// is the exception: it has no "Main navigation" sidebar, so a caller
|
|
907
|
+
// arriving from Deploy & run would find no Clusters/Environments link.
|
|
813
908
|
if (new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
909
|
+
if (!(await this.hubSidebar.isVisible().catch(() => false))) {
|
|
910
|
+
await this.clickModeler();
|
|
911
|
+
await (0, test_1.expect)(this.hubSidebar).toBeVisible({ timeout: 30000 });
|
|
912
|
+
}
|
|
814
913
|
return;
|
|
815
914
|
}
|
|
816
915
|
const maxRetries = 3;
|
|
@@ -852,7 +951,13 @@ class AppsPage {
|
|
|
852
951
|
}
|
|
853
952
|
throw new Error(`Failed to click the console link after ${maxRetries} attempts.`);
|
|
854
953
|
}
|
|
855
|
-
|
|
954
|
+
// On Hub the cluster name scopes the lookup: there is no app switcher,
|
|
955
|
+
// only each cluster's own sidebar group.
|
|
956
|
+
async assertOperatePresent(clusterName, shouldBeVisible = true) {
|
|
957
|
+
if (new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
958
|
+
await this.assertHubClusterAppPresent(clusterName, 'Operate', shouldBeVisible);
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
856
961
|
const maxRetries = 3;
|
|
857
962
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
858
963
|
try {
|
|
@@ -881,7 +986,13 @@ class AppsPage {
|
|
|
881
986
|
}
|
|
882
987
|
throw new Error(`Failed to assert the operate link visibility after ${maxRetries} attempts.`);
|
|
883
988
|
}
|
|
884
|
-
|
|
989
|
+
// On Hub the cluster name scopes the lookup: there is no app switcher,
|
|
990
|
+
// only each cluster's own sidebar group.
|
|
991
|
+
async assertTasklistPresent(clusterName, shouldBeVisible = true) {
|
|
992
|
+
if (new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
993
|
+
await this.assertHubClusterAppPresent(clusterName, 'Tasklist', shouldBeVisible);
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
885
996
|
const maxRetries = 3;
|
|
886
997
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
887
998
|
try {
|
|
@@ -910,7 +1021,13 @@ class AppsPage {
|
|
|
910
1021
|
}
|
|
911
1022
|
throw new Error(`Failed to assert the tasklist link visibility after ${maxRetries} attempts.`);
|
|
912
1023
|
}
|
|
913
|
-
|
|
1024
|
+
// On Hub the cluster name scopes the lookup: there is no app switcher,
|
|
1025
|
+
// only each cluster's own sidebar group.
|
|
1026
|
+
async assertOptimizePresent(clusterName, shouldBeVisible = true) {
|
|
1027
|
+
if (new URL(this.page.url()).hostname.startsWith('hub.')) {
|
|
1028
|
+
await this.assertHubClusterAppPresent(clusterName, 'Optimize', shouldBeVisible);
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
914
1031
|
const maxRetries = 3;
|
|
915
1032
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
916
1033
|
try {
|
|
@@ -39,6 +39,7 @@ declare class ClusterDetailsPage {
|
|
|
39
39
|
readonly expandButton: Locator;
|
|
40
40
|
readonly rbaEnabledMessage: Locator;
|
|
41
41
|
readonly authorizationsHeading: Locator;
|
|
42
|
+
readonly authorizationsSwitch: Locator;
|
|
42
43
|
readonly orchestrationClusterCheckbox: Locator;
|
|
43
44
|
readonly clientCredentialsLink: (clientCredentials: string) => Locator;
|
|
44
45
|
readonly reviewUpdateButton: Locator;
|
|
@@ -67,6 +68,7 @@ declare class ClusterDetailsPage {
|
|
|
67
68
|
assertAPIClientScopes(name: string): Promise<void>;
|
|
68
69
|
clickSettingsTab(): Promise<void>;
|
|
69
70
|
private waitForAuthorizationsSection;
|
|
71
|
+
private setAuthorizationsViaSwitch;
|
|
70
72
|
enableAuthorizations(): Promise<void>;
|
|
71
73
|
disableAuthorizations(): Promise<void>;
|
|
72
74
|
searchAndClickClientCredentialsLink(name: string): Promise<ClientCredentialsDetailsPage>;
|
|
@@ -46,6 +46,7 @@ class ClusterDetailsPage {
|
|
|
46
46
|
expandButton;
|
|
47
47
|
rbaEnabledMessage;
|
|
48
48
|
authorizationsHeading;
|
|
49
|
+
authorizationsSwitch;
|
|
49
50
|
orchestrationClusterCheckbox;
|
|
50
51
|
clientCredentialsLink;
|
|
51
52
|
reviewUpdateButton;
|
|
@@ -160,6 +161,12 @@ class ClusterDetailsPage {
|
|
|
160
161
|
});
|
|
161
162
|
this.expandButton = page.locator('button[class="cds--table-expand__button"]');
|
|
162
163
|
this.rbaEnabledMessage = page.getByText('Authorizations enabled');
|
|
164
|
+
// Hub's design-system Settings tab: <button role="switch"
|
|
165
|
+
// aria-label="Switch Enable authorizations" aria-checked="true|false">
|
|
166
|
+
// (c4 C4Toggle). It has no Carbon `.cds--toggle__*` nodes. Same as 8.8.
|
|
167
|
+
this.authorizationsSwitch = this.page.getByRole('switch', {
|
|
168
|
+
name: /Enable authorizations/i,
|
|
169
|
+
});
|
|
163
170
|
this.authorizationsHeading = this.page.getByRole('heading', {
|
|
164
171
|
name: 'Authorizations',
|
|
165
172
|
});
|
|
@@ -341,9 +348,40 @@ class ClusterDetailsPage {
|
|
|
341
348
|
await (0, test_1.expect)(this.authorizationsHeading).toBeVisible({ timeout: 60000 });
|
|
342
349
|
}).toPass({ timeout: 300000, intervals: [1000, 2000, 5000] });
|
|
343
350
|
}
|
|
351
|
+
// Drives the design-system Authorizations switch. Returns false when this
|
|
352
|
+
// shell does not render one, so the caller falls through to the legacy
|
|
353
|
+
// Carbon toggle.
|
|
354
|
+
async setAuthorizationsViaSwitch(enabled) {
|
|
355
|
+
const hasSwitch = await this.authorizationsSwitch
|
|
356
|
+
.waitFor({ state: 'visible', timeout: 10000 })
|
|
357
|
+
.then(() => true)
|
|
358
|
+
.catch(() => false);
|
|
359
|
+
if (!hasSwitch) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
const isOn = (await this.authorizationsSwitch.getAttribute('aria-checked')) === 'true';
|
|
363
|
+
if (isOn === enabled) {
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
await this.authorizationsSwitch.click({ timeout: 30000 });
|
|
367
|
+
const confirmOpened = await this.dialog
|
|
368
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
369
|
+
.then(() => true)
|
|
370
|
+
.catch(() => false);
|
|
371
|
+
if (confirmOpened) {
|
|
372
|
+
const confirm = enabled ? this.rbaEnableButton : this.rbaDisableButton;
|
|
373
|
+
await confirm.click({ timeout: 30000 });
|
|
374
|
+
await (0, test_1.expect)(this.page.getByText(enabled ? 'Enabling...' : 'Disabling...')).not.toBeVisible({ timeout: 60000 });
|
|
375
|
+
}
|
|
376
|
+
await (0, test_1.expect)(this.authorizationsSwitch).toHaveAttribute('aria-checked', String(enabled), { timeout: 120000 });
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
344
379
|
async enableAuthorizations() {
|
|
345
380
|
await (0, sleep_1.sleep)(5000);
|
|
346
381
|
await this.waitForAuthorizationsSection();
|
|
382
|
+
if (await this.setAuthorizationsViaSwitch(true)) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
347
385
|
// Locate all elements with class .cds--toggle__text
|
|
348
386
|
const toggleTextElements = await this.page.$$('.cds--toggle__text');
|
|
349
387
|
// Check if toggleTextElements has at least 2 elements
|
|
@@ -375,11 +413,18 @@ class ClusterDetailsPage {
|
|
|
375
413
|
}
|
|
376
414
|
}
|
|
377
415
|
else {
|
|
378
|
-
console.log
|
|
416
|
+
// Was a console.log that returned as though authorizations had been
|
|
417
|
+
// enabled; under Hub this branch ran every time (8.8 fix 7d771aa).
|
|
418
|
+
throw new Error('Could not enable authorizations: the Settings tab rendered neither ' +
|
|
419
|
+
'the design-system "Enable authorizations" switch nor a Carbon ' +
|
|
420
|
+
'toggle pair.');
|
|
379
421
|
}
|
|
380
422
|
}
|
|
381
423
|
async disableAuthorizations() {
|
|
382
424
|
await this.waitForAuthorizationsSection();
|
|
425
|
+
if (await this.setAuthorizationsViaSwitch(false)) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
383
428
|
// Locate all elements with class .cds--toggle__text
|
|
384
429
|
const toggleTextElements = await this.page.$$('.cds--toggle__text');
|
|
385
430
|
// Check if toggleTextElements has at least 2 elements
|
|
@@ -405,7 +450,9 @@ class ClusterDetailsPage {
|
|
|
405
450
|
}
|
|
406
451
|
}
|
|
407
452
|
else {
|
|
408
|
-
|
|
453
|
+
throw new Error('Could not disable authorizations: the Settings tab rendered neither ' +
|
|
454
|
+
'the design-system "Enable authorizations" switch nor a Carbon ' +
|
|
455
|
+
'toggle pair.');
|
|
409
456
|
}
|
|
410
457
|
}
|
|
411
458
|
async searchAndClickClientCredentialsLink(name) {
|
|
@@ -391,7 +391,11 @@ class ClusterSecretsPage {
|
|
|
391
391
|
timeout: 60000,
|
|
392
392
|
});
|
|
393
393
|
await this.page.reload();
|
|
394
|
-
|
|
394
|
+
// Hub keeps the selected cluster tab out of the URL, so the reload lands
|
|
395
|
+
// on Overview, where assertSecretsOrCreate finds no search box and tries
|
|
396
|
+
// to create every secret. Re-select the tab, as pages/8.8 does (45eae7b).
|
|
397
|
+
await this.clusterSecretTab.first().click({ timeout: 60000 });
|
|
398
|
+
await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({ timeout: 60000 });
|
|
395
399
|
}
|
|
396
400
|
}
|
|
397
401
|
exports.ClusterSecretsPage = ClusterSecretsPage;
|
|
@@ -10,6 +10,10 @@ declare class ConnectorMarketplacePage {
|
|
|
10
10
|
readonly saveAsCopyButton: Locator;
|
|
11
11
|
readonly cancelButton: Locator;
|
|
12
12
|
readonly dialogTitle: Locator;
|
|
13
|
+
readonly browseAllDialog: Locator;
|
|
14
|
+
readonly browseAllMarketplaceDetailsButton: Locator;
|
|
15
|
+
readonly browseAllAddButton: Locator;
|
|
16
|
+
readonly importModal: Locator;
|
|
13
17
|
constructor(page: Page);
|
|
14
18
|
clickSearchForConnectorTextbox(): Promise<void>;
|
|
15
19
|
fillSearchForConnectorTextbox(connectorName: string): Promise<void>;
|
|
@@ -18,7 +22,9 @@ declare class ConnectorMarketplacePage {
|
|
|
18
22
|
clickCloseButton(): Promise<void>;
|
|
19
23
|
clickReplaceResourceButton(): Promise<void>;
|
|
20
24
|
downloadConnectorToProject(): Promise<boolean>;
|
|
25
|
+
private addConnectorFromBrowseAll;
|
|
21
26
|
private closeMarketplaceDialog;
|
|
27
|
+
private closeBrowseAllDialog;
|
|
22
28
|
searchAndDownloadConnector(connectorName: string): Promise<boolean>;
|
|
23
29
|
}
|
|
24
30
|
export { ConnectorMarketplacePage };
|
|
@@ -1,6 +1,7 @@
|
|
|
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
5
|
class ConnectorMarketplacePage {
|
|
5
6
|
page;
|
|
6
7
|
searchForConnectorTextbox;
|
|
@@ -12,13 +13,40 @@ class ConnectorMarketplacePage {
|
|
|
12
13
|
saveAsCopyButton;
|
|
13
14
|
cancelButton;
|
|
14
15
|
dialogTitle;
|
|
16
|
+
browseAllDialog;
|
|
17
|
+
browseAllMarketplaceDetailsButton;
|
|
18
|
+
browseAllAddButton;
|
|
19
|
+
importModal;
|
|
15
20
|
constructor(page) {
|
|
16
21
|
this.page = page;
|
|
17
22
|
// Title of the marketplace dialog itself — present both while the listing
|
|
18
23
|
// renders and while it is stuck on its loading spinner, so it is the one
|
|
19
24
|
// reliable marker of "the dialog is still up".
|
|
20
25
|
this.dialogTitle = page.getByText('Browse Marketplace connectors');
|
|
21
|
-
|
|
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$/ })
|
|
44
|
+
.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"]');
|
|
22
50
|
this.downloadToProjectButton = page
|
|
23
51
|
.getByRole('button', { name: 'Download to project' })
|
|
24
52
|
.first();
|
|
@@ -52,6 +80,17 @@ class ConnectorMarketplacePage {
|
|
|
52
80
|
await this.replaceResourceButton.click({ timeout: 60000 });
|
|
53
81
|
}
|
|
54
82
|
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;
|
|
93
|
+
}
|
|
55
94
|
await this.clickDownloadToProjectButton();
|
|
56
95
|
// After clicking "Download to project", Hub fetches the connector detail
|
|
57
96
|
// and opens an ImportModal whose primary button depends on project state:
|
|
@@ -87,7 +126,51 @@ class ConnectorMarketplacePage {
|
|
|
87
126
|
await this.closeMarketplaceDialog();
|
|
88
127
|
return imported;
|
|
89
128
|
}
|
|
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
|
+
}
|
|
90
159
|
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
|
+
// Only click "Close" while the marketplace is up: a bare "Close" button
|
|
169
|
+
// otherwise matches the properties panel's own close (x) and collapses it,
|
|
170
|
+
// hiding the connector's "Input" tab the caller needs next.
|
|
171
|
+
if (!(await this.dialogTitle.isVisible().catch(() => false))) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
91
174
|
if (await this.closeButton.isVisible({ timeout: 5000 }).catch(() => false)) {
|
|
92
175
|
await this.closeButton.click({ timeout: 10000 });
|
|
93
176
|
}
|
|
@@ -102,6 +185,29 @@ class ConnectorMarketplacePage {
|
|
|
102
185
|
await this.page.keyboard.press('Escape');
|
|
103
186
|
await this.dialogTitle.waitFor({ state: 'hidden', timeout: 30000 });
|
|
104
187
|
}
|
|
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
|
+
}
|
|
105
211
|
async searchAndDownloadConnector(connectorName) {
|
|
106
212
|
await this.clickSearchForConnectorTextbox();
|
|
107
213
|
await this.fillSearchForConnectorTextbox(connectorName);
|
|
@@ -45,8 +45,9 @@ declare class ConsoleOrganizationPage {
|
|
|
45
45
|
selectAnalystRole(username: string): Promise<void>;
|
|
46
46
|
selectModelerRole(username: string): Promise<void>;
|
|
47
47
|
selectAdminRole(username: string): Promise<void>;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
private userOptionsButton;
|
|
49
|
+
clickOptionsButton(username: string): Promise<void>;
|
|
50
|
+
clickEditUserMenuItem(username: string): Promise<void>;
|
|
50
51
|
checkModelerCheckbox(): Promise<void>;
|
|
51
52
|
checkAdminCheckbox(): Promise<void>;
|
|
52
53
|
checkAnalystCheckbox(): Promise<void>;
|