@camunda/e2e-test-suite 0.0.1385 → 0.0.1386
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.
|
@@ -18,6 +18,7 @@ declare class FormJsPage {
|
|
|
18
18
|
readonly deploySubButton: Locator;
|
|
19
19
|
readonly dialog: Locator;
|
|
20
20
|
readonly deploySuccessNotification: Locator;
|
|
21
|
+
readonly clusterRequiredNotice: Locator;
|
|
21
22
|
constructor(page: Page);
|
|
22
23
|
generateAIForm(request?: string): Promise<void>;
|
|
23
24
|
clickAIFormGeneratorButton(): Promise<void>;
|
|
@@ -25,6 +25,7 @@ class FormJsPage {
|
|
|
25
25
|
deploySubButton;
|
|
26
26
|
dialog;
|
|
27
27
|
deploySuccessNotification;
|
|
28
|
+
clusterRequiredNotice;
|
|
28
29
|
constructor(page) {
|
|
29
30
|
this.page = page;
|
|
30
31
|
this.processApplicationPage = new ProcessApplicationPage_1.ProcessApplicationPage(page);
|
|
@@ -73,6 +74,14 @@ class FormJsPage {
|
|
|
73
74
|
.locator('.cds--toast-notification--success')
|
|
74
75
|
.filter({ hasText: 'Form deployed!' }))
|
|
75
76
|
.first();
|
|
77
|
+
// Hub's "Cluster required" notice (NoClusterNoticeModal), shown when the
|
|
78
|
+
// deploy gate reads zero clusters -- the org's cluster list has not loaded
|
|
79
|
+
// yet. It shares the dialog role with the deploy modal, so it is matched by
|
|
80
|
+
// its own title and its unique copy rather than by role alone.
|
|
81
|
+
this.clusterRequiredNotice = page
|
|
82
|
+
.getByRole('dialog', { name: 'Cluster required' })
|
|
83
|
+
.or(page.getByText('any clusters yet'))
|
|
84
|
+
.first();
|
|
76
85
|
}
|
|
77
86
|
async generateAIForm(
|
|
78
87
|
// "date only, no time": asked for a plain date the generator sometimes
|
|
@@ -248,28 +257,41 @@ class FormJsPage {
|
|
|
248
257
|
}
|
|
249
258
|
async deployForm(clusterName) {
|
|
250
259
|
await this.processApplicationPage.ensureStageCluster(clusterName);
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
catch (error) {
|
|
264
|
-
const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
|
|
265
|
-
if (!rebound) {
|
|
266
|
-
throw error;
|
|
267
|
-
}
|
|
260
|
+
// ensureStageCluster navigates back to the editor through Hub's /login
|
|
261
|
+
// round-trip, so the org's cluster list is still loading when Deploy is
|
|
262
|
+
// first clicked. Until it lands, Hub's deploy gate (checkIfNoClusterPresent)
|
|
263
|
+
// reads zero clusters and shows the non-recovering "Cluster required" notice
|
|
264
|
+
// instead of the deploy dialog -- the same transient runProcessInstance
|
|
265
|
+
// absorbs with its reload-and-retry loop. Reopen until the dialog offers the
|
|
266
|
+
// cluster: reload (not re-navigate) for the still-loading notice so it does
|
|
267
|
+
// not re-trigger the race, and rebind via ensureStageCluster for the
|
|
268
|
+
// distinct "binding did not take" case selectCluster clears.
|
|
269
|
+
const maxAttempts = 4;
|
|
270
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
268
271
|
await this.clickDeployButton();
|
|
269
|
-
await (0, test_1.expect)(this.dialog).toBeVisible({
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
|
|
273
|
+
if (await this.clusterRequiredNotice.isVisible().catch(() => false)) {
|
|
274
|
+
if (attempt === maxAttempts) {
|
|
275
|
+
throw new Error(`Hub showed "Cluster required" for "${clusterName}" on every ` +
|
|
276
|
+
"attempt: the org's cluster list never loaded after navigation.");
|
|
277
|
+
}
|
|
278
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
279
|
+
await (0, test_1.expect)(this.deployButton).toBeVisible({ timeout: 60000 });
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
try {
|
|
283
|
+
await this.selectCluster(clusterName);
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
if (attempt === maxAttempts) {
|
|
288
|
+
throw error;
|
|
289
|
+
}
|
|
290
|
+
const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
|
|
291
|
+
if (!rebound) {
|
|
292
|
+
throw error;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
273
295
|
}
|
|
274
296
|
await this.selectOnlyThisResource();
|
|
275
297
|
await this.clickDeploySubButton();
|