@camunda/e2e-test-suite 0.0.1604 → 0.0.1605
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.
|
@@ -252,4 +252,94 @@ _8_10_1.test.describe('Console cluster duplication', () => {
|
|
|
252
252
|
await clusterDetailsPage.assertComponentsHealth(undefined, (0, UtilitiesPage_1.consoleSessionRecovery)(page, page.url()));
|
|
253
253
|
});
|
|
254
254
|
});
|
|
255
|
+
// DUP-05. The epic's claim for this slice is a claim about the form: the
|
|
256
|
+
// admin learns *before submitting* that the process data of the source does
|
|
257
|
+
// not come across and the duplicate starts empty. So the assertion is the
|
|
258
|
+
// pre-submit disclosure on the duplication form, plus - per the suite's
|
|
259
|
+
// completion rule - that the duplicate this form really creates comes up
|
|
260
|
+
// healthy. Reading the duplicate's process data back out of Operate is not
|
|
261
|
+
// asserted here: it would need a seeded deployment on the source, and the
|
|
262
|
+
// only resource for that (a Modeler project) has no teardown in this suite,
|
|
263
|
+
// which the isolation rules forbid leaking.
|
|
264
|
+
(0, _8_10_1.test)('DUP-05: the duplication form states the cluster data does not carry over, and the duplicate it creates is healthy', async ({ page, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }) => {
|
|
265
|
+
// Two cluster creations plus health polling - this case is long by nature.
|
|
266
|
+
_8_10_1.test.setTimeout(60 * 60 * 1000);
|
|
267
|
+
const randomSuffix = await (0, _setup_1.generateRandomStringAsync)(6);
|
|
268
|
+
const sourceClusterName = `dup-src-data-${randomSuffix}`;
|
|
269
|
+
const duplicateClusterName = `dup-data-${randomSuffix}`;
|
|
270
|
+
await _8_10_1.test.step('given a healthy source cluster with settings populated', async () => {
|
|
271
|
+
await clusterPage.clickClusterTab();
|
|
272
|
+
createdClusterNames.push(sourceClusterName);
|
|
273
|
+
await clusterPage.createCluster(sourceClusterName);
|
|
274
|
+
await clusterPage.assertClusterHealthyStatusWithRetry(sourceClusterName, undefined, undefined, (0, UtilitiesPage_1.consoleSessionRecovery)(page, page.url()));
|
|
275
|
+
// A populated source: against an empty one the duplication form has
|
|
276
|
+
// nothing to say anything about, and the case would pass vacuously.
|
|
277
|
+
await clusterSecretsPage.createNewSecret(`DUP_SECRET_${randomSuffix}`, `dup-secret-value-${randomSuffix}`, sourceClusterName);
|
|
278
|
+
});
|
|
279
|
+
await _8_10_1.test.step('when I select Duplicate on that cluster', async () => {
|
|
280
|
+
await homePage.clickClusters();
|
|
281
|
+
await clusterPage.clickClusterLink(sourceClusterName);
|
|
282
|
+
await clusterDetailsPage.dismissOopsIfPresent();
|
|
283
|
+
await (0, UtilitiesPage_1.waitForLoadingToFinish)(page);
|
|
284
|
+
await page.getByRole('button', { name: 'cluster operations' }).click();
|
|
285
|
+
const duplicateAction = page
|
|
286
|
+
.getByRole('menuitem', { name: /duplicate/i })
|
|
287
|
+
.or(page.getByRole('button', { name: /duplicate/i }));
|
|
288
|
+
await (0, test_1.expect)(duplicateAction).toBeVisible({ timeout: 30000 });
|
|
289
|
+
await duplicateAction.click();
|
|
290
|
+
});
|
|
291
|
+
await _8_10_1.test.step('then the form tells me, before I submit, that the data of the cluster does not carry over', async () => {
|
|
292
|
+
// Scoped to the duplication form itself rather than the whole document,
|
|
293
|
+
// so an unrelated banner elsewhere on the Hub page cannot satisfy this.
|
|
294
|
+
const duplicationForm = page.getByRole('main');
|
|
295
|
+
// The wording is product copy and has already been reworded once, so the
|
|
296
|
+
// locator matches the claim ("data ... is not copied / does not carry
|
|
297
|
+
// over" / "starts empty") rather than one exact sentence.
|
|
298
|
+
const dataNotCarriedOverNotice = duplicationForm
|
|
299
|
+
.getByText(/data[^.]*(is not|are not|will not be|does not|won't be)[^.]*(copied|carried over|transferred|duplicated)/i)
|
|
300
|
+
.or(duplicationForm.getByText(/(duplicate|new cluster)[^.]*(starts|will start|will be)[^.]*empty/i));
|
|
301
|
+
await (0, test_1.expect)(dataNotCarriedOverNotice.first()).toBeVisible({
|
|
302
|
+
timeout: 30000,
|
|
303
|
+
});
|
|
304
|
+
// "Before I submit": the form is still unsubmitted at this point, which
|
|
305
|
+
// is what the submit button still being on the page shows.
|
|
306
|
+
const submitDuplicate = page.getByRole('button', {
|
|
307
|
+
name: 'Duplicate cluster',
|
|
308
|
+
exact: true,
|
|
309
|
+
});
|
|
310
|
+
await (0, test_1.expect)(submitDuplicate).toBeVisible({ timeout: 30000 });
|
|
311
|
+
});
|
|
312
|
+
await _8_10_1.test.step('and submitting that form creates a duplicate that reaches a healthy running state', async () => {
|
|
313
|
+
await clusterPage.clickClusterNameInput();
|
|
314
|
+
await clusterPage.fillClusterNameInput(duplicateClusterName);
|
|
315
|
+
createdClusterNames.push(duplicateClusterName);
|
|
316
|
+
const submitDuplicate = page.getByRole('button', {
|
|
317
|
+
name: 'Duplicate cluster',
|
|
318
|
+
exact: true,
|
|
319
|
+
});
|
|
320
|
+
await (0, test_1.expect)(submitDuplicate).toBeEnabled({ timeout: 30000 });
|
|
321
|
+
// Same as DUP-01/DUP-02: hold the page until the duplicate POST has
|
|
322
|
+
// answered, otherwise navigating away aborts the in-flight request.
|
|
323
|
+
const duplicateResponse = page.waitForResponse((response) => response.request().method() === 'POST' &&
|
|
324
|
+
/\/clusters\/[^/]+\/duplicate$/.test(new URL(response.url()).pathname), { timeout: 60000 });
|
|
325
|
+
await submitDuplicate.click();
|
|
326
|
+
const duplicate = await duplicateResponse;
|
|
327
|
+
(0, test_1.expect)(duplicate.ok()).toBe(true);
|
|
328
|
+
const { clusterId } = await duplicate.json();
|
|
329
|
+
await page.waitForURL(new RegExp(`/cluster/${clusterId}`), {
|
|
330
|
+
timeout: 60000,
|
|
331
|
+
});
|
|
332
|
+
await homePage.clickClusters();
|
|
333
|
+
await (0, UtilitiesPage_1.waitForLoadingToFinish)(page);
|
|
334
|
+
await (0, test_1.expect)(clusterPage.clusterLink(duplicateClusterName)).toBeVisible({
|
|
335
|
+
timeout: 60000,
|
|
336
|
+
});
|
|
337
|
+
// Completion rule: a duplicate created but never healthy is the failure
|
|
338
|
+
// this epic exists to prevent, so the case does not stop at submit.
|
|
339
|
+
await clusterPage.assertClusterHealthyStatusWithRetry(duplicateClusterName, undefined, undefined, (0, UtilitiesPage_1.consoleSessionRecovery)(page, page.url()));
|
|
340
|
+
await clusterPage.clickClusterLink(duplicateClusterName);
|
|
341
|
+
await clusterDetailsPage.dismissOopsIfPresent();
|
|
342
|
+
await clusterDetailsPage.assertComponentsHealth(undefined, (0, UtilitiesPage_1.consoleSessionRecovery)(page, page.url()));
|
|
343
|
+
});
|
|
344
|
+
});
|
|
255
345
|
});
|