@camunda/e2e-test-suite 0.0.465 → 0.0.467
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.
|
@@ -20,6 +20,7 @@ declare class OperateProcessesPage {
|
|
|
20
20
|
private uncheckActiveCheckbox;
|
|
21
21
|
private toggleActiveCheckboxOn;
|
|
22
22
|
private toggleCompletedCheckbox;
|
|
23
|
+
private applyProcessStateFilter;
|
|
23
24
|
private checkTableForProcess;
|
|
24
25
|
clickProcessActiveCheckbox(): Promise<void>;
|
|
25
26
|
clickProcessCompletedCheckbox(): Promise<void>;
|
|
@@ -61,7 +61,7 @@ class OperateProcessesPage {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
async uncheckCheckbox(checkbox) {
|
|
64
|
-
await
|
|
64
|
+
await checkbox.waitFor({ state: 'visible', timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
65
65
|
if (await checkbox.isChecked()) {
|
|
66
66
|
await checkbox.click();
|
|
67
67
|
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
@@ -109,20 +109,26 @@ class OperateProcessesPage {
|
|
|
109
109
|
await (0, sleep_1.sleep)(200);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
async applyProcessStateFilter(type) {
|
|
113
|
+
if (type === 'active') {
|
|
114
|
+
await this.toggleActiveCheckboxOn();
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
await this.toggleCompletedCheckbox();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
112
120
|
async checkTableForProcess(processName) {
|
|
113
121
|
try {
|
|
114
122
|
const processTable = this.page.locator('[aria-label="Process Instances Panel"]');
|
|
115
123
|
await (0, test_1.expect)(processTable).toBeVisible({ timeout: constants_1._1_SECOND_IN_MS * 4 });
|
|
116
|
-
const timeout = env_1.isOpenSearch
|
|
117
|
-
? constants_1._1_SECOND_IN_MS * 10
|
|
118
|
-
: constants_1._1_SECOND_IN_MS * 2;
|
|
124
|
+
const timeout = env_1.isOpenSearch ? constants_1._1_MINUTE_IN_MS : constants_1._1_SECOND_IN_MS * 20;
|
|
119
125
|
const row = this.page.locator(`tr:has-text("${processName}")`).first();
|
|
120
126
|
await (0, test_1.expect)(row).toBeVisible({ timeout });
|
|
121
127
|
const link = row.locator('a').first();
|
|
122
128
|
await (0, test_1.expect)(link).toBeVisible({ timeout: constants_1._1_SECOND_IN_MS * 2 });
|
|
123
129
|
await link.scrollIntoViewIfNeeded();
|
|
124
130
|
await link.click({ timeout: constants_1._1_SECOND_IN_MS * 2 });
|
|
125
|
-
await (0, test_1.expect)(this.page.getByText('Instance History').first()).toBeVisible({ timeout: constants_1._1_SECOND_IN_MS *
|
|
131
|
+
await (0, test_1.expect)(this.page.getByText('Instance History').first()).toBeVisible({ timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
126
132
|
if (await this.whatsNewPopUp.isVisible()) {
|
|
127
133
|
await this.gotItButton.click();
|
|
128
134
|
}
|
|
@@ -195,20 +201,16 @@ class OperateProcessesPage {
|
|
|
195
201
|
});
|
|
196
202
|
}
|
|
197
203
|
async clickProcessInstanceLink(processName, type = 'active') {
|
|
204
|
+
await this.applyProcessStateFilter(type);
|
|
198
205
|
if (await this.checkTableForProcess(processName)) {
|
|
199
206
|
return;
|
|
200
207
|
}
|
|
201
|
-
const MAX_ATTEMPTS =
|
|
208
|
+
const MAX_ATTEMPTS = 30;
|
|
202
209
|
const TOTAL_TIMEOUT_MS = constants_1._1_MINUTE_IN_MS * 6;
|
|
203
210
|
let attempt = 0;
|
|
204
211
|
let lastError;
|
|
205
212
|
const startTime = Date.now();
|
|
206
|
-
|
|
207
|
-
await this.toggleActiveCheckboxOn();
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
await this.toggleCompletedCheckbox();
|
|
211
|
-
}
|
|
213
|
+
const operateUrl = this.page.url();
|
|
212
214
|
while (Date.now() - startTime < TOTAL_TIMEOUT_MS &&
|
|
213
215
|
attempt < MAX_ATTEMPTS) {
|
|
214
216
|
attempt++;
|
|
@@ -216,42 +218,35 @@ class OperateProcessesPage {
|
|
|
216
218
|
if (await this.checkTableForProcess(processName)) {
|
|
217
219
|
return;
|
|
218
220
|
}
|
|
219
|
-
throw new Error(`
|
|
221
|
+
throw new Error(`Instance "${processName}" not found in table (attempt ${attempt}).`);
|
|
220
222
|
}
|
|
221
223
|
catch (err) {
|
|
222
224
|
lastError = err instanceof Error ? err.message : err;
|
|
223
225
|
console.log(`clickProcessInstanceLink attempt ${attempt}: ${String(lastError)}`);
|
|
226
|
+
await (0, sleep_1.sleep)(constants_1._1_SECOND_IN_MS * 3);
|
|
224
227
|
await this.page
|
|
225
228
|
.reload({ timeout: 30000 })
|
|
226
229
|
.catch(() => console.log('Page reload timed out, continuing...'));
|
|
227
230
|
await this.page
|
|
228
231
|
.waitForLoadState('networkidle', { timeout: 30000 })
|
|
229
232
|
.catch(() => console.log('waitForLoadState networkidle timed out, continuing...'));
|
|
230
|
-
|
|
231
|
-
// After reload, check if page redirected away from Operate
|
|
233
|
+
// After reload, the page may redirect away from Operate
|
|
232
234
|
if (!this.page.url().includes('/operate')) {
|
|
233
|
-
const operatePath = (process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration') +
|
|
234
|
-
'/operate';
|
|
235
235
|
await this.page
|
|
236
|
-
.goto(
|
|
236
|
+
.goto(operateUrl, { timeout: 30000 })
|
|
237
237
|
.catch(() => console.log('Navigation to Operate timed out, continuing...'));
|
|
238
238
|
await this.page
|
|
239
239
|
.waitForLoadState('networkidle', { timeout: 30000 })
|
|
240
240
|
.catch(() => console.log('waitForLoadState after Operate navigation timed out, continuing...'));
|
|
241
|
-
await (0, sleep_1.sleep)(2000);
|
|
242
241
|
}
|
|
242
|
+
// Re-apply checkbox filter lost after reload
|
|
243
243
|
try {
|
|
244
|
-
|
|
245
|
-
await this.toggleActiveCheckboxOn();
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
await this.toggleCompletedCheckbox();
|
|
249
|
-
}
|
|
244
|
+
await this.applyProcessStateFilter(type);
|
|
250
245
|
}
|
|
251
246
|
catch (toggleErr) {
|
|
252
|
-
// Toggle may fail if page state is unexpected; continue to next retry
|
|
253
247
|
console.log(`Checkbox toggle failed after reload: ${String(toggleErr)}`);
|
|
254
248
|
}
|
|
249
|
+
await (0, sleep_1.sleep)(2000);
|
|
255
250
|
}
|
|
256
251
|
}
|
|
257
252
|
throw new Error(`Failed to open instance "${processName}" after ${attempt} attempts (${Math.round((Date.now() - startTime) / 1000)}s elapsed). Last error: ${String(lastError)}`);
|
|
@@ -274,7 +269,7 @@ class OperateProcessesPage {
|
|
|
274
269
|
catch (error) {
|
|
275
270
|
retryCount++;
|
|
276
271
|
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
277
|
-
await this.page.reload();
|
|
272
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
278
273
|
await this.page.waitForTimeout(10000);
|
|
279
274
|
}
|
|
280
275
|
}
|
|
@@ -13,7 +13,6 @@ const UtilitiesPage_1 = require("../../pages/8.10/UtilitiesPage");
|
|
|
13
13
|
const OptimizeHomePage_1 = require("../../pages/8.10/OptimizeHomePage");
|
|
14
14
|
const OptimizeCollectionsPage_1 = require("../../pages/8.10/OptimizeCollectionsPage");
|
|
15
15
|
const OptimizeReportPage_1 = require("../../pages/8.10/OptimizeReportPage");
|
|
16
|
-
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
17
16
|
const users_1 = require("../../utils/users");
|
|
18
17
|
const sleep_1 = require("../../utils/sleep");
|
|
19
18
|
const constants_1 = require("../../utils/constants");
|
|
@@ -204,18 +203,14 @@ _8_10_1.test.describe('Smoke Tests', () => {
|
|
|
204
203
|
const operateTab = await page.waitForEvent('popup', {
|
|
205
204
|
timeout: constants_1.TIMEOUT.navigation,
|
|
206
205
|
});
|
|
207
|
-
const operateHomePage = new OperateHomePage_1.OperateHomePage(operateTab);
|
|
208
|
-
const operateProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(operateTab);
|
|
209
206
|
const operateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
210
|
-
await
|
|
211
|
-
await
|
|
212
|
-
await
|
|
213
|
-
await (0,
|
|
214
|
-
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(operateTab, operateProcessInstancePage.variablesList, { totalTimeout: constants_1.TIMEOUT.navigation, maxRetries: 5 });
|
|
215
|
-
await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('message')).toBeVisible({ timeout: constants_1.TIMEOUT.short });
|
|
207
|
+
await operateProcessInstancePage.closePopOverIfVisible();
|
|
208
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateProcessInstancePage, operateProcessInstancePage.completedIcon, 'completed icon in Operate', constants_1.TIMEOUT.processComplete);
|
|
209
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTab, operateProcessInstancePage.variablesList, 'variable list in Operate', constants_1.TIMEOUT.navigation);
|
|
210
|
+
await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('message')).toBeVisible({ timeout: constants_1.TIMEOUT.navigation });
|
|
216
211
|
await (0, test_1.expect)(operateProcessInstancePage
|
|
217
212
|
.connectorResultVariableName('message')
|
|
218
|
-
.getByText('"Message from Mock!"')).toBeVisible({ timeout: constants_1.TIMEOUT.
|
|
213
|
+
.getByText('"Message from Mock!"')).toBeVisible({ timeout: constants_1.TIMEOUT.navigation });
|
|
219
214
|
});
|
|
220
215
|
});
|
|
221
216
|
});
|
|
@@ -9,6 +9,7 @@ const loggingUtils_1 = require("../../utils/loggingUtils");
|
|
|
9
9
|
const resetSession_1 = require("../../utils/resetSession");
|
|
10
10
|
const KeycloakUtils_1 = require("../../pages/SM-8.9/KeycloakUtils");
|
|
11
11
|
const sleep_1 = require("../../utils/sleep");
|
|
12
|
+
const env_1 = require("../../utils/env");
|
|
12
13
|
SM_8_9_1.test.describe.parallel('Smoke Tests', () => {
|
|
13
14
|
SM_8_9_1.test.beforeEach(async ({ navigationPage, managementIdentityPage, managementIdentityTenantPage, keycloakLoginPage, keycloakAdminPage, page, browser, loginPage, ocIdentityHomePage, ocIdentityRolesPage, }, testInfo) => {
|
|
14
15
|
if (process.env.IS_MIGRATION === 'true') {
|
|
@@ -131,6 +132,7 @@ SM_8_9_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
131
132
|
console.log(`[${testInfo.title}] Test end: timeout = ${testInfo.timeout}`);
|
|
132
133
|
});
|
|
133
134
|
(0, SM_8_9_1.test)('Most Common REST Connector User Flow @tasklistV2', async ({ context, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessesPage, operateProcessInstancePage, connectorMarketplacePage, }, testInfo) => {
|
|
135
|
+
SM_8_9_1.test.setTimeout(env_1.isOpenSearch ? 18 * 60 * 1000 : 12 * 60 * 1000);
|
|
134
136
|
console.log(`[${testInfo.title}] Test start: timeout = ${testInfo.timeout}`);
|
|
135
137
|
const processName = 'REST_Connector_Basic_Auth_Process' +
|
|
136
138
|
(await (0, _setup_1.generateRandomStringAsync)(3));
|