@camunda/e2e-test-suite 0.0.1075 → 0.0.1077

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.
@@ -14,7 +14,7 @@ declare class ConnectorMarketplacePage {
14
14
  clickDownloadToProjectButton(): Promise<void>;
15
15
  clickCancelButton(): Promise<void>;
16
16
  clickReplaceResourceButton(): Promise<void>;
17
- downloadConnectorToProject(): Promise<void>;
17
+ downloadConnectorToProject(): Promise<boolean>;
18
18
  searchAndDownloadConnector(connectorName: string, maxRetries?: number): Promise<void>;
19
19
  }
20
20
  export { ConnectorMarketplacePage };
@@ -53,6 +53,8 @@ class ConnectorMarketplacePage {
53
53
  // button. Probe which one rendered and click only that one - issuing both
54
54
  // clicks through Promise.race also fired the Cancel click, so the import was
55
55
  // abandoned and the connector template never landed in the project.
56
+ // Resolves true only when a confirm button was actually clicked, so callers
57
+ // can tell a completed import from a swallowed download error.
56
58
  async downloadConnectorToProject() {
57
59
  await this.clickDownloadToProjectButton();
58
60
  const importConfirmButton = this.addToProjectButton.or(this.replaceResourceButton);
@@ -62,9 +64,11 @@ class ConnectorMarketplacePage {
62
64
  .waitFor({ state: 'visible', timeout: 20000 })
63
65
  .then(() => true)
64
66
  .catch(() => false);
65
- if (settled && (await importConfirmButton.first().isVisible())) {
66
- await importConfirmButton.first().click({ timeout: 30000 });
67
+ if (!settled || !(await importConfirmButton.first().isVisible())) {
68
+ return false;
67
69
  }
70
+ await importConfirmButton.first().click({ timeout: 30000 });
71
+ return true;
68
72
  }
69
73
  // The marketplace backend transiently fails in two ways: the search returns an
70
74
  // error instead of results, or the resource download from the external
@@ -83,11 +87,8 @@ class ConnectorMarketplacePage {
83
87
  .waitFor({ state: 'visible', timeout: 30000 })
84
88
  .then(() => true)
85
89
  .catch(() => false);
86
- if (isDownloadable) {
87
- await this.downloadConnectorToProject();
88
- if (!(await this.downloadErrorMessage.first().isVisible())) {
89
- return;
90
- }
90
+ if (isDownloadable && (await this.downloadConnectorToProject())) {
91
+ return;
91
92
  }
92
93
  if (attempt < maxRetries) {
93
94
  await (0, sleep_1.sleep)(attempt * 5000);
@@ -104,10 +104,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
104
104
  }
105
105
  catch (error) {
106
106
  await modelerCreatePage.clickMarketPlaceButton();
107
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
108
- await connectorMarketplacePage.fillSearchForConnectorTextbox('Webhook Connector');
109
- await (0, sleep_1.sleep)(10000);
110
- await connectorMarketplacePage.downloadConnectorToProject();
107
+ await connectorMarketplacePage.searchAndDownloadConnector('Webhook Connector');
111
108
  }
112
109
  await modelerCreatePage.clickWebhookMessageStartEventConnectorOption();
113
110
  await connectorSettingsPage.clickWebhookConfigurationTab();
@@ -201,10 +198,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
201
198
  }
202
199
  catch (error) {
203
200
  await modelerCreatePage.clickMarketPlaceButton();
204
- await connectorMarketplacePage.clickSearchForConnectorTextbox();
205
- await connectorMarketplacePage.fillSearchForConnectorTextbox('Webhook Connector');
206
- await (0, sleep_1.sleep)(10000);
207
- await connectorMarketplacePage.downloadConnectorToProject();
201
+ await connectorMarketplacePage.searchAndDownloadConnector('Webhook Connector');
208
202
  }
209
203
  await modelerCreatePage.clickIntermediateWebhookConnectorOption();
210
204
  await connectorSettingsPage.clickCorrelationTab();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1075",
3
+ "version": "0.0.1077",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",