@camunda/e2e-test-suite 0.0.921 → 0.0.923
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.
|
@@ -107,6 +107,7 @@ declare class ModelerCreatePage {
|
|
|
107
107
|
constructor(page: Page);
|
|
108
108
|
clickSecondDeployButton(): Promise<void>;
|
|
109
109
|
modelJobWorkerDiagram(processName: string, embedFrom?: boolean, processId?: string): Promise<void>;
|
|
110
|
+
private waitForDiagramEditorToLoad;
|
|
110
111
|
modelCamundaUserTaskDiagram(processName: string, processId?: string, formName?: string): Promise<void>;
|
|
111
112
|
assignToCandidateGroup(taskName: string, candidateGroup: string, assignee?: string): Promise<void>;
|
|
112
113
|
assignToCandidateUser(taskName: string, candidateUser: string, assignee?: string): Promise<void>;
|
|
@@ -357,10 +357,29 @@ class ModelerCreatePage {
|
|
|
357
357
|
await this.clickAppendEndEventButton();
|
|
358
358
|
await (0, sleep_1.sleep)(20000);
|
|
359
359
|
}
|
|
360
|
+
// Opening the freshly created diagram occasionally lands on a bare gateway
|
|
361
|
+
// error page instead of the editor (the nightly captured Envoy's "upstream
|
|
362
|
+
// connect error or disconnect/reset before headers" plain-text response). That
|
|
363
|
+
// page never renders the properties panel, so one long wait just burns the
|
|
364
|
+
// whole budget before failing; reload between attempts so the blip recovers.
|
|
365
|
+
async waitForDiagramEditorToLoad() {
|
|
366
|
+
const maxAttempts = 3;
|
|
367
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
368
|
+
try {
|
|
369
|
+
await (0, test_1.expect)(this.generalPanel).toBeVisible({ timeout: 60000 });
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
catch (error) {
|
|
373
|
+
if (attempt === maxAttempts - 1) {
|
|
374
|
+
throw error;
|
|
375
|
+
}
|
|
376
|
+
console.warn(`Diagram editor did not load on attempt ${attempt + 1}; reloading.`);
|
|
377
|
+
await this.page.reload();
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
360
381
|
async modelCamundaUserTaskDiagram(processName, processId = '', formName = '') {
|
|
361
|
-
await
|
|
362
|
-
timeout: 180000,
|
|
363
|
-
});
|
|
382
|
+
await this.waitForDiagramEditorToLoad();
|
|
364
383
|
await this.enterDiagramName(processName);
|
|
365
384
|
await (0, sleep_1.sleep)(15000);
|
|
366
385
|
if (processId.length > 0) {
|
|
@@ -663,9 +682,36 @@ class ModelerCreatePage {
|
|
|
663
682
|
async clickEditDiagramNameButton() {
|
|
664
683
|
await this.renameDiagramNameButton.click({ timeout: 10000 });
|
|
665
684
|
}
|
|
685
|
+
// The rename can silently no-op: camunda-hub's breadcrumb name editor
|
|
686
|
+
// (InlineEditable) resets its input back to the stored diagram name whenever
|
|
687
|
+
// the diagram store pushes a new value, and `renameDiagram` returns early when
|
|
688
|
+
// the submitted name equals the stored one — so an Enter that races the
|
|
689
|
+
// editor's initial autosave commits nothing. The diagram then keeps its
|
|
690
|
+
// "New BPMN diagram" default name, and every later lookup by process name
|
|
691
|
+
// (Operate's instance list, Tasklist, Play) can never match, which is what the
|
|
692
|
+
// nightly showed: three instances deployed as "New BPMN diagram". Confirm the
|
|
693
|
+
// name landed in the breadcrumb and re-open the editor to retry if it didn't.
|
|
666
694
|
async enterDiagramName(name) {
|
|
667
|
-
|
|
668
|
-
|
|
695
|
+
const maxAttempts = 3;
|
|
696
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
697
|
+
if (attempt > 0) {
|
|
698
|
+
await this.clickDiagramBreadcrumb();
|
|
699
|
+
await this.clickEditDiagramNameButton();
|
|
700
|
+
}
|
|
701
|
+
await this.diagramNameInput.fill(name, { timeout: 90000 });
|
|
702
|
+
await this.diagramNameInput.press('Enter', { timeout: 90000 });
|
|
703
|
+
try {
|
|
704
|
+
await this.diagramNameBreadcrumb(name).waitFor({
|
|
705
|
+
state: 'visible',
|
|
706
|
+
timeout: 30000,
|
|
707
|
+
});
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
catch {
|
|
711
|
+
console.warn(`Diagram rename to "${name}" did not commit on attempt ${attempt + 1}.`);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
throw new Error(`Diagram name was not set to "${name}".`);
|
|
669
715
|
}
|
|
670
716
|
async clickVariableInput() {
|
|
671
717
|
await this.variableInput.click({ timeout: 60000 });
|
|
@@ -1152,9 +1198,11 @@ class ModelerCreatePage {
|
|
|
1152
1198
|
.locator('..')
|
|
1153
1199
|
.getByRole('button', { name: 'Deploy' });
|
|
1154
1200
|
// Keyed on the test id, not the label: the button reads "Configure test
|
|
1155
|
-
// case" since camunda-hub a90fd06 and "Configure scenario" before it
|
|
1156
|
-
//
|
|
1157
|
-
|
|
1201
|
+
// case" since camunda-hub a90fd06 and "Configure scenario" before it. The
|
|
1202
|
+
// test id survived that rename but was itself renamed to match the label in
|
|
1203
|
+
// camunda-hub b3958a1649 ("remove obsolete Play test mode feature flags"),
|
|
1204
|
+
// so the old `play-configuration-*` id no longer exists in the DOM.
|
|
1205
|
+
const configureScenarioButton = this.page.getByTestId('configure-test-case-button');
|
|
1158
1206
|
// Wait up to 15s for EITHER the new-flow setup panel OR the legacy Continue
|
|
1159
1207
|
// button to appear. Using .or() avoids separate sequential timeouts that would
|
|
1160
1208
|
// both expire before the page finishes loading on a slow cluster.
|
|
@@ -1146,10 +1146,16 @@ class ModelerCreatePage {
|
|
|
1146
1146
|
.getByText('Deploy process')
|
|
1147
1147
|
.locator('..')
|
|
1148
1148
|
.getByRole('button', { name: 'Deploy' });
|
|
1149
|
-
//
|
|
1150
|
-
//
|
|
1151
|
-
//
|
|
1152
|
-
|
|
1149
|
+
// The button reads "Configure test case" since camunda-hub a90fd06 and
|
|
1150
|
+
// "Configure scenario" before it. camunda-hub b3958a1649 then renamed its
|
|
1151
|
+
// test id from `play-configuration-configure-scenario-button` to
|
|
1152
|
+
// `configure-test-case-button` (see
|
|
1153
|
+
// TestMode/ConfigurationOverlay/index.tsx). Accept the pre-rename test id
|
|
1154
|
+
// too so the page object works either side of the rename.
|
|
1155
|
+
const configureScenarioButton = this.page
|
|
1156
|
+
.getByTestId('configure-test-case-button')
|
|
1157
|
+
.or(this.page.getByTestId('play-configuration-configure-scenario-button'))
|
|
1158
|
+
.first();
|
|
1153
1159
|
// Wait up to 15s for EITHER the new-flow setup panel OR the legacy Continue
|
|
1154
1160
|
// button to appear. Using .or() avoids separate sequential timeouts that would
|
|
1155
1161
|
// both expire before the page finishes loading on a slow cluster.
|