@camunda/e2e-test-suite 0.0.773 → 0.0.775
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,10 +11,10 @@ declare class OperateProcessInstancePage {
|
|
|
11
11
|
constructor(page: Page);
|
|
12
12
|
connectorResultVariableName(name: string): Promise<Locator>;
|
|
13
13
|
connectorResultVariableValue(variableName: string): Promise<Locator>;
|
|
14
|
-
getProcessVariableValue(variableName: string): Promise<Locator>;
|
|
15
14
|
completedIconAssertion(): Promise<void>;
|
|
16
15
|
activeIconAssertion(): Promise<void>;
|
|
17
16
|
assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
|
|
17
|
+
getProcessVariableValue(variableName: string): Promise<Locator>;
|
|
18
18
|
/**
|
|
19
19
|
* Gets the JSON value of a variable by name
|
|
20
20
|
*/
|
|
@@ -32,31 +32,25 @@ class OperateProcessInstancePage {
|
|
|
32
32
|
async connectorResultVariableValue(variableName) {
|
|
33
33
|
return await this.page.getByTestId(variableName).locator('td').last();
|
|
34
34
|
}
|
|
35
|
-
async getProcessVariableValue(variableName) {
|
|
36
|
-
return await this.page
|
|
37
|
-
.getByTestId(`variable-${variableName}`)
|
|
38
|
-
.getByRole('cell')
|
|
39
|
-
.nth(1);
|
|
40
|
-
}
|
|
41
35
|
async completedIconAssertion() {
|
|
42
36
|
let retryCount = 0;
|
|
43
|
-
const maxRetries =
|
|
37
|
+
const maxRetries = 12;
|
|
44
38
|
while (retryCount < maxRetries) {
|
|
45
39
|
try {
|
|
46
40
|
await (0, test_1.expect)(this.completedIcon).toBeVisible({
|
|
47
|
-
timeout:
|
|
41
|
+
timeout: 90000,
|
|
48
42
|
});
|
|
49
43
|
return; // Exit the function if the expectation is met
|
|
50
44
|
}
|
|
51
45
|
catch (error) {
|
|
52
|
-
// If the
|
|
46
|
+
// If the completed icon isn't found, reload the page and try again
|
|
53
47
|
retryCount++;
|
|
54
48
|
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
55
49
|
await this.page.reload();
|
|
56
50
|
await (0, sleep_1.sleep)(10000);
|
|
57
51
|
}
|
|
58
52
|
}
|
|
59
|
-
throw new Error(`
|
|
53
|
+
throw new Error(`Completed icon not visible after ${maxRetries} attempts.`);
|
|
60
54
|
}
|
|
61
55
|
async activeIconAssertion() {
|
|
62
56
|
let retryCount = 0;
|
|
@@ -94,6 +88,12 @@ class OperateProcessInstancePage {
|
|
|
94
88
|
}
|
|
95
89
|
throw new Error(`Failed to assert variable ${variableName} contains ${text} after ${maxRetries} attempts.`);
|
|
96
90
|
}
|
|
91
|
+
async getProcessVariableValue(variableName) {
|
|
92
|
+
return await this.page
|
|
93
|
+
.getByTestId(`variable-${variableName}`)
|
|
94
|
+
.getByRole('cell')
|
|
95
|
+
.nth(1);
|
|
96
|
+
}
|
|
97
97
|
/**
|
|
98
98
|
* Gets the JSON value of a variable by name
|
|
99
99
|
*/
|
|
@@ -6,8 +6,11 @@ const _setup_1 = require("../../test-setup.js");
|
|
|
6
6
|
const zeebeClient_1 = require("../../utils/zeebeClient");
|
|
7
7
|
const test_1 = require("@playwright/test");
|
|
8
8
|
const sleep_1 = require("../../utils/sleep");
|
|
9
|
-
const constants_1 = require("../../utils/constants");
|
|
10
9
|
const apiHelpers_1 = require("../../utils/apiHelpers");
|
|
10
|
+
const webhookAssertionOptions = {
|
|
11
|
+
intervals: [10000, 15000, 30000, 30000],
|
|
12
|
+
timeout: 120000,
|
|
13
|
+
};
|
|
11
14
|
c8Run_8_9_1.test.beforeAll(async () => {
|
|
12
15
|
await (0, apiHelpers_1.waitForConnectorsReady)();
|
|
13
16
|
await Promise.all([
|
|
@@ -79,7 +82,7 @@ c8Run_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
79
82
|
const response = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST +
|
|
80
83
|
'/inbound/test-webhook-id');
|
|
81
84
|
await (0, test_1.expect)(response.status()).toBe(200);
|
|
82
|
-
}).toPass(
|
|
85
|
+
}).toPass(webhookAssertionOptions);
|
|
83
86
|
});
|
|
84
87
|
await c8Run_8_9_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
|
|
85
88
|
await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
|
|
@@ -101,7 +104,7 @@ c8Run_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
101
104
|
},
|
|
102
105
|
});
|
|
103
106
|
await (0, test_1.expect)(response.status()).toBe(200);
|
|
104
|
-
}).toPass(
|
|
107
|
+
}).toPass(webhookAssertionOptions);
|
|
105
108
|
});
|
|
106
109
|
await c8Run_8_9_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
|
|
107
110
|
await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible({ timeout: 120000 });
|