@camunda/e2e-test-suite 0.0.1036 → 0.0.1037
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.
|
@@ -13,6 +13,7 @@ declare class ModelerHomePage {
|
|
|
13
13
|
readonly diagramTypeDropdown: Locator;
|
|
14
14
|
readonly bpmnTemplateOption: Locator;
|
|
15
15
|
readonly formTemplateOption: Locator;
|
|
16
|
+
readonly diagramPropertiesPanel: Locator;
|
|
16
17
|
readonly projectBreadcrumb: Locator;
|
|
17
18
|
readonly workspaceBreadcrumb: Locator;
|
|
18
19
|
readonly openOrganizationsButton: Locator;
|
|
@@ -30,6 +30,9 @@ class ModelerHomePage {
|
|
|
30
30
|
diagramTypeDropdown;
|
|
31
31
|
bpmnTemplateOption;
|
|
32
32
|
formTemplateOption;
|
|
33
|
+
// Same group the spec asserts on ModelerCreatePage: it is what proves the
|
|
34
|
+
// BPMN editor opened, and clickBpmnTemplateOption() has to know that here.
|
|
35
|
+
diagramPropertiesPanel;
|
|
33
36
|
projectBreadcrumb;
|
|
34
37
|
workspaceBreadcrumb;
|
|
35
38
|
openOrganizationsButton;
|
|
@@ -77,6 +80,7 @@ class ModelerHomePage {
|
|
|
77
80
|
// day that variant ships.
|
|
78
81
|
this.bpmnTemplateOption = page.locator('[data-test="create-bpmn-diagram"]');
|
|
79
82
|
this.formTemplateOption = page.locator('[data-test="create-form"]');
|
|
83
|
+
this.diagramPropertiesPanel = page.locator('[data-group-id="group-general"]');
|
|
80
84
|
this.projectBreadcrumb = page.locator('[data-test="breadcrumb-project"]');
|
|
81
85
|
// Kept separate from projectBreadcrumb, which now means "the container my
|
|
82
86
|
// resources live in". When hub's workspaces terminology flag flips,
|
|
@@ -292,8 +296,28 @@ class ModelerHomePage {
|
|
|
292
296
|
}
|
|
293
297
|
}
|
|
294
298
|
}
|
|
299
|
+
// Confirms the editor actually opened instead of trusting the click. The
|
|
300
|
+
// create menu can close without navigating -- hub re-renders it while the
|
|
301
|
+
// container's resource list settles -- and nothing here noticed: the browser
|
|
302
|
+
// stayed on the process application page and the failure surfaced 60s later
|
|
303
|
+
// as `[data-group-id="group-general"]` / `element(s) not found` on the
|
|
304
|
+
// spec's own properties-panel assertion, which reads as an editor bug rather
|
|
305
|
+
// than a lost click. Re-open the menu and click again when the editor is not
|
|
306
|
+
// there; the 60s probe first means a merely slow canvas render is waited
|
|
307
|
+
// out rather than creating a second diagram.
|
|
295
308
|
async clickBpmnTemplateOption() {
|
|
296
|
-
await
|
|
309
|
+
await (0, test_1.expect)(async () => {
|
|
310
|
+
if (await this.becameVisible(this.diagramPropertiesPanel, 1000)) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (!(await this.becameVisible(this.bpmnTemplateOption, 5000))) {
|
|
314
|
+
await this.clickDiagramTypeDropdown();
|
|
315
|
+
}
|
|
316
|
+
// 30s rather than the old 120s: the option is proven visible above, so a
|
|
317
|
+
// longer click budget only ate the time the retry below needs.
|
|
318
|
+
await this.bpmnTemplateOption.click({ timeout: 30000 });
|
|
319
|
+
await (0, test_1.expect)(this.diagramPropertiesPanel).toBeVisible({ timeout: 60000 });
|
|
320
|
+
}).toPass({ timeout: 240000, intervals: [1000, 2000, 5000] });
|
|
297
321
|
}
|
|
298
322
|
async clickFormOption() {
|
|
299
323
|
await this.formTemplateOption.click();
|
|
@@ -499,6 +523,17 @@ class ModelerHomePage {
|
|
|
499
523
|
await this.clickMessageBanner();
|
|
500
524
|
},
|
|
501
525
|
postAction: async () => {
|
|
526
|
+
// The project tile only renders on the Modeler home page. A failure
|
|
527
|
+
// that leaves the browser inside the project -- createForm's recovery
|
|
528
|
+
// path below reloads and calls straight back in here -- makes the tile
|
|
529
|
+
// unreachable by construction, so reloading the same URL cannot help
|
|
530
|
+
// and every remaining attempt just waits out its 60s visibility
|
|
531
|
+
// timeout before the helper throws. Step back out to home first.
|
|
532
|
+
const tileVisible = await this.becameVisible(this.crossComponentProjectFolder, 2000);
|
|
533
|
+
if (!tileVisible &&
|
|
534
|
+
(await this.becameVisible(this.homeBreadcrumb, 5000))) {
|
|
535
|
+
await this.homeBreadcrumb.click({ timeout: 15000 });
|
|
536
|
+
}
|
|
502
537
|
await this.page.reload();
|
|
503
538
|
await this.page.waitForLoadState('domcontentloaded');
|
|
504
539
|
},
|