@camunda/e2e-test-suite 0.0.1251 → 0.0.1252
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.
|
@@ -93,18 +93,21 @@ class AppsPage {
|
|
|
93
93
|
// look up the app link sidebar-wide rather than scoped to a "group"
|
|
94
94
|
// container that doesn't reliably exist.
|
|
95
95
|
async clickHubClusterApp(clusterName, appName) {
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
// carries
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
// When the sidebar is collapsed (the default on a fresh session), the
|
|
97
|
+
// group toggle opens a Radix popover -- a role="dialog" labelled with the
|
|
98
|
+
// cluster name and portalled OUTSIDE the "Main navigation" <nav> -- so a
|
|
99
|
+
// sidebar-scoped lookup finds nothing there (nightly trace: the toggle
|
|
100
|
+
// flips to aria-expanded="true" and the popover renders "Operate in Test
|
|
101
|
+
// Cluster (opens in a new tab)" et al., yet the nav-scoped link never
|
|
102
|
+
// resolves). Look in that popover first; keep the sidebar-scoped lookup
|
|
103
|
+
// for the expanded-sidebar layout, where the links render inline.
|
|
104
|
+
// Not exact: the rendered accessible name carries more than the bare app
|
|
105
|
+
// name (e.g. "Operate in <cluster> (opens in a new tab)").
|
|
106
|
+
const appLink = this.page
|
|
107
|
+
.getByRole('dialog', { name: clusterName, exact: true })
|
|
108
|
+
.getByRole('link', { name: appName })
|
|
109
|
+
.or(this.hubSidebar.getByRole('link', { name: appName }))
|
|
110
|
+
.first();
|
|
108
111
|
// Decide whether to expand from clusterName's OWN toggle state, not from
|
|
109
112
|
// whether "some" appLink is already visible sidebar-wide: in a
|
|
110
113
|
// multi-cluster org another cluster's group can already be expanded with
|
|
@@ -123,6 +126,15 @@ class AppsPage {
|
|
|
123
126
|
await collapsedToggle.click({ timeout: 10000 });
|
|
124
127
|
}
|
|
125
128
|
await (0, test_1.expect)(appLink).toBeVisible({ timeout: 30000 });
|
|
129
|
+
// Hub's cluster-app links carry target="_blank", so clicking them opens
|
|
130
|
+
// the app in a new tab while every caller keeps asserting on this.page.
|
|
131
|
+
// Follow the href in the current tab instead, matching the same-tab
|
|
132
|
+
// navigation the Console app switcher gave these callers.
|
|
133
|
+
const href = await appLink.getAttribute('href');
|
|
134
|
+
if (href) {
|
|
135
|
+
await this.page.goto(new URL(href, this.page.url()).toString());
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
126
138
|
await appLink.click({ timeout: 10000 });
|
|
127
139
|
}
|
|
128
140
|
async clickModeler() {
|
|
@@ -174,7 +174,14 @@ class ClusterDetailsPage {
|
|
|
174
174
|
this.orchestrationClusterCheckbox = page
|
|
175
175
|
.locator('label')
|
|
176
176
|
.filter({ hasText: /^Orchestration Cluster API$/ });
|
|
177
|
-
|
|
177
|
+
// Camunda Hub's data table renders the client name as a link-styled
|
|
178
|
+
// <button data-slot="button"> rather than an <a>. The cell also holds a
|
|
179
|
+
// pointer-events-none row-overlay button with the same accessible name,
|
|
180
|
+
// so match the visible one by its data-slot.
|
|
181
|
+
this.clientCredentialsLink = (clientCredentials) => page
|
|
182
|
+
.getByRole('cell', { name: clientCredentials })
|
|
183
|
+
.locator('a, button[data-slot="button"]')
|
|
184
|
+
.first();
|
|
178
185
|
this.clientRow = (name) => this.clientsList.filter({ hasText: name });
|
|
179
186
|
this.clientRowDeleteButton = (name) => this.clientRow(name).getByRole('button', { name: 'Delete' });
|
|
180
187
|
this.mcpSupportToggle = page.getByRole('switch', {
|
|
@@ -76,33 +76,32 @@ class ClusterPage {
|
|
|
76
76
|
this.connectorSecretsTab = page.getByRole('tab', {
|
|
77
77
|
name: 'Connector Secrets',
|
|
78
78
|
});
|
|
79
|
-
|
|
79
|
+
// Camunda Hub's create-cluster form replaced the Carbon tiles (a
|
|
80
|
+
// <label> per option) and tabs with design-system choice cards and toggle
|
|
81
|
+
// groups, all exposed as role="radio" named by their title. Each locator
|
|
82
|
+
// below accepts either shape via this helper.
|
|
83
|
+
const choice = (legacy, name) => legacy.or(page.getByRole('radio', { name, exact: true }));
|
|
84
|
+
this.belgiumRegion = choice(page.locator('label').filter({
|
|
80
85
|
hasText: 'Chaos, Belgium, Europe (europe-west1)',
|
|
81
|
-
});
|
|
82
|
-
this.londonRegion = page.locator('label').filter({
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
this.ohioRegion = page.locator('label').filter({
|
|
86
|
+
}), 'Chaos, Belgium, Europe (europe-west1)');
|
|
87
|
+
this.londonRegion = choice(page.locator('label').filter({ hasText: 'London, Europe (europe-west2)' }), 'London, Europe (europe-west2)');
|
|
88
|
+
this.ohioRegion = choice(page.locator('label').filter({
|
|
86
89
|
hasText: 'Ohio, North America (us-east-2)',
|
|
87
|
-
});
|
|
88
|
-
this.finlandRegion = page.locator('label').filter({
|
|
90
|
+
}), 'Ohio, North America (us-east-2)');
|
|
91
|
+
this.finlandRegion = choice(page.locator('label').filter({
|
|
89
92
|
hasText: 'Finland, Europe (europe-north1)',
|
|
90
|
-
});
|
|
93
|
+
}), 'Finland, Europe (europe-north1)');
|
|
91
94
|
this.createAClusterButton = page.getByRole('button', {
|
|
92
95
|
name: 'Create a Cluster',
|
|
93
96
|
});
|
|
94
97
|
this.clusterVersionOption = page.getByText(`${process.env.CLUSTER_VERSION}`, { exact: true });
|
|
95
98
|
this.generationSearchInput = page.getByPlaceholder('Search generations');
|
|
96
|
-
this.g3DevClusterType = page.locator('label').filter({
|
|
97
|
-
|
|
98
|
-
});
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.qaGenerationsTab = page.getByRole('tab', { name: 'QA Generations' });
|
|
103
|
-
this.gcpRegion = page.getByRole('tab', {
|
|
104
|
-
name: 'GCP',
|
|
105
|
-
});
|
|
99
|
+
this.g3DevClusterType = choice(page.locator('label').filter({ hasText: this.defaultClusterType }), this.defaultClusterType);
|
|
100
|
+
this.alphaTab = choice(page.getByRole('tab', { name: 'Alpha' }), 'Alpha');
|
|
101
|
+
this.devTab = choice(page.getByRole('tab', { name: 'Internal Dev' }), 'Internal Dev');
|
|
102
|
+
this.stableTab = choice(page.getByRole('tab', { name: 'Stable' }), 'Stable');
|
|
103
|
+
this.qaGenerationsTab = choice(page.getByRole('tab', { name: 'QA Generations' }), 'QA Generations');
|
|
104
|
+
this.gcpRegion = choice(page.getByRole('tab', { name: 'GCP' }), 'GCP');
|
|
106
105
|
this.clustersList = page
|
|
107
106
|
.getByRole('row')
|
|
108
107
|
.filter({ hasNotText: 'Generation' }); //Filter out header row
|
|
@@ -261,7 +260,10 @@ class ClusterPage {
|
|
|
261
260
|
await this.clickClusterNameInput();
|
|
262
261
|
await this.fillClusterNameInput(name);
|
|
263
262
|
await this.clickClusterType();
|
|
264
|
-
await this.page
|
|
263
|
+
await this.page
|
|
264
|
+
.getByRole('tab', { name: region })
|
|
265
|
+
.or(this.page.getByRole('radio', { name: region, exact: true }))
|
|
266
|
+
.click();
|
|
265
267
|
await this.selectSubRegion(region);
|
|
266
268
|
await this.clickClusterOption();
|
|
267
269
|
await this.determineTasklistAPI(tasklistV1Api);
|
|
@@ -52,10 +52,15 @@ class HomePage {
|
|
|
52
52
|
});
|
|
53
53
|
this.camundaAppsButton = page.getByLabel('Camunda apps');
|
|
54
54
|
this.appSwitcher = page.getByLabel('App Switcher');
|
|
55
|
+
// Specs assert this as "the authenticated app shell has rendered" before
|
|
56
|
+
// navigating. Camunda Hub has no app-switcher button at all (apps are
|
|
57
|
+
// reached from the sidebar -- see AppsPage.clickCamundaApps), so on Hub
|
|
58
|
+
// its authenticated header is the equivalent readiness signal.
|
|
55
59
|
this.camundaComponentsButton = page
|
|
56
60
|
.getByLabel('Camunda components')
|
|
57
61
|
.or(this.camundaAppsButton)
|
|
58
|
-
.or(this.appSwitcher)
|
|
62
|
+
.or(this.appSwitcher)
|
|
63
|
+
.or(this.hubHeader);
|
|
59
64
|
this.openOrganizationButton = page.getByLabel('Open Organizations');
|
|
60
65
|
// "Camunda logo Console" was the old Carbon header's logo link. Camunda
|
|
61
66
|
// Hub has no equivalent link -- its post-login landing is `hubHeader`
|
|
@@ -48,32 +48,52 @@ class ProcessApplicationPage {
|
|
|
48
48
|
// .first() defensively only: hub renders exactly one of these today, in the
|
|
49
49
|
// workspace-root empty state. A future second placement should not turn
|
|
50
50
|
// every PA-creating test into a strict-mode violation.
|
|
51
|
+
// Camunda Hub renamed the process application to a "project", created from
|
|
52
|
+
// the workspace's "Create project" split button + dialog (camunda-hub
|
|
53
|
+
// CreateSplitButton / CreateProjectModal) -- the same surface
|
|
54
|
+
// pages/SM-8.10/ProcessApplicationPage.ts already handles. exact: the split
|
|
55
|
+
// button's chevron is labelled "Create project options".
|
|
51
56
|
this.createProcessApplicationButton = page
|
|
52
|
-
.getByRole('button', { name: 'Create
|
|
57
|
+
.getByRole('button', { name: 'Create project', exact: true })
|
|
58
|
+
.or(page.getByRole('button', { name: 'Create process application' }))
|
|
53
59
|
.first();
|
|
54
60
|
this.createProcessApplicationOption = page.locator('[data-test="create-process-application"]');
|
|
55
|
-
this.creationDialog = page
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
this.creationDialog = page
|
|
62
|
+
.getByRole('dialog')
|
|
63
|
+
.filter({ has: page.getByLabel('Project name') })
|
|
64
|
+
.or(page.getByRole('dialog', { name: 'Create a process application' }))
|
|
65
|
+
.first();
|
|
58
66
|
// Deliberately scoped to the dialog: ModelerCreatePage owns an unscoped
|
|
59
67
|
// getByLabel('Name', {exact: true}) for the properties panel, which would
|
|
60
68
|
// resolve to two elements while the creation modal is open.
|
|
61
|
-
this.nameInput = this.creationDialog
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
this.nameInput = this.creationDialog
|
|
70
|
+
.getByLabel('Project name')
|
|
71
|
+
.or(this.creationDialog.getByLabel('Name', { exact: true }))
|
|
72
|
+
.first();
|
|
73
|
+
this.submitButton = this.creationDialog
|
|
74
|
+
.getByRole('button', { name: 'Create project', exact: true })
|
|
75
|
+
.or(this.creationDialog.getByRole('button', { name: 'Create', exact: true }))
|
|
76
|
+
.first();
|
|
66
77
|
this.cancelButton = this.creationDialog.getByRole('button', {
|
|
67
78
|
name: 'Cancel',
|
|
68
79
|
exact: true,
|
|
69
80
|
});
|
|
70
|
-
|
|
81
|
+
// The Hub project detail renders a title-bar hook instead of the
|
|
82
|
+
// process-application breadcrumb menu; either proves we are inside.
|
|
83
|
+
this.breadcrumb = page
|
|
84
|
+
.locator('[data-test="breadcrumb-process-application-menu"]')
|
|
85
|
+
.or(page.locator('[data-test="process-application-title-bar"]'))
|
|
86
|
+
.first();
|
|
71
87
|
this.folderExplorer = page.getByRole('region', { name: 'Folder explorer' });
|
|
72
88
|
// The process application page renders more than one diagram-dropdown
|
|
73
89
|
// (hub's own unit tests reach for it with getAllByTestId), so the dropdown
|
|
74
90
|
// has to be resolved inside the folder explorer rather than page-wide.
|
|
91
|
+
// The Hub project detail has no "Folder explorer" region and renders its
|
|
92
|
+
// "Create new" menu as [data-test="create-action-dropdown"] (camunda-hub
|
|
93
|
+
// CreateActionDs), so accept that page-wide as well.
|
|
75
94
|
this.createNewDropdown = this.folderExplorer
|
|
76
95
|
.locator('[data-test="diagram-dropdown"]')
|
|
96
|
+
.or(page.locator('[data-test="create-action-dropdown"]'))
|
|
77
97
|
.first();
|
|
78
98
|
this.inlineNameInput = page.locator('[data-test="editable-input"]');
|
|
79
99
|
this.defineStagesDialog = page
|