@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 = 3;
694
+ const maxRetries = 4;
695
695
  for (let retries = 0; retries < maxRetries; retries++) {
696
696
  try {
697
697
  if (retries === 0) {
698
- await this.webhookMessageStartEventConnectorOption.click({
699
- timeout: 30000,
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.changeTypeButton.click({ force: true, timeout: 30000 });
705
- await this.webhookMessageStartEventConnectorOption.click({
706
- timeout: 90000,
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(`Click attempt ${retries + 1} failed: ${error}`);
713
- await new Promise((resolve) => setTimeout(resolve, 10000));
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 the button after ${maxRetries} attempts.`);
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.768",
3
+ "version": "0.0.769",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",