@camunda/e2e-test-suite 0.0.764 → 0.0.766

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.
@@ -11,7 +11,7 @@ declare class OperateProcessInstancePage {
11
11
  constructor(page: Page);
12
12
  connectorResultVariableName(name: string): Promise<Locator>;
13
13
  connectorResultVariableValue(variableName: string): Promise<Locator>;
14
- completedIconAssertion(): Promise<void>;
14
+ completedIconAssertion(onRetry?: () => Promise<void>): Promise<void>;
15
15
  activeIconAssertion(): Promise<void>;
16
16
  }
17
17
  export { OperateProcessInstancePage };
@@ -32,7 +32,7 @@ class OperateProcessInstancePage {
32
32
  async connectorResultVariableValue(variableName) {
33
33
  return await this.page.getByTestId(variableName).locator('td').last();
34
34
  }
35
- async completedIconAssertion() {
35
+ async completedIconAssertion(onRetry) {
36
36
  let retryCount = 0;
37
37
  const maxRetries = 5;
38
38
  while (retryCount < maxRetries) {
@@ -46,6 +46,9 @@ class OperateProcessInstancePage {
46
46
  // If the completed icon isn't found, reload the page and try again
47
47
  retryCount++;
48
48
  console.log(`Attempt ${retryCount} failed. Retrying...`);
49
+ if (onRetry) {
50
+ await onRetry();
51
+ }
49
52
  await this.page.reload();
50
53
  await (0, sleep_1.sleep)(10000);
51
54
  }
@@ -94,24 +94,25 @@ c8Run_8_7_1.test.describe('Connectors User Flow Tests', () => {
94
94
  });
95
95
  });
96
96
  (0, c8Run_8_7_1.test)('Intermediate Event Webhook Connector No Auth User Flow', async ({ request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
97
+ const postWebhook = async () => {
98
+ const response = await request.post(process.env.C8RUN_CONNECTORS_API_URL +
99
+ '/inbound/test-webhook-intermediate', {
100
+ data: {
101
+ test: 'test',
102
+ },
103
+ });
104
+ await (0, test_1.expect)(response.status()).toBe(200);
105
+ };
97
106
  await c8Run_8_7_1.test.step('Make Authorization Request', async () => {
98
107
  await (0, sleep_1.sleep)(60000);
99
- await (0, test_1.expect)(async () => {
100
- const response = await request.post(process.env.C8RUN_CONNECTORS_API_URL +
101
- '/inbound/test-webhook-intermediate', {
102
- data: {
103
- test: 'test',
104
- },
105
- });
106
- await (0, test_1.expect)(response.status()).toBe(200);
107
- }).toPass(constants_1.defaultAssertionOptions);
108
+ await (0, test_1.expect)(postWebhook).toPass(constants_1.defaultAssertionOptions);
108
109
  });
109
110
  await c8Run_8_7_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
110
111
  await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
111
112
  await operateHomePage.clickProcessesTab();
112
113
  await operateProcessesPage.clickProcessCompletedCheckbox();
113
114
  await operateProcessesPage.clickProcessInstanceLink('Intermediate_Event_Webhook_Connector_No_Auth_Process');
114
- await operateProcessInstancePage.completedIconAssertion();
115
+ await operateProcessInstancePage.completedIconAssertion(postWebhook);
115
116
  });
116
117
  });
117
118
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.764",
3
+ "version": "0.0.766",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",