@camunda/e2e-test-suite 0.0.414 → 0.0.415
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.
|
@@ -6,6 +6,8 @@ declare class OperateProcessInstancePage {
|
|
|
6
6
|
readonly diagramSpinner: Locator;
|
|
7
7
|
readonly activeIcon: Locator;
|
|
8
8
|
readonly incidentIcon: Locator;
|
|
9
|
+
readonly variablesList: Locator;
|
|
10
|
+
readonly messageVariable: Locator;
|
|
9
11
|
constructor(page: Page);
|
|
10
12
|
connectorResultVariableName(name: string): Promise<Locator>;
|
|
11
13
|
connectorResultVariableValue(variableName: string): Promise<Locator>;
|
|
@@ -19,6 +21,7 @@ declare class OperateProcessInstancePage {
|
|
|
19
21
|
assertEitherIncidentOrCompletedIconVisible(): Promise<string>;
|
|
20
22
|
assertProcessCompleteStatusWithRetry(timeout?: number, maxRetries?: number): Promise<void>;
|
|
21
23
|
assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
|
|
24
|
+
assertResultVariableVisibleWithRetry(variableName: string): Promise<void>;
|
|
22
25
|
assertActiveTokenIsPresent(): Promise<void>;
|
|
23
26
|
}
|
|
24
27
|
export { OperateProcessInstancePage };
|
|
@@ -10,6 +10,8 @@ class OperateProcessInstancePage {
|
|
|
10
10
|
diagramSpinner;
|
|
11
11
|
activeIcon;
|
|
12
12
|
incidentIcon;
|
|
13
|
+
variablesList;
|
|
14
|
+
messageVariable;
|
|
13
15
|
constructor(page) {
|
|
14
16
|
this.page = page;
|
|
15
17
|
this.diagram = page.getByTestId('diagram');
|
|
@@ -23,6 +25,8 @@ class OperateProcessInstancePage {
|
|
|
23
25
|
this.incidentIcon = page
|
|
24
26
|
.getByTestId('instance-header')
|
|
25
27
|
.getByTestId('INCIDENT-icon');
|
|
28
|
+
this.variablesList = page.getByTestId('variables-list');
|
|
29
|
+
this.messageVariable = page.getByTestId('variable-message');
|
|
26
30
|
}
|
|
27
31
|
async connectorResultVariableName(name) {
|
|
28
32
|
return await this.page.getByTestId(name);
|
|
@@ -150,18 +154,38 @@ class OperateProcessInstancePage {
|
|
|
150
154
|
}
|
|
151
155
|
async assertProcessVariableContainsText(variableName, text) {
|
|
152
156
|
const maxRetries = 3;
|
|
153
|
-
for (let
|
|
157
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
154
158
|
try {
|
|
155
|
-
await (0, test_1.expect)(this.page.getByTestId(`variable-${variableName}`)).toContainText(text, { timeout:
|
|
159
|
+
await (0, test_1.expect)(this.page.getByTestId(`variable-${variableName}`)).toContainText(text, { timeout: 8000 });
|
|
156
160
|
return;
|
|
157
161
|
}
|
|
158
162
|
catch (error) {
|
|
159
|
-
console.log(`
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
console.log(`assertProcessVariableContainsText attempt ${attempt + 1}/${maxRetries} failed: ${error}`);
|
|
164
|
+
if (attempt < maxRetries - 1) {
|
|
165
|
+
await this.page.reload({ timeout: 10000 }).catch(() => { });
|
|
166
|
+
await (0, sleep_1.sleep)(2000);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
throw new Error(`Failed to assert variable ${variableName} contains "${text}" after ${maxRetries} attempts.`);
|
|
171
|
+
}
|
|
172
|
+
async assertResultVariableVisibleWithRetry(variableName) {
|
|
173
|
+
const maxRetries = 3;
|
|
174
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
175
|
+
try {
|
|
176
|
+
await (0, test_1.expect)(this.variablesList).toBeVisible({ timeout: 8000 });
|
|
177
|
+
await (0, test_1.expect)(this.page.getByTestId(`variable-${variableName}`)).toBeVisible({ timeout: 8000 });
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
console.log(`assertResultVariableVisibleWithRetry attempt ${attempt + 1}/${maxRetries} failed: ${error}`);
|
|
182
|
+
if (attempt < maxRetries - 1) {
|
|
183
|
+
await this.page.reload({ timeout: 10000 }).catch(() => { });
|
|
184
|
+
await (0, sleep_1.sleep)(2000);
|
|
185
|
+
}
|
|
162
186
|
}
|
|
163
187
|
}
|
|
164
|
-
throw new Error(`Failed to assert variable ${variableName} after ${maxRetries} attempts.`);
|
|
188
|
+
throw new Error(`Failed to assert variable ${variableName} visible after ${maxRetries} attempts.`);
|
|
165
189
|
}
|
|
166
190
|
async assertActiveTokenIsPresent() {
|
|
167
191
|
await (0, test_1.expect)(this.activeIcon).toBeVisible({ timeout: 60000 });
|
|
@@ -129,7 +129,7 @@ SM_8_10_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
129
129
|
});
|
|
130
130
|
console.log(`[${testInfo.title}] Test end: timeout = ${testInfo.timeout}`);
|
|
131
131
|
});
|
|
132
|
-
(0, SM_8_10_1.test)('Most Common REST Connector User Flow @tasklistV2', async ({
|
|
132
|
+
(0, SM_8_10_1.test)('Most Common REST Connector User Flow @tasklistV2', async ({ context, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessesPage, operateProcessInstancePage, connectorMarketplacePage, }, testInfo) => {
|
|
133
133
|
// Skipped only for AG to unblock until failure is investigated
|
|
134
134
|
SM_8_10_1.test.skip(process.env.IS_AG === 'true', 'Skipping Most Common REST Connector User Flow for AG unblock while failure is investigated');
|
|
135
135
|
console.log(`[${testInfo.title}] Test start: timeout = ${testInfo.timeout}`);
|
|
@@ -152,11 +152,8 @@ SM_8_10_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
152
152
|
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
153
153
|
const result = await operateProcessInstancePage.assertEitherIncidentOrCompletedIconVisible();
|
|
154
154
|
(0, test_1.expect)(result).toBe('completed');
|
|
155
|
-
await
|
|
156
|
-
|
|
157
|
-
});
|
|
158
|
-
(0, test_1.expect)((await operateProcessInstancePage.connectorResultVariableName('message')).isVisible()).toBeTruthy();
|
|
159
|
-
await (0, test_1.expect)(page.getByTestId('variable-message').getByText('"Message from Mock!"')).toBeVisible({ timeout: 60000 });
|
|
155
|
+
await operateProcessInstancePage.assertResultVariableVisibleWithRetry('message');
|
|
156
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('message', '"Message from Mock!"');
|
|
160
157
|
});
|
|
161
158
|
console.log(`[${testInfo.title}] Test end: timeout = ${testInfo.timeout}`);
|
|
162
159
|
});
|