@camunda/e2e-test-suite 0.0.1354 → 0.0.1356
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.
|
@@ -151,52 +151,90 @@ class ClusterPage {
|
|
|
151
151
|
timeout: 120000,
|
|
152
152
|
});
|
|
153
153
|
await (0, test_1.expect)(this.createNewClusterButton).toBeVisible({ timeout: 60000 });
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
// Hub's clusters data table renders skeleton rows (no links) while it
|
|
155
|
+
// fetches, and the "Create new cluster" button is visible before the data
|
|
156
|
+
// arrives. Counting matching rows at that point always returned 0, so the
|
|
157
|
+
// pre-clean was skipped and every run left one more same-named cluster
|
|
158
|
+
// behind until the org ran out of G3-Dev reservations (the type tile then
|
|
159
|
+
// renders disabled). Wait for the first loaded row before counting.
|
|
160
|
+
await this.clustersList
|
|
161
|
+
.getByRole('link')
|
|
162
|
+
.first()
|
|
163
|
+
.waitFor({ timeout: 30000 })
|
|
164
|
+
.catch(() => false);
|
|
165
|
+
// Rows whose deletion is already in progress keep the name until the
|
|
166
|
+
// backend removes them; exclude them so the loop does not revisit them.
|
|
167
|
+
const deletableRows = () => this.clustersList
|
|
168
|
+
.filter({
|
|
169
|
+
has: this.page.getByRole('link', { name, exact: true }),
|
|
170
|
+
})
|
|
171
|
+
.filter({ hasNotText: /Deleting/ });
|
|
172
|
+
if ((await deletableRows().count()) <= 0) {
|
|
156
173
|
console.log(`No clusters found with name ${name}, skipping deletion.`);
|
|
157
174
|
return;
|
|
158
175
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
// Legacy Console rendered a per-row "Delete" button; Hub's design-system
|
|
177
|
+
// data table instead puts it in the row's "Row actions" kebab menu.
|
|
178
|
+
const deleteMenuItem = this.page.getByRole('menuitem', { name: /^Delete/ });
|
|
179
|
+
const confirmInput = this.confirmDeleteInput.or(this.dialog.getByRole('textbox'));
|
|
180
|
+
const maxDeletions = 50;
|
|
181
|
+
for (let i = 0; i < maxDeletions; i++) {
|
|
182
|
+
if ((await deletableRows().count()) <= 0)
|
|
183
|
+
break;
|
|
184
|
+
const row = deletableRows().first();
|
|
185
|
+
const rowAction = row
|
|
186
|
+
.getByRole('button', { name: 'Delete' })
|
|
187
|
+
.or(row.getByRole('button', { name: 'Row actions', exact: true }));
|
|
169
188
|
try {
|
|
170
|
-
await (0, test_1.expect)(
|
|
189
|
+
await (0, test_1.expect)(rowAction).toBeVisible({ timeout: 10000 });
|
|
171
190
|
}
|
|
172
191
|
catch {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
192
|
+
// A cluster in a transient state (e.g. just created by a concurrent
|
|
193
|
+
// setup worker) may have its row present before the action renders.
|
|
194
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
195
|
+
await this.clustersList.getByRole('link').first().waitFor({
|
|
196
|
+
timeout: 30000,
|
|
176
197
|
});
|
|
177
198
|
continue;
|
|
178
199
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
200
|
+
// Rows share the cluster name, so remember this row's unique link (it
|
|
201
|
+
// carries the cluster id) to recognise when this cluster is gone.
|
|
202
|
+
const clusterHref = await row
|
|
203
|
+
.getByRole('link', { name, exact: true })
|
|
204
|
+
.getAttribute('href');
|
|
205
|
+
await rowAction.click({ timeout: 60000 });
|
|
206
|
+
if (await deleteMenuItem.isVisible({ timeout: 5000 }).catch(() => false)) {
|
|
207
|
+
await deleteMenuItem.click({ timeout: 30000 });
|
|
186
208
|
}
|
|
187
209
|
await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 60000 });
|
|
188
|
-
await (0, test_1.expect)(
|
|
189
|
-
await
|
|
190
|
-
await this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
210
|
+
await (0, test_1.expect)(confirmInput.first()).toBeVisible({ timeout: 60000 });
|
|
211
|
+
await confirmInput.first().fill('DELETE', { timeout: 60000 });
|
|
212
|
+
await this.dangerDeleteButton.last().click({ timeout: 60000 });
|
|
213
|
+
// When a concurrent worker already deleted this same cluster, the modal
|
|
214
|
+
// stays open with "We're having trouble deleting the cluster". Close it;
|
|
215
|
+
// the row check below still fails if the cluster was not removed.
|
|
216
|
+
const deleteError = this.dialog.getByText("We're having trouble deleting the cluster");
|
|
217
|
+
// The alert only renders once the delete request fails, so wait for the
|
|
218
|
+
// modal to either close or show it rather than probing once.
|
|
219
|
+
await (0, test_1.expect)(async () => {
|
|
220
|
+
const closed = !(await this.dialog.isVisible());
|
|
221
|
+
(0, test_1.expect)(closed || (await deleteError.isVisible())).toBe(true);
|
|
222
|
+
}).toPass({ timeout: 60000 });
|
|
223
|
+
if (await deleteError.isVisible()) {
|
|
224
|
+
await this.dialog.getByRole('button', { name: 'Cancel' }).click();
|
|
225
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
226
|
+
await this.clustersList.getByRole('link').first().waitFor({
|
|
227
|
+
timeout: 120000,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
195
230
|
await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 60000 });
|
|
196
|
-
//
|
|
197
|
-
|
|
231
|
+
// Wait until the deleted row is gone or flagged as deleting. The table
|
|
232
|
+
// is paginated, so the row count alone does not drop: the next page's
|
|
233
|
+
// rows slide in to fill the gap.
|
|
234
|
+
await (0, test_1.expect)(this.clustersList
|
|
235
|
+
.filter({ has: this.page.locator(`a[href="${clusterHref}"]`) })
|
|
236
|
+
.filter({ hasNotText: /Deleting/ })).toHaveCount(0, { timeout: 60000 });
|
|
198
237
|
}
|
|
199
|
-
await this.page.waitForTimeout(500);
|
|
200
238
|
}
|
|
201
239
|
async clickClusterTab() {
|
|
202
240
|
await Promise.race([
|
|
@@ -290,6 +328,8 @@ class ClusterPage {
|
|
|
290
328
|
async clickClusterType() {
|
|
291
329
|
if (process.env.IS_PROD !== 'true') {
|
|
292
330
|
await (0, test_1.expect)(this.g3DevClusterType).toBeVisible({ timeout: 60000 });
|
|
331
|
+
// The tile is disabled while the org has no free reservation for it.
|
|
332
|
+
await (0, test_1.expect)(this.g3DevClusterType).toBeEnabled({ timeout: 60000 });
|
|
293
333
|
await this.g3DevClusterType.click();
|
|
294
334
|
}
|
|
295
335
|
}
|
|
@@ -4,7 +4,6 @@ const _setup_1 = require("../../test-setup.js");
|
|
|
4
4
|
const SM_8_10_1 = require("../../fixtures/SM-8.10");
|
|
5
5
|
const test_1 = require("@playwright/test");
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
|
-
const env_1 = require("../../utils/env");
|
|
8
7
|
const UtilitiesPage_1 = require("../../pages/SM-8.10/UtilitiesPage");
|
|
9
8
|
if (process.env.IS_MIGRATION === 'true') {
|
|
10
9
|
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
@@ -60,12 +59,13 @@ if (process.env.IS_MIGRATION === 'true') {
|
|
|
60
59
|
});
|
|
61
60
|
// The Optimize assertion is the only part of the migration flow the bug
|
|
62
61
|
// breaks: Operate and Tasklist keep the pre-upgrade instance, while the
|
|
63
|
-
// report the 8.9 smoke test saved is gone after the upgrade.
|
|
64
|
-
//
|
|
65
|
-
//
|
|
62
|
+
// report the 8.9 smoke test saved is gone after the upgrade. Only the
|
|
63
|
+
// Elasticsearch + multi-tenancy upgrade path still loses it; OpenSearch
|
|
64
|
+
// keeps it since camunda/camunda-platform-helm#7461 migrates the Keycloak
|
|
65
|
+
// realm, so the user keeps the id that owns the report.
|
|
66
66
|
// Skipped due to bug #56406: https://github.com/camunda/camunda/issues/56406
|
|
67
67
|
(0, SM_8_10_1.test)('Assert Most Common Flow User Flow Report Migration In Optimize', async ({ page, navigationPage, optimizeHomePage, optimizeCollectionsPage, optimizeReportPage, }) => {
|
|
68
|
-
if (
|
|
68
|
+
if (process.env.IS_MT === 'true') {
|
|
69
69
|
SM_8_10_1.test.skip(true, 'Skipped due to bug #56406: https://github.com/camunda/camunda/issues/56406');
|
|
70
70
|
}
|
|
71
71
|
SM_8_10_1.test.slow();
|