@camunda/e2e-test-suite 0.0.1038 → 0.0.1039
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.
|
@@ -155,6 +155,7 @@ declare class ModelerCreatePage {
|
|
|
155
155
|
clickDiagramBreadcrumb(): Promise<void>;
|
|
156
156
|
clickEditDiagramNameButton(): Promise<void>;
|
|
157
157
|
enterDiagramName(name: string): Promise<void>;
|
|
158
|
+
private diagramNameEditorOpen;
|
|
158
159
|
clickVariableInput(): Promise<void>;
|
|
159
160
|
fillVariableInput(variable: string): Promise<void>;
|
|
160
161
|
clickEmbedFormButton(): Promise<void>;
|
|
@@ -799,25 +799,42 @@ class ModelerCreatePage {
|
|
|
799
799
|
async enterDiagramName(name) {
|
|
800
800
|
const maxAttempts = 3;
|
|
801
801
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
802
|
-
if (attempt > 0) {
|
|
803
|
-
await this.clickDiagramBreadcrumb();
|
|
804
|
-
await this.clickEditDiagramNameButton();
|
|
805
|
-
}
|
|
806
|
-
await this.diagramNameInput.fill(name, { timeout: 90000 });
|
|
807
|
-
await this.diagramNameInput.press('Enter', { timeout: 90000 });
|
|
808
802
|
try {
|
|
803
|
+
// Creating the diagram does not reliably leave the name editor open --
|
|
804
|
+
// hub opens the editor on the breadcrumb, and a slow canvas render
|
|
805
|
+
// lands on a closed one. The input therefore has to be opened on the
|
|
806
|
+
// FIRST attempt too, not only on a retry: reaching for it blind burnt
|
|
807
|
+
// the whole 90s fill timeout and threw straight out of this loop, so
|
|
808
|
+
// the reopen below (which exists for exactly this) never ran.
|
|
809
|
+
// clickEditDiagramNameButton() reopens the breadcrumb menu itself when
|
|
810
|
+
// it is closed, so it covers both the first attempt and a retry.
|
|
811
|
+
if (!(await this.diagramNameEditorOpen())) {
|
|
812
|
+
await this.clickEditDiagramNameButton();
|
|
813
|
+
}
|
|
814
|
+
// 20s rather than 90s: the editor is proven open at this point, so the
|
|
815
|
+
// long budget only delayed the retry that actually recovers -- and at
|
|
816
|
+
// 90s x 2 x 3 attempts this loop could outlive the 12min test timeout,
|
|
817
|
+
// losing the artifacts that explain the failure.
|
|
818
|
+
await this.diagramNameInput.fill(name, { timeout: 20000 });
|
|
819
|
+
await this.diagramNameInput.press('Enter', { timeout: 20000 });
|
|
809
820
|
await this.diagramNameBreadcrumb(name).waitFor({
|
|
810
821
|
state: 'visible',
|
|
811
822
|
timeout: 30000,
|
|
812
823
|
});
|
|
813
824
|
return;
|
|
814
825
|
}
|
|
815
|
-
catch {
|
|
816
|
-
console.warn(`Diagram rename to "${name}" did not commit on attempt ${attempt + 1}
|
|
826
|
+
catch (error) {
|
|
827
|
+
console.warn(`Diagram rename to "${name}" did not commit on attempt ${attempt + 1}: ${error instanceof Error ? error.message : error}`);
|
|
817
828
|
}
|
|
818
829
|
}
|
|
819
830
|
throw new Error(`Diagram name was not set to "${name}".`);
|
|
820
831
|
}
|
|
832
|
+
async diagramNameEditorOpen() {
|
|
833
|
+
return this.diagramNameInput
|
|
834
|
+
.waitFor({ state: 'visible', timeout: 5000 })
|
|
835
|
+
.then(() => true)
|
|
836
|
+
.catch(() => false);
|
|
837
|
+
}
|
|
821
838
|
async clickVariableInput() {
|
|
822
839
|
await this.variableInput.click({ timeout: 60000 });
|
|
823
840
|
}
|
|
@@ -477,6 +477,16 @@ class ModelerHomePage {
|
|
|
477
477
|
await this.clickMessageBanner();
|
|
478
478
|
},
|
|
479
479
|
postAction: async () => {
|
|
480
|
+
// The project tile only renders on the Modeler home page. A failure
|
|
481
|
+
// that leaves the browser inside the project makes the tile unreachable
|
|
482
|
+
// by construction, so reloading the same URL cannot help and every
|
|
483
|
+
// remaining attempt just waits out its 60s visibility timeout before
|
|
484
|
+
// the helper throws. Step back out to home first.
|
|
485
|
+
const tileVisible = await this.becameVisible(this.crossComponentProjectFolder, 2000);
|
|
486
|
+
if (!tileVisible &&
|
|
487
|
+
(await this.becameVisible(this.homeBreadcrumb, 5000))) {
|
|
488
|
+
await this.homeBreadcrumb.click({ timeout: 15000 });
|
|
489
|
+
}
|
|
480
490
|
await this.page.reload();
|
|
481
491
|
await this.page.waitForLoadState('domcontentloaded');
|
|
482
492
|
},
|
|
@@ -86,10 +86,17 @@ class ProcessApplicationPage {
|
|
|
86
86
|
exact: true,
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
//
|
|
90
|
-
//
|
|
89
|
+
// Only the breadcrumb proves we are on the process application page. The
|
|
90
|
+
// folder explorer does NOT: hub renders a `region[name="Folder explorer"]` on
|
|
91
|
+
// the enclosing PROJECT page too (trace snapshots on a
|
|
92
|
+
// `...--cross-component-test-project` URL carry one), so accepting it let
|
|
93
|
+
// this resolve on the project page whenever creation had not actually landed.
|
|
94
|
+
// ModelerHomePage then remembered the project URL as the container URL and
|
|
95
|
+
// every later navigation went back to the project page, where the
|
|
96
|
+
// container's `[data-test="diagram-dropdown"]` create menu does not exist --
|
|
97
|
+
// surfacing 60s later as `element(s) not found` on an unrelated step.
|
|
91
98
|
pageReady() {
|
|
92
|
-
return this.
|
|
99
|
+
return this.breadcrumb;
|
|
93
100
|
}
|
|
94
101
|
async waitForProcessApplication(timeout = 90000) {
|
|
95
102
|
await (0, test_1.expect)(this.pageReady()).toBeVisible({ timeout });
|