@camunda/e2e-test-suite 0.0.768 → 0.0.769
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.
|
@@ -691,29 +691,50 @@ class ModelerCreatePage {
|
|
|
691
691
|
await this.continueToPlayButton.click({ timeout: 30000 });
|
|
692
692
|
}
|
|
693
693
|
async clickWebhookStartEventConnectorOption() {
|
|
694
|
-
const maxRetries =
|
|
694
|
+
const maxRetries = 4;
|
|
695
695
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
696
696
|
try {
|
|
697
697
|
if (retries === 0) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
698
|
+
// If the change type panel is not showing the connector (e.g. after
|
|
699
|
+
// visiting the marketplace), reopen it before waiting for the option.
|
|
700
|
+
const isAlreadyVisible = await this.webhookMessageStartEventConnectorOption.isVisible();
|
|
701
|
+
if (!isAlreadyVisible) {
|
|
702
|
+
await this.changeTypeButton.click({ force: true, timeout: 30000 });
|
|
703
|
+
}
|
|
701
704
|
}
|
|
702
705
|
else {
|
|
706
|
+
// Reload to pick up newly-downloaded connector templates, then
|
|
707
|
+
// re-select the start event element and open the type picker.
|
|
703
708
|
await this.page.reload();
|
|
704
|
-
await this.
|
|
705
|
-
await this.
|
|
706
|
-
|
|
709
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
710
|
+
await this.firstElement.waitFor({
|
|
711
|
+
state: 'visible',
|
|
712
|
+
timeout: 30000,
|
|
707
713
|
});
|
|
714
|
+
await this.firstElement.click({ timeout: 30000 });
|
|
715
|
+
await this.changeTypeButton.click({ force: true, timeout: 30000 });
|
|
708
716
|
}
|
|
717
|
+
// Use a longer timeout to allow the connector to finish registering
|
|
718
|
+
// after a marketplace download before giving up.
|
|
719
|
+
await (0, test_1.expect)(this.webhookMessageStartEventConnectorOption).toBeVisible({
|
|
720
|
+
timeout: 60000,
|
|
721
|
+
});
|
|
722
|
+
await this.webhookMessageStartEventConnectorOption.scrollIntoViewIfNeeded();
|
|
723
|
+
// force: true bypasses context-pad overlays that can intercept clicks
|
|
724
|
+
await this.webhookMessageStartEventConnectorOption.click({
|
|
725
|
+
timeout: 60000,
|
|
726
|
+
force: true,
|
|
727
|
+
});
|
|
709
728
|
return;
|
|
710
729
|
}
|
|
711
730
|
catch (error) {
|
|
712
|
-
console.error(`
|
|
713
|
-
|
|
731
|
+
console.error(`Attempt ${retries + 1} failed to click webhook start event connector option: ${error}`);
|
|
732
|
+
if (retries < maxRetries - 1) {
|
|
733
|
+
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
734
|
+
}
|
|
714
735
|
}
|
|
715
736
|
}
|
|
716
|
-
throw new Error(`Failed to click
|
|
737
|
+
throw new Error(`Failed to click webhook start event connector option after ${maxRetries} attempts.`);
|
|
717
738
|
}
|
|
718
739
|
async clickWebhookIdInput() {
|
|
719
740
|
await this.webhookIdInput.click();
|