@camunda/e2e-test-suite 0.0.1407 → 0.0.1408
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.
|
@@ -583,8 +583,27 @@ class ModelerCreatePage {
|
|
|
583
583
|
await this.changeTypeButton.click();
|
|
584
584
|
}
|
|
585
585
|
async clickUserTaskOption() {
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
// The change-element popup repaints its result list as it settles, so the
|
|
587
|
+
// already-selected `replace-with-user-task` entry can detach mid-click
|
|
588
|
+
// ("element is not visible" then "element was detached from the DOM"). Mirror
|
|
589
|
+
// clickServiceTaskOption: on a failed click re-open the popup via the Change
|
|
590
|
+
// element button and re-resolve the same entry, instead of clicking a stale
|
|
591
|
+
// handle.
|
|
592
|
+
const maxRetries = 3;
|
|
593
|
+
for (let retries = 0; retries < maxRetries; retries++) {
|
|
594
|
+
try {
|
|
595
|
+
if (retries > 0) {
|
|
596
|
+
await this.changeTypeButton.click({ force: true, timeout: 30000 });
|
|
597
|
+
}
|
|
598
|
+
await this.userTaskOption.click({ timeout: 30000, force: true });
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
catch (error) {
|
|
602
|
+
console.error(`Click attempt ${retries + 1} failed: ${error}`);
|
|
603
|
+
await new Promise((resolve) => setTimeout(resolve, 10000));
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
|
|
588
607
|
}
|
|
589
608
|
async clickForm(name) {
|
|
590
609
|
// Baseline upgrade runs use fixed form names, so a Playwright retry re-creates
|