@camunda/e2e-test-suite 0.0.461 → 0.0.462
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.
- package/dist/tests/8.9/optimize-api-tests.spec.js +169 -0
- package/dist/tests/8.9/rba-enabled-v1-user-flows.spec.js +46 -19
- package/dist/tests/8.9/rba-enabled-v2-user-flows.spec.js +41 -25
- package/dist/tests/8.9/smoke-tests.spec.js +116 -93
- package/dist/tests/8.9/utr-enabled-user-flows.spec.js +47 -11
- package/dist/tests/SM-8.9/optimize-user-flows.spec.js +281 -0
- package/dist/tests/SM-8.9/web-modeler-user-flows.spec.js +19 -0
- package/package.json +1 -1
|
@@ -266,3 +266,172 @@ _8_9_1.test.describe('API optimize SaaS Tests', () => {
|
|
|
266
266
|
(0, test_1.expect)(status).toBe(404);
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
|
+
_8_9_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
|
|
270
|
+
let optimizeCookie;
|
|
271
|
+
let optimizeBearerToken;
|
|
272
|
+
let conditionalEventsCollectionId;
|
|
273
|
+
let conditionalEventsReportId;
|
|
274
|
+
let baseUrl;
|
|
275
|
+
const CONDITIONAL_EVENTS_PROCESS_KEY = 'conditional-events-auto-process';
|
|
276
|
+
_8_9_1.test.beforeAll(async ({ browser, request }) => {
|
|
277
|
+
const page = await browser.newPage();
|
|
278
|
+
optimizeCookie = await (0, apiHelpers_1.getOptimizeCoockie)(page);
|
|
279
|
+
await page.close();
|
|
280
|
+
optimizeBearerToken = await (0, apiHelpers_1.authSaasAPI)(process.env.OPTIMIZE_API_TOKEN_AUDIENCE);
|
|
281
|
+
conditionalEventsCollectionId = await (0, apiHelpers_1.createCollection)(request, {
|
|
282
|
+
name: await (0, randomName_1.randomNameAgregator)('Conditional Events Collection'),
|
|
283
|
+
optimizeCookie,
|
|
284
|
+
});
|
|
285
|
+
await (0, apiHelpers_1.updateCollectionScope)(request, {
|
|
286
|
+
optimizeCookie,
|
|
287
|
+
collectionId: conditionalEventsCollectionId,
|
|
288
|
+
data: [
|
|
289
|
+
{
|
|
290
|
+
definitionKey: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
291
|
+
definitionType: 'process',
|
|
292
|
+
tenants: ['<default>'],
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
});
|
|
296
|
+
conditionalEventsReportId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
|
|
297
|
+
optimizeCookie,
|
|
298
|
+
collectionId: conditionalEventsCollectionId,
|
|
299
|
+
name: await (0, randomName_1.randomNameAgregator)('Conditional Events Report'),
|
|
300
|
+
definitions: [
|
|
301
|
+
{
|
|
302
|
+
key: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
303
|
+
filter: [],
|
|
304
|
+
groupBy: { type: 'none', value: null },
|
|
305
|
+
distributedBy: { type: 'none', value: null },
|
|
306
|
+
view: { entity: 'processInstance', properties: ['frequency'] },
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
});
|
|
310
|
+
baseUrl = process.env.CAMUNDA_OPTIMIZE_BASE_URL;
|
|
311
|
+
});
|
|
312
|
+
(0, _8_9_1.test)('CE-OPT-09: Creating a Process Report for Conditional Events via API returns HTTP 200', async ({ request, }) => {
|
|
313
|
+
await _8_9_1.test.step('Create a process report for conditional-events-auto-process (200)', async () => {
|
|
314
|
+
const response = await request.post(`${baseUrl}/api/report/process/single`, {
|
|
315
|
+
headers: {
|
|
316
|
+
Cookie: optimizeCookie,
|
|
317
|
+
'Content-Type': 'application/json',
|
|
318
|
+
},
|
|
319
|
+
data: {
|
|
320
|
+
collectionId: conditionalEventsCollectionId,
|
|
321
|
+
name: await (0, randomName_1.randomNameAgregator)('CE Report Inline'),
|
|
322
|
+
description: null,
|
|
323
|
+
data: {},
|
|
324
|
+
configuration: {
|
|
325
|
+
definitions: [
|
|
326
|
+
{
|
|
327
|
+
key: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
328
|
+
filter: [],
|
|
329
|
+
groupBy: { type: 'none', value: null },
|
|
330
|
+
distributedBy: { type: 'none', value: null },
|
|
331
|
+
view: {
|
|
332
|
+
entity: 'processInstance',
|
|
333
|
+
properties: ['frequency'],
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
visualization: null,
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
342
|
+
const body = await response.json();
|
|
343
|
+
(0, test_1.expect)(body).toHaveProperty('id');
|
|
344
|
+
(0, test_1.expect)(body.id).toBeTruthy();
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
(0, _8_9_1.test)('CE-OPT-10: Exporting the Conditional Events report definition via API returns the full report payload', async ({ request, }) => {
|
|
348
|
+
await _8_9_1.test.step('Export report definition successfully (200)', async () => {
|
|
349
|
+
const response = await request.post(`${baseUrl}/api/public/export/report/definition/json`, {
|
|
350
|
+
headers: {
|
|
351
|
+
Authorization: optimizeBearerToken,
|
|
352
|
+
'Content-Type': 'application/json',
|
|
353
|
+
},
|
|
354
|
+
data: [conditionalEventsReportId],
|
|
355
|
+
});
|
|
356
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
357
|
+
const body = await response.json();
|
|
358
|
+
(0, test_1.expect)(Array.isArray(body)).toBeTruthy();
|
|
359
|
+
(0, test_1.expect)(body.length).toBeGreaterThan(0);
|
|
360
|
+
(0, test_1.expect)(body[0]).toHaveProperty('id');
|
|
361
|
+
(0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
|
|
362
|
+
(0, test_1.expect)(body[0]).toHaveProperty('name');
|
|
363
|
+
(0, test_1.expect)(body[0]).toHaveProperty('collectionId');
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
(0, _8_9_1.test)('CE-OPT-11: Exporting the Conditional Events report without a token returns 401', async ({ request, }) => {
|
|
367
|
+
await _8_9_1.test.step('Export report definition without Authorization header (401)', async () => {
|
|
368
|
+
const response = await request.post(`${baseUrl}/api/public/export/report/definition/json`, {
|
|
369
|
+
headers: { 'Content-Type': 'application/json' },
|
|
370
|
+
data: [conditionalEventsReportId],
|
|
371
|
+
});
|
|
372
|
+
(0, test_1.expect)(response.status()).toBe(401);
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
(0, _8_9_1.test)('CE-OPT-12: Exporting the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
|
|
376
|
+
await _8_9_1.test.step('Export report definition with invalid token (401)', async () => {
|
|
377
|
+
const response = await request.post(`${baseUrl}/api/public/export/report/definition/json`, {
|
|
378
|
+
headers: {
|
|
379
|
+
Authorization: 'Bearer invalid_token',
|
|
380
|
+
'Content-Type': 'application/json',
|
|
381
|
+
},
|
|
382
|
+
data: [conditionalEventsReportId],
|
|
383
|
+
});
|
|
384
|
+
(0, test_1.expect)(response.status()).toBe(401);
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
(0, _8_9_1.test)('CE-OPT-13: Deleting the Conditional Events report via API succeeds with HTTP 200', async ({ request, }) => {
|
|
388
|
+
const reportToDeleteId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
|
|
389
|
+
optimizeCookie,
|
|
390
|
+
collectionId: conditionalEventsCollectionId,
|
|
391
|
+
name: await (0, randomName_1.randomNameAgregator)('CE Report To Delete'),
|
|
392
|
+
definitions: [
|
|
393
|
+
{
|
|
394
|
+
key: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
395
|
+
filter: [],
|
|
396
|
+
groupBy: { type: 'none', value: null },
|
|
397
|
+
distributedBy: { type: 'none', value: null },
|
|
398
|
+
view: { entity: 'processInstance', properties: ['frequency'] },
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
});
|
|
402
|
+
await _8_9_1.test.step('Delete report successfully (200)', async () => {
|
|
403
|
+
const response = await request.delete(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
|
|
404
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
(0, _8_9_1.test)('CE-OPT-14: A deleted Conditional Events report is no longer retrievable via the API', async ({ request, }) => {
|
|
408
|
+
const reportToDeleteId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
|
|
409
|
+
optimizeCookie,
|
|
410
|
+
collectionId: conditionalEventsCollectionId,
|
|
411
|
+
name: await (0, randomName_1.randomNameAgregator)('CE Report Delete Verify'),
|
|
412
|
+
definitions: [
|
|
413
|
+
{
|
|
414
|
+
key: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
415
|
+
filter: [],
|
|
416
|
+
groupBy: { type: 'none', value: null },
|
|
417
|
+
distributedBy: { type: 'none', value: null },
|
|
418
|
+
view: { entity: 'processInstance', properties: ['frequency'] },
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
});
|
|
422
|
+
await _8_9_1.test.step('Delete the report', async () => {
|
|
423
|
+
const deleteResponse = await request.delete(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
|
|
424
|
+
await (0, apiHelpers_1.assertResponseStatus)(deleteResponse, 200);
|
|
425
|
+
});
|
|
426
|
+
await _8_9_1.test.step('Verify deleted report is no longer retrievable (404 or 500)', async () => {
|
|
427
|
+
const getResponse = await request.get(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
|
|
428
|
+
(0, test_1.expect)([404, 500]).toContain(getResponse.status());
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
(0, _8_9_1.test)('CE-OPT-15: Attempting to delete the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
|
|
432
|
+
await _8_9_1.test.step('Delete report with invalid token (401)', async () => {
|
|
433
|
+
const response = await request.delete(`${baseUrl}/api/public/report/${conditionalEventsReportId}`, { headers: { Authorization: 'Bearer invalid_token' } });
|
|
434
|
+
(0, test_1.expect)(response.status()).toBe(401);
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
});
|
|
@@ -5,9 +5,9 @@ const _8_9_1 = require("../../fixtures/8.9");
|
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
6
|
const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
|
|
7
7
|
const sleep_1 = require("../../utils/sleep");
|
|
8
|
-
const resetSession_1 = require("../../utils/resetSession");
|
|
9
8
|
const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
|
|
10
9
|
const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
|
|
10
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
11
11
|
const users_1 = require("../../utils/users");
|
|
12
12
|
const mainUser = (0, users_1.getTestUser)('twentyFifthUser');
|
|
13
13
|
_8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
@@ -29,7 +29,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
29
29
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
30
30
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
31
31
|
});
|
|
32
|
-
(0, _8_9_1.test)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage,
|
|
32
|
+
(0, _8_9_1.test)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, settingsPage, }, testInfo) => {
|
|
33
33
|
_8_9_1.test.slow();
|
|
34
34
|
const clusterName = clusterNames[testInfo.title];
|
|
35
35
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -67,7 +67,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
67
67
|
await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.authorizationAllPermissions)(role));
|
|
68
68
|
});
|
|
69
69
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
70
|
-
await (
|
|
70
|
+
await page.context().clearCookies();
|
|
71
|
+
await page.evaluate(() => {
|
|
72
|
+
localStorage.clear();
|
|
73
|
+
sessionStorage.clear();
|
|
74
|
+
});
|
|
75
|
+
await page.goto('/');
|
|
71
76
|
await loginPage.loginWithTestUser(testUser);
|
|
72
77
|
});
|
|
73
78
|
await _8_9_1.test.step('Navigate to Web Modeler', async () => {
|
|
@@ -100,7 +105,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
100
105
|
await (0, sleep_1.sleep)(20000);
|
|
101
106
|
});
|
|
102
107
|
await _8_9_1.test.step('Login as Test User', async () => {
|
|
103
|
-
await (
|
|
108
|
+
await page.context().clearCookies();
|
|
109
|
+
await page.evaluate(() => {
|
|
110
|
+
localStorage.clear();
|
|
111
|
+
sessionStorage.clear();
|
|
112
|
+
});
|
|
113
|
+
await page.goto('/');
|
|
104
114
|
await loginPage.loginWithTestUser(testUser);
|
|
105
115
|
});
|
|
106
116
|
await _8_9_1.test.step('Navigate to Tasklist and Make Sure that the Two Deployed Processes Are Accessible', async () => {
|
|
@@ -145,7 +155,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
145
155
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, { shouldBeVisible: false });
|
|
146
156
|
});
|
|
147
157
|
});
|
|
148
|
-
(0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage,
|
|
158
|
+
(0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
|
|
149
159
|
_8_9_1.test.slow();
|
|
150
160
|
const clusterName = clusterNames[testInfo.title];
|
|
151
161
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -190,7 +200,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
190
200
|
await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.roleAllAuthorization)(role1));
|
|
191
201
|
});
|
|
192
202
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
193
|
-
await (
|
|
203
|
+
await page.context().clearCookies();
|
|
204
|
+
await page.evaluate(() => {
|
|
205
|
+
localStorage.clear();
|
|
206
|
+
sessionStorage.clear();
|
|
207
|
+
});
|
|
208
|
+
await page.goto('/');
|
|
194
209
|
});
|
|
195
210
|
await _8_9_1.test.step('Login as Test User', async () => {
|
|
196
211
|
await loginPage.loginWithTestUser(testUser);
|
|
@@ -225,14 +240,22 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
225
240
|
await (0, sleep_1.sleep)(20000);
|
|
226
241
|
});
|
|
227
242
|
await _8_9_1.test.step('Login as Test User', async () => {
|
|
228
|
-
await (
|
|
243
|
+
await page.context().clearCookies();
|
|
244
|
+
await page.evaluate(() => {
|
|
245
|
+
localStorage.clear();
|
|
246
|
+
sessionStorage.clear();
|
|
247
|
+
});
|
|
248
|
+
await page.goto('/');
|
|
229
249
|
await loginPage.loginWithTestUser(testUser);
|
|
230
250
|
});
|
|
231
251
|
await _8_9_1.test.step('Navigate to Tasklist and Both Processes Are Accessible', async () => {
|
|
232
252
|
await appsPage.clickCamundaApps();
|
|
233
253
|
await appsPage.clickTasklist(clusterName);
|
|
234
|
-
await (0,
|
|
235
|
-
|
|
254
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, taskPanelPage.taskListPageBanner, {
|
|
255
|
+
visibilityTimeout: 20000,
|
|
256
|
+
postAction: async () => {
|
|
257
|
+
await page.reload();
|
|
258
|
+
},
|
|
236
259
|
});
|
|
237
260
|
await taskPanelPage.clickProcessesTab();
|
|
238
261
|
await taskProcessesPage.clickpopupContinueButton();
|
|
@@ -334,18 +357,17 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
334
357
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process1);
|
|
335
358
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
|
|
336
359
|
});
|
|
337
|
-
await _8_9_1.test.step('Assert
|
|
338
|
-
await taskPanelPage.clickTasksTab();
|
|
339
|
-
const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
|
|
340
|
-
const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
|
|
360
|
+
await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
|
|
341
361
|
await taskPanelPage.clickProcessesTab();
|
|
342
362
|
await taskProcessesPage.startProcess(process1);
|
|
343
|
-
const
|
|
344
|
-
(0, test_1.expect)(
|
|
363
|
+
const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
|
|
364
|
+
(0, test_1.expect)(firstProcessTaskCount).toBe(2);
|
|
365
|
+
});
|
|
366
|
+
await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
|
|
345
367
|
await taskPanelPage.clickProcessesTab();
|
|
346
368
|
await taskProcessesPage.startProcess(process2);
|
|
347
|
-
const
|
|
348
|
-
(0, test_1.expect)(
|
|
369
|
+
const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
|
|
370
|
+
(0, test_1.expect)(secondProcessTaskCount).toBe(2);
|
|
349
371
|
});
|
|
350
372
|
await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
|
|
351
373
|
await appsPage.clickCamundaApps();
|
|
@@ -358,7 +380,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
358
380
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
|
|
359
381
|
});
|
|
360
382
|
});
|
|
361
|
-
(0, _8_9_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage,
|
|
383
|
+
(0, _8_9_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, }, testInfo) => {
|
|
362
384
|
_8_9_1.test.slow();
|
|
363
385
|
const clusterName = clusterNames[testInfo.title];
|
|
364
386
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -398,7 +420,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV1', () => {
|
|
|
398
420
|
await (0, sleep_1.sleep)(15000);
|
|
399
421
|
});
|
|
400
422
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
401
|
-
await (
|
|
423
|
+
await page.context().clearCookies();
|
|
424
|
+
await page.evaluate(() => {
|
|
425
|
+
localStorage.clear();
|
|
426
|
+
sessionStorage.clear();
|
|
427
|
+
});
|
|
428
|
+
await page.goto('/');
|
|
402
429
|
await loginPage.loginWithTestUser(testUser);
|
|
403
430
|
});
|
|
404
431
|
await _8_9_1.test.step('Navigate to Web Modeler', async () => {
|
|
@@ -5,7 +5,6 @@ const _8_9_1 = require("../../fixtures/8.9");
|
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
6
|
const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
|
|
7
7
|
const sleep_1 = require("../../utils/sleep");
|
|
8
|
-
const resetSession_1 = require("../../utils/resetSession");
|
|
9
8
|
const roleAuthorizations_1 = require("../../utils/roleAuthorizations");
|
|
10
9
|
const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
|
|
11
10
|
const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
|
|
@@ -31,7 +30,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
31
30
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
32
31
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
33
32
|
});
|
|
34
|
-
(0, _8_9_1.test)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage,
|
|
33
|
+
(0, _8_9_1.test)('RBA On User Flow - No User Permission', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, settingsPage, }, testInfo) => {
|
|
35
34
|
_8_9_1.test.slow();
|
|
36
35
|
const clusterName = clusterNames[testInfo.title];
|
|
37
36
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -69,7 +68,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
69
68
|
await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.authorizationAllPermissions)(role));
|
|
70
69
|
});
|
|
71
70
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
72
|
-
await (
|
|
71
|
+
await page.context().clearCookies();
|
|
72
|
+
await page.evaluate(() => {
|
|
73
|
+
localStorage.clear();
|
|
74
|
+
sessionStorage.clear();
|
|
75
|
+
});
|
|
76
|
+
await page.goto('/');
|
|
73
77
|
await loginPage.loginWithTestUser(testUser);
|
|
74
78
|
});
|
|
75
79
|
await _8_9_1.test.step('Navigate to Web Modeler', async () => {
|
|
@@ -102,7 +106,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
102
106
|
await (0, sleep_1.sleep)(20000);
|
|
103
107
|
});
|
|
104
108
|
await _8_9_1.test.step('Login as Test User', async () => {
|
|
105
|
-
await (
|
|
109
|
+
await page.context().clearCookies();
|
|
110
|
+
await page.evaluate(() => {
|
|
111
|
+
localStorage.clear();
|
|
112
|
+
sessionStorage.clear();
|
|
113
|
+
});
|
|
114
|
+
await page.goto('/');
|
|
106
115
|
await loginPage.loginWithTestUser(testUser);
|
|
107
116
|
});
|
|
108
117
|
await _8_9_1.test.step('Navigate to Tasklist and Make Sure that the Two Deployed Processes Are Not Accessible', async () => {
|
|
@@ -127,7 +136,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
127
136
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2, { shouldBeVisible: false });
|
|
128
137
|
});
|
|
129
138
|
});
|
|
130
|
-
(0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage,
|
|
139
|
+
(0, _8_9_1.test)('RBA On User Flow - Permission for One Process', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, loginPage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, settingsPage, }, testInfo) => {
|
|
131
140
|
_8_9_1.test.slow();
|
|
132
141
|
const clusterName = clusterNames[testInfo.title];
|
|
133
142
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -172,7 +181,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
172
181
|
await ocIdentityAuthorizationsPage.createAuthorization((0, roleAuthorizations_1.roleAllAuthorization)(role1));
|
|
173
182
|
});
|
|
174
183
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
175
|
-
await (
|
|
184
|
+
await page.context().clearCookies();
|
|
185
|
+
await page.evaluate(() => {
|
|
186
|
+
localStorage.clear();
|
|
187
|
+
sessionStorage.clear();
|
|
188
|
+
});
|
|
189
|
+
await page.goto('/');
|
|
176
190
|
});
|
|
177
191
|
await _8_9_1.test.step('Login as Test User', async () => {
|
|
178
192
|
await loginPage.loginWithTestUser(testUser);
|
|
@@ -207,7 +221,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
207
221
|
await (0, sleep_1.sleep)(20000);
|
|
208
222
|
});
|
|
209
223
|
await _8_9_1.test.step('Login as Test User', async () => {
|
|
210
|
-
await (
|
|
224
|
+
await page.context().clearCookies();
|
|
225
|
+
await page.evaluate(() => {
|
|
226
|
+
localStorage.clear();
|
|
227
|
+
sessionStorage.clear();
|
|
228
|
+
});
|
|
229
|
+
await page.goto('/');
|
|
211
230
|
await loginPage.loginWithTestUser(testUser);
|
|
212
231
|
});
|
|
213
232
|
await _8_9_1.test.step('Navigate to Tasklist and Only First Process Is Accessible', async () => {
|
|
@@ -319,20 +338,16 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
319
338
|
await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
|
|
320
339
|
});
|
|
321
340
|
await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
|
|
322
|
-
await taskPanelPage.clickTasksTab();
|
|
323
|
-
const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
|
|
324
341
|
await taskPanelPage.clickProcessesTab();
|
|
325
342
|
await taskProcessesPage.startProcess(process1);
|
|
326
|
-
const
|
|
327
|
-
(0, test_1.expect)(
|
|
343
|
+
const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
|
|
344
|
+
(0, test_1.expect)(firstProcessTaskCount).toBe(2);
|
|
328
345
|
});
|
|
329
346
|
await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
|
|
330
|
-
await taskPanelPage.clickTasksTab();
|
|
331
|
-
const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
|
|
332
347
|
await taskPanelPage.clickProcessesTab();
|
|
333
348
|
await taskProcessesPage.startProcess(process2);
|
|
334
|
-
const
|
|
335
|
-
(0, test_1.expect)(
|
|
349
|
+
const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
|
|
350
|
+
(0, test_1.expect)(secondProcessTaskCount).toBe(2);
|
|
336
351
|
});
|
|
337
352
|
await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
|
|
338
353
|
await appsPage.clickCamundaApps();
|
|
@@ -345,7 +360,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
345
360
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, process2);
|
|
346
361
|
});
|
|
347
362
|
});
|
|
348
|
-
(0, _8_9_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage,
|
|
363
|
+
(0, _8_9_1.test)('RBA On User Flow - Permission for Selected Processes Only', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, taskPanelPage, taskProcessesPage, operateHomePage, ocIdentityHomePage, ocIdentityAuthorizationsPage, ocIdentityRolesPage, loginPage, }, testInfo) => {
|
|
349
364
|
_8_9_1.test.slow();
|
|
350
365
|
const clusterName = clusterNames[testInfo.title];
|
|
351
366
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -385,7 +400,12 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
385
400
|
await (0, sleep_1.sleep)(20000);
|
|
386
401
|
});
|
|
387
402
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
388
|
-
await (
|
|
403
|
+
await page.context().clearCookies();
|
|
404
|
+
await page.evaluate(() => {
|
|
405
|
+
localStorage.clear();
|
|
406
|
+
sessionStorage.clear();
|
|
407
|
+
});
|
|
408
|
+
await page.goto('/');
|
|
389
409
|
await loginPage.loginWithTestUser(testUser);
|
|
390
410
|
});
|
|
391
411
|
await _8_9_1.test.step('Navigate to Web Modeler', async () => {
|
|
@@ -417,20 +437,16 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
|
|
|
417
437
|
await (0, expectTextWithPagination_1.expectTextWithPagination)(page, process2);
|
|
418
438
|
});
|
|
419
439
|
await _8_9_1.test.step('Assert First Process Can Be Started From Tasklist', async () => {
|
|
420
|
-
await taskPanelPage.clickTasksTab();
|
|
421
|
-
const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
|
|
422
440
|
await taskPanelPage.clickProcessesTab();
|
|
423
441
|
await taskProcessesPage.startProcess(process1);
|
|
424
|
-
const
|
|
425
|
-
(0, test_1.expect)(
|
|
442
|
+
const firstProcessTaskCount = await taskPanelPage.taskCount(process1);
|
|
443
|
+
(0, test_1.expect)(firstProcessTaskCount).toBe(2);
|
|
426
444
|
});
|
|
427
445
|
await _8_9_1.test.step('Assert Second Process Can Be Started From Tasklist', async () => {
|
|
428
|
-
await taskPanelPage.clickTasksTab();
|
|
429
|
-
const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
|
|
430
446
|
await taskPanelPage.clickProcessesTab();
|
|
431
447
|
await taskProcessesPage.startProcess(process2);
|
|
432
|
-
const
|
|
433
|
-
(0, test_1.expect)(
|
|
448
|
+
const secondProcessTaskCount = await taskPanelPage.taskCount(process2);
|
|
449
|
+
(0, test_1.expect)(secondProcessTaskCount).toBe(2);
|
|
434
450
|
});
|
|
435
451
|
await _8_9_1.test.step('Navigate to Operate and Assert Both Processes Are Accessible', async () => {
|
|
436
452
|
await appsPage.clickCamundaApps();
|
|
@@ -17,11 +17,19 @@ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLoc
|
|
|
17
17
|
const users_1 = require("../../utils/users");
|
|
18
18
|
const sleep_1 = require("../../utils/sleep");
|
|
19
19
|
const testUser = (0, users_1.getTestUser)('thirteenthUser');
|
|
20
|
+
const CLUSTER_NAME = 'Test Cluster';
|
|
21
|
+
const TIMEOUT = {
|
|
22
|
+
short: 15000,
|
|
23
|
+
medium: 30000,
|
|
24
|
+
navigation: 60000,
|
|
25
|
+
processActive: 300000,
|
|
26
|
+
processComplete: 120000,
|
|
27
|
+
optimizeImport: 120000,
|
|
28
|
+
};
|
|
29
|
+
// Use fixed names for upgrade testing validation, random names for regular testing
|
|
30
|
+
const useFixedNames = process.env.UPGRADE_BASELINE === 'true';
|
|
20
31
|
_8_9_1.test.describe.configure({ mode: 'parallel' });
|
|
21
32
|
_8_9_1.test.describe('Smoke Tests', () => {
|
|
22
|
-
const clusterName = 'Test Cluster';
|
|
23
|
-
// Use fixed names for upgrade testing validation, random names for regular testing
|
|
24
|
-
const useFixedNames = process.env.UPGRADE_BASELINE === 'true';
|
|
25
33
|
_8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
|
|
26
34
|
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
|
|
27
35
|
});
|
|
@@ -30,6 +38,7 @@ _8_9_1.test.describe('Smoke Tests', () => {
|
|
|
30
38
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
31
39
|
});
|
|
32
40
|
(0, _8_9_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, }) => {
|
|
41
|
+
_8_9_1.test.slow();
|
|
33
42
|
const randomString = useFixedNames
|
|
34
43
|
? 'UpgradeTest'
|
|
35
44
|
: await (0, _setup_1.generateRandomStringAsync)(3);
|
|
@@ -39,36 +48,39 @@ _8_9_1.test.describe('Smoke Tests', () => {
|
|
|
39
48
|
const reportName = useFixedNames
|
|
40
49
|
? 'UpgradeTestReport'
|
|
41
50
|
: await (0, _setup_1.generateRandomStringAsync)(5);
|
|
51
|
+
let appTab;
|
|
42
52
|
await _8_9_1.test.step('Navigate to Web Modeler', async () => {
|
|
43
53
|
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
44
|
-
timeout:
|
|
54
|
+
timeout: TIMEOUT.medium,
|
|
45
55
|
});
|
|
46
56
|
await appsPage.clickCamundaApps();
|
|
47
57
|
await appsPage.clickModeler();
|
|
48
58
|
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
49
|
-
timeout:
|
|
59
|
+
timeout: TIMEOUT.navigation,
|
|
50
60
|
});
|
|
51
61
|
});
|
|
52
|
-
await _8_9_1.test.step('Create
|
|
62
|
+
await _8_9_1.test.step('Create form to be linked for Zeebe user task', async () => {
|
|
53
63
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
54
64
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
55
65
|
await modelerHomePage.clickFormOption();
|
|
56
66
|
await modelerHomePage.enterFormName(formName);
|
|
57
67
|
await modelerHomePage.assertFormBreadcrumbVisible(formName);
|
|
58
|
-
await formJsPage.deployForm(
|
|
68
|
+
await formJsPage.deployForm(CLUSTER_NAME);
|
|
69
|
+
// Wait for the form to propagate to the cluster before it can be embedded
|
|
59
70
|
await (0, sleep_1.sleep)(5000);
|
|
60
71
|
});
|
|
61
|
-
await _8_9_1.test.step('Add
|
|
72
|
+
await _8_9_1.test.step('Add a BPMN template to the project', async () => {
|
|
62
73
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
63
74
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
64
75
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
65
76
|
});
|
|
66
|
-
await _8_9_1.test.step('Create BPMN
|
|
77
|
+
await _8_9_1.test.step('Create BPMN diagram with two Zeebe user tasks', async () => {
|
|
67
78
|
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
68
|
-
timeout:
|
|
79
|
+
timeout: TIMEOUT.navigation,
|
|
69
80
|
});
|
|
70
81
|
await modelerCreatePage.enterDiagramName(processName);
|
|
71
82
|
await modelerCreatePage.assertDiagramNameSet(processName);
|
|
83
|
+
// Wait for the diagram name change to auto-save before interacting with the canvas
|
|
72
84
|
await (0, sleep_1.sleep)(10000);
|
|
73
85
|
await modelerCreatePage.clickCanvas();
|
|
74
86
|
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
@@ -85,76 +97,89 @@ _8_9_1.test.describe('Smoke Tests', () => {
|
|
|
85
97
|
await modelerCreatePage.clickForm(formName);
|
|
86
98
|
await modelerCreatePage.clickEmbedButton();
|
|
87
99
|
await modelerCreatePage.assertFormEmbedded();
|
|
88
|
-
await modelerCreatePage.runProcessInstance(clusterName);
|
|
89
100
|
});
|
|
90
|
-
await _8_9_1.test.step('
|
|
101
|
+
await _8_9_1.test.step('Deploy, start process instance and verify it is active in Operate', async () => {
|
|
102
|
+
await modelerCreatePage.runProcessInstance(CLUSTER_NAME);
|
|
91
103
|
await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
|
|
92
|
-
timeout:
|
|
104
|
+
timeout: TIMEOUT.navigation,
|
|
93
105
|
});
|
|
94
106
|
await modelerCreatePage.clickViewProcessInstanceLink();
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const operateTabAppsPage = new AppsPage_1.AppsPage(operateTab);
|
|
100
|
-
const operateTabTaskPanelPage = new TaskPanelPage_1.TaskPanelPage(operateTab);
|
|
101
|
-
const operateTabTaskDetailsPage = new TaskDetailsPage_1.TaskDetailsPage(operateTab);
|
|
102
|
-
await (0, test_1.expect)(operateTabProcessInstancePage.activeIcon).toBeVisible({
|
|
103
|
-
timeout: 300000,
|
|
107
|
+
appTab = await page.waitForEvent('popup', { timeout: TIMEOUT.navigation });
|
|
108
|
+
const appTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(appTab);
|
|
109
|
+
await (0, test_1.expect)(appTabProcessInstancePage.activeIcon).toBeVisible({
|
|
110
|
+
timeout: TIMEOUT.processActive,
|
|
104
111
|
});
|
|
105
|
-
await
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
await
|
|
112
|
-
await
|
|
113
|
-
await
|
|
114
|
-
await (0,
|
|
115
|
-
await
|
|
116
|
-
await
|
|
117
|
-
await
|
|
118
|
-
await
|
|
119
|
-
await
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
await
|
|
128
|
-
await
|
|
129
|
-
await
|
|
130
|
-
|
|
131
|
-
await optimizeTabOptimizeReportPage.clickProcessSelectionButton();
|
|
132
|
-
await optimizeTabOptimizeReportPage.clickUserTaskProcess(processName);
|
|
133
|
-
await (0, test_1.expect)(optimizeTabOptimizeReportPage.versionSelection).toBeVisible({
|
|
134
|
-
timeout: 15000,
|
|
112
|
+
await appTabProcessInstancePage.closePopOverIfVisible();
|
|
113
|
+
});
|
|
114
|
+
await _8_9_1.test.step('Navigate to Tasklist and complete both user tasks', async () => {
|
|
115
|
+
const appTabAppsPage = new AppsPage_1.AppsPage(appTab);
|
|
116
|
+
const appTabTaskPanelPage = new TaskPanelPage_1.TaskPanelPage(appTab);
|
|
117
|
+
const appTabTaskDetailsPage = new TaskDetailsPage_1.TaskDetailsPage(appTab);
|
|
118
|
+
await appTabAppsPage.clickCamundaApps();
|
|
119
|
+
await appTabAppsPage.clickTasklist(CLUSTER_NAME);
|
|
120
|
+
await (0, UtilitiesPage_1.completeTaskWithRetry)(appTabTaskPanelPage, appTabTaskDetailsPage, `${userTaskName}1`, 'Medium');
|
|
121
|
+
await (0, UtilitiesPage_1.completeTaskWithRetry)(appTabTaskPanelPage, appTabTaskDetailsPage, `${userTaskName}2`, 'Medium');
|
|
122
|
+
await appTabTaskPanelPage.filterBy('Completed');
|
|
123
|
+
await appTabTaskPanelPage.openTask(`${userTaskName}1`);
|
|
124
|
+
await (0, test_1.expect)(appTabTaskDetailsPage.detailsInfo.getByText(`${userTaskName}1`)).toBeVisible({ timeout: TIMEOUT.medium });
|
|
125
|
+
await appTabTaskPanelPage.openTask(`${userTaskName}2`);
|
|
126
|
+
await (0, test_1.expect)(appTabTaskDetailsPage.detailsInfo.getByText(`${userTaskName}2`)).toBeVisible({ timeout: TIMEOUT.medium });
|
|
127
|
+
});
|
|
128
|
+
await _8_9_1.test.step('Assert process completion in Operate', async () => {
|
|
129
|
+
const appTabAppsPage = new AppsPage_1.AppsPage(appTab);
|
|
130
|
+
const appTabHomePage = new OperateHomePage_1.OperateHomePage(appTab);
|
|
131
|
+
const appTabProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(appTab);
|
|
132
|
+
const appTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(appTab);
|
|
133
|
+
await appTabAppsPage.clickCamundaApps();
|
|
134
|
+
await appTabAppsPage.clickOperate(CLUSTER_NAME);
|
|
135
|
+
await appTabHomePage.clickProcessesTab();
|
|
136
|
+
await (0, test_1.expect)(appTabProcessesPage.processCompletedCheckbox).toBeVisible({
|
|
137
|
+
timeout: TIMEOUT.short,
|
|
135
138
|
});
|
|
136
|
-
await
|
|
137
|
-
await
|
|
138
|
-
await
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
await appTabProcessesPage.clickProcessCompletedCheckbox();
|
|
140
|
+
await appTabProcessesPage.clickProcessInstanceLink(processName);
|
|
141
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(appTabProcessInstancePage, appTabProcessInstancePage.completedIcon, 'completed icon in Operate', TIMEOUT.processComplete);
|
|
142
|
+
});
|
|
143
|
+
await _8_9_1.test.step('Assert process imported in Optimize and create user task report', async () => {
|
|
144
|
+
const appTabAppsPage = new AppsPage_1.AppsPage(appTab);
|
|
145
|
+
const optimizeHomePage = new OptimizeHomePage_1.OptimizeHomePage(appTab);
|
|
146
|
+
const optimizeCollectionsPage = new OptimizeCollectionsPage_1.OptimizeCollectionsPage(appTab);
|
|
147
|
+
const optimizeReportPage = new OptimizeReportPage_1.OptimizeReportPage(appTab);
|
|
148
|
+
await appTabAppsPage.clickCamundaApps();
|
|
149
|
+
await appTabAppsPage.clickOptimize(CLUSTER_NAME);
|
|
150
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(appTab, appTab.getByRole('link', { name: processName }), `process ${processName} in Optimize`, TIMEOUT.optimizeImport);
|
|
151
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
152
|
+
await optimizeCollectionsPage.clickCreateNewButtonWithRetry();
|
|
153
|
+
await optimizeCollectionsPage.clickReportOption();
|
|
154
|
+
await optimizeReportPage.clickProcessSelectionButton();
|
|
155
|
+
await optimizeReportPage.clickUserTaskProcess(processName);
|
|
156
|
+
await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
|
|
157
|
+
timeout: TIMEOUT.short,
|
|
145
158
|
});
|
|
146
|
-
await
|
|
147
|
-
await
|
|
148
|
-
await
|
|
149
|
-
await
|
|
150
|
-
await
|
|
151
|
-
await
|
|
152
|
-
await
|
|
153
|
-
|
|
159
|
+
await optimizeReportPage.clickVersionSelection();
|
|
160
|
+
await optimizeReportPage.clickAlwaysDisplayLatestSelection();
|
|
161
|
+
await optimizeReportPage.clickBlankReportButton();
|
|
162
|
+
await optimizeReportPage.clickCreateReportLink();
|
|
163
|
+
await optimizeReportPage.clickSelectDropdown();
|
|
164
|
+
await optimizeReportPage.clickUserTaskOption();
|
|
165
|
+
await optimizeReportPage.clickHeatMapButton();
|
|
166
|
+
await (0, test_1.expect)(optimizeReportPage.tableOption).toBeVisible({
|
|
167
|
+
timeout: TIMEOUT.short,
|
|
168
|
+
});
|
|
169
|
+
await optimizeReportPage.clickTableOption();
|
|
170
|
+
await optimizeReportPage.clickReportName();
|
|
171
|
+
await optimizeReportPage.clearReportName();
|
|
172
|
+
await optimizeReportPage.fillReportName(reportName);
|
|
173
|
+
await optimizeReportPage.clickSaveButton();
|
|
174
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
175
|
+
await (0, test_1.expect)(appTab.getByText(reportName)).toBeVisible({
|
|
176
|
+
timeout: TIMEOUT.medium,
|
|
177
|
+
});
|
|
178
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
179
|
+
await optimizeReportPage.waitUntilLocatorIsVisible(optimizeReportPage.oneUserTaskInstance.first(), appTab);
|
|
180
|
+
await (0, test_1.expect)(optimizeReportPage.oneUserTaskInstance).toHaveCount(2, {
|
|
181
|
+
timeout: TIMEOUT.navigation,
|
|
154
182
|
});
|
|
155
|
-
await optimizeTabOptimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
156
|
-
await optimizeTabOptimizeReportPage.waitUntilLocatorIsVisible(optimizeTabOptimizeReportPage.oneUserTaskInstance.first(), operateTab);
|
|
157
|
-
await (0, test_1.expect)(optimizeTabOptimizeReportPage.oneUserTaskInstance).toHaveCount(2, { timeout: 60000 });
|
|
158
183
|
});
|
|
159
184
|
});
|
|
160
185
|
(0, _8_9_1.test)('Most Common REST Connector User Flow', async ({ page, modelerHomePage, appsPage, modelerCreatePage, connectorSettingsPage, }) => {
|
|
@@ -167,40 +192,38 @@ _8_9_1.test.describe('Smoke Tests', () => {
|
|
|
167
192
|
await appsPage.clickCamundaApps();
|
|
168
193
|
await appsPage.clickModeler();
|
|
169
194
|
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
170
|
-
timeout:
|
|
195
|
+
timeout: TIMEOUT.navigation,
|
|
171
196
|
});
|
|
172
197
|
});
|
|
173
|
-
await _8_9_1.test.step('Open Cross Component Test Project and
|
|
198
|
+
await _8_9_1.test.step('Open Cross Component Test Project and create a BPMN diagram template', async () => {
|
|
174
199
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
175
200
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
176
201
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
177
202
|
});
|
|
178
|
-
await _8_9_1.test.step('Create BPMN
|
|
203
|
+
await _8_9_1.test.step('Create BPMN diagram with REST Connector using Basic Auth and start process', async () => {
|
|
179
204
|
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/basic-auth-test', 'basic', '{message:response.body.message}', 'result', { username: 'username', password: 'password' });
|
|
180
|
-
await modelerCreatePage.runProcessInstance(
|
|
205
|
+
await modelerCreatePage.runProcessInstance(CLUSTER_NAME);
|
|
181
206
|
});
|
|
182
|
-
await _8_9_1.test.step('
|
|
207
|
+
await _8_9_1.test.step('Assert process completes in Operate and verify connector result', async () => {
|
|
183
208
|
await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
|
|
184
|
-
timeout:
|
|
209
|
+
timeout: TIMEOUT.navigation,
|
|
185
210
|
});
|
|
186
211
|
await modelerCreatePage.clickViewProcessInstanceLink();
|
|
187
|
-
const operateTab = await page.waitForEvent('popup', {
|
|
188
|
-
|
|
189
|
-
const operateTabProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(operateTab);
|
|
190
|
-
const operateTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
191
|
-
await operateTabHomePage.clickProcessesTab();
|
|
192
|
-
await operateTabProcessesPage.clickProcessCompletedCheckbox();
|
|
193
|
-
await operateTabProcessesPage.clickProcessInstanceLink(processName);
|
|
194
|
-
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateTabProcessInstancePage.completedIcon, { totalTimeout: 60000, maxRetries: 5 });
|
|
195
|
-
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateTabProcessInstancePage.variablesList, { totalTimeout: 60000, maxRetries: 5 });
|
|
196
|
-
await (0, test_1.expect)(operateTabProcessInstancePage.connectorResultVariableName('message')).toBeVisible({
|
|
197
|
-
timeout: 15000,
|
|
212
|
+
const operateTab = await page.waitForEvent('popup', {
|
|
213
|
+
timeout: TIMEOUT.navigation,
|
|
198
214
|
});
|
|
199
|
-
|
|
215
|
+
const operateHomePage = new OperateHomePage_1.OperateHomePage(operateTab);
|
|
216
|
+
const operateProcessesPage = new OperateProcessesPage_1.OperateProcessesPage(operateTab);
|
|
217
|
+
const operateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
218
|
+
await operateHomePage.clickProcessesTab();
|
|
219
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
220
|
+
await operateProcessesPage.clickProcessInstanceLink(processName);
|
|
221
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.completedIcon, { totalTimeout: TIMEOUT.processComplete, maxRetries: 5 });
|
|
222
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.variablesList, { totalTimeout: TIMEOUT.navigation, maxRetries: 5 });
|
|
223
|
+
await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('message')).toBeVisible({ timeout: TIMEOUT.short });
|
|
224
|
+
await (0, test_1.expect)(operateProcessInstancePage
|
|
200
225
|
.connectorResultVariableName('message')
|
|
201
|
-
.getByText('"Message from Mock!"')).toBeVisible({
|
|
202
|
-
timeout: 15000,
|
|
203
|
-
});
|
|
226
|
+
.getByText('"Message from Mock!"')).toBeVisible({ timeout: TIMEOUT.short });
|
|
204
227
|
});
|
|
205
228
|
});
|
|
206
229
|
});
|
|
@@ -5,8 +5,8 @@ const _8_9_1 = require("../../fixtures/8.9");
|
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
6
|
const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
|
|
7
7
|
const sleep_1 = require("../../utils/sleep");
|
|
8
|
-
const resetSession_1 = require("../../utils/resetSession");
|
|
9
8
|
const expectTextWithRetry_1 = require("../../utils/assertionHelpers/expectTextWithRetry");
|
|
9
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
10
10
|
const LoginPage_1 = require("../../pages/8.9/LoginPage");
|
|
11
11
|
const users_1 = require("../../utils/users");
|
|
12
12
|
const mainUser = (0, users_1.getTestUser)('twelfthUser');
|
|
@@ -19,7 +19,7 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
|
|
|
19
19
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
20
20
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
21
21
|
});
|
|
22
|
-
(0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate User', async ({ page, modelerHomePage, appsPage, modelerCreatePage,
|
|
22
|
+
(0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate User', async ({ page, modelerHomePage, appsPage, modelerCreatePage, taskPanelPage, }) => {
|
|
23
23
|
_8_9_1.test.slow();
|
|
24
24
|
const randomName = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
25
25
|
const processName = 'User_Task_Process_Candidate_User' + randomName;
|
|
@@ -63,11 +63,22 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
|
|
|
63
63
|
timeout: 60000,
|
|
64
64
|
});
|
|
65
65
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1);
|
|
66
|
-
await (0,
|
|
66
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(taskName2).first().or(page.getByText(taskName2).last()), {
|
|
67
|
+
totalTimeout: 120000,
|
|
68
|
+
maxRetries: 5,
|
|
69
|
+
postAction: async () => {
|
|
70
|
+
await page.reload();
|
|
71
|
+
},
|
|
72
|
+
});
|
|
67
73
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName3, { shouldBeVisible: false });
|
|
68
74
|
});
|
|
69
75
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
70
|
-
await (
|
|
76
|
+
await page.context().clearCookies();
|
|
77
|
+
await page.evaluate(() => {
|
|
78
|
+
localStorage.clear();
|
|
79
|
+
sessionStorage.clear();
|
|
80
|
+
});
|
|
81
|
+
await page.goto('/');
|
|
71
82
|
});
|
|
72
83
|
await _8_9_1.test.step('Login with Test User and Check Tasks in Tasklist ', async () => {
|
|
73
84
|
const loginPage = new LoginPage_1.LoginPage(page);
|
|
@@ -82,7 +93,7 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
|
|
|
82
93
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName3);
|
|
83
94
|
});
|
|
84
95
|
});
|
|
85
|
-
(0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate Group', async ({ page, modelerHomePage, appsPage, modelerCreatePage,
|
|
96
|
+
(0, _8_9_1.test)('User Task Restrictions Enabled Flow - Candidate Group', async ({ page, modelerHomePage, appsPage, modelerCreatePage, taskPanelPage, ocIdentityGroupsPage, ocIdentityHomePage, }) => {
|
|
86
97
|
_8_9_1.test.slow();
|
|
87
98
|
const randomName = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
88
99
|
const processName = 'User_Task_Process_Candidate_Group' + randomName;
|
|
@@ -144,14 +155,22 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
|
|
|
144
155
|
await _8_9_1.test.step('View User Tasks in Tasklist', async () => {
|
|
145
156
|
await appsPage.clickCamundaApps();
|
|
146
157
|
await appsPage.clickTasklist(clusterName);
|
|
147
|
-
await (0,
|
|
148
|
-
|
|
158
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, taskPanelPage.taskListPageBanner, {
|
|
159
|
+
visibilityTimeout: 20000,
|
|
160
|
+
postAction: async () => {
|
|
161
|
+
await page.reload();
|
|
162
|
+
},
|
|
149
163
|
});
|
|
150
164
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1);
|
|
151
165
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName2, { shouldBeVisible: false });
|
|
152
166
|
});
|
|
153
167
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
154
|
-
await (
|
|
168
|
+
await page.context().clearCookies();
|
|
169
|
+
await page.evaluate(() => {
|
|
170
|
+
localStorage.clear();
|
|
171
|
+
sessionStorage.clear();
|
|
172
|
+
});
|
|
173
|
+
await page.goto('/');
|
|
155
174
|
});
|
|
156
175
|
await _8_9_1.test.step('Login with Test User and Check Tasks in Tasklist ', async () => {
|
|
157
176
|
const loginPage = new LoginPage_1.LoginPage(page);
|
|
@@ -162,10 +181,21 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
|
|
|
162
181
|
timeout: 120000,
|
|
163
182
|
});
|
|
164
183
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1);
|
|
165
|
-
await (0,
|
|
184
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(taskName2).first().or(page.getByText(taskName2).last()), {
|
|
185
|
+
totalTimeout: 120000,
|
|
186
|
+
maxRetries: 5,
|
|
187
|
+
postAction: async () => {
|
|
188
|
+
await page.reload();
|
|
189
|
+
},
|
|
190
|
+
});
|
|
166
191
|
});
|
|
167
192
|
await _8_9_1.test.step('Clear cookies and reset session', async () => {
|
|
168
|
-
await (
|
|
193
|
+
await page.context().clearCookies();
|
|
194
|
+
await page.evaluate(() => {
|
|
195
|
+
localStorage.clear();
|
|
196
|
+
sessionStorage.clear();
|
|
197
|
+
});
|
|
198
|
+
await page.goto('/');
|
|
169
199
|
});
|
|
170
200
|
await _8_9_1.test.step('Login with Second Test User and Check Tasks in Tasklist ', async () => {
|
|
171
201
|
const loginPage = new LoginPage_1.LoginPage(page);
|
|
@@ -176,7 +206,13 @@ _8_9_1.test.describe.parallel('UTR Enabled User Flows Test @tasklistV1', () => {
|
|
|
176
206
|
timeout: 120000,
|
|
177
207
|
});
|
|
178
208
|
await (0, expectTextWithRetry_1.expectTextWithRetry)(page, taskName1, { shouldBeVisible: false });
|
|
179
|
-
await (0,
|
|
209
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(taskName2).first().or(page.getByText(taskName2).last()), {
|
|
210
|
+
totalTimeout: 120000,
|
|
211
|
+
maxRetries: 5,
|
|
212
|
+
postAction: async () => {
|
|
213
|
+
await page.reload();
|
|
214
|
+
},
|
|
215
|
+
});
|
|
180
216
|
});
|
|
181
217
|
});
|
|
182
218
|
});
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
const test_1 = require("@playwright/test");
|
|
4
27
|
const SM_8_9_1 = require("../../fixtures/SM-8.9");
|
|
@@ -180,5 +203,263 @@ if (process.env.IS_OPTIMIZE !== 'false') {
|
|
|
180
203
|
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, 'Displaying data from 1 instance.', false, 30000);
|
|
181
204
|
});
|
|
182
205
|
});
|
|
206
|
+
(0, SM_8_9_1.test)('Conditional Events - Process Import Flow @tasklistV2', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, optimizeHomePage, optimizeDashboardPage, }) => {
|
|
207
|
+
SM_8_9_1.test.slow();
|
|
208
|
+
const bpmnFileName = 'Conditional_Events_All.bpmn';
|
|
209
|
+
const processName = 'Conditional Events Auto-Run';
|
|
210
|
+
await SM_8_9_1.test.step('Upload and deploy Conditional Events BPMN from Web Modeler', async () => {
|
|
211
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
212
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
213
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
214
|
+
const { uploadFile } = await Promise.resolve().then(() => __importStar(require('../../utils/fileUpload')));
|
|
215
|
+
await uploadFile(page, bpmnFileName);
|
|
216
|
+
await (0, sleep_1.sleep)(5000);
|
|
217
|
+
await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
|
|
218
|
+
});
|
|
219
|
+
await SM_8_9_1.test.step('Start process instance with variable {"myVar": 8}', async () => {
|
|
220
|
+
const variables = '{"myVar": 8}';
|
|
221
|
+
await modelerCreatePage.runProcessInstance(variables);
|
|
222
|
+
});
|
|
223
|
+
await SM_8_9_1.test.step('Verify process instance is completed in Operate', async () => {
|
|
224
|
+
await navigationPage.goToOperate();
|
|
225
|
+
await operateHomePage.clickProcessesTab();
|
|
226
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
227
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry(60000, 15);
|
|
228
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('myVar', '8');
|
|
229
|
+
});
|
|
230
|
+
await SM_8_9_1.test.step('Navigate to Optimize and verify Conditional Events process appears in Dashboards (CE-OPT-01)', async () => {
|
|
231
|
+
await navigationPage.goToOptimize();
|
|
232
|
+
await optimizeHomePage.clickDashboardLink();
|
|
233
|
+
await (0, sleep_1.sleep)(60000);
|
|
234
|
+
await page.reload();
|
|
235
|
+
await optimizeDashboardPage.clickFilterTable();
|
|
236
|
+
await optimizeDashboardPage.fillFilterTable(processName);
|
|
237
|
+
await optimizeDashboardPage.processAssertion(processName);
|
|
238
|
+
});
|
|
239
|
+
await SM_8_9_1.test.step('Verify the process link for Conditional Events is navigable in the Optimize dashboard (CE-OPT-02)', async () => {
|
|
240
|
+
await page.reload();
|
|
241
|
+
await optimizeDashboardPage.clickFilterTable();
|
|
242
|
+
await optimizeDashboardPage.fillFilterTable(processName);
|
|
243
|
+
await optimizeDashboardPage.processAssertion(processName);
|
|
244
|
+
await page.getByTitle(processName).first().click({ timeout: 60000 });
|
|
245
|
+
await (0, test_1.expect)(page.getByRole('link', { name: 'Camunda logo Optimize' })).toBeVisible({ timeout: 60000 });
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
(0, SM_8_9_1.test)('Conditional Events - Create and Verify User Task Report @tasklistV2', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, optimizeHomePage, optimizeCollectionsPage, optimizeReportPage, }) => {
|
|
249
|
+
SM_8_9_1.test.slow();
|
|
250
|
+
const bpmnFileName = 'Conditional_Events_All.bpmn';
|
|
251
|
+
const processName = 'Conditional Events Auto-Run';
|
|
252
|
+
const reportName = await (0, _setup_1.generateRandomStringAsync)(5);
|
|
253
|
+
await SM_8_9_1.test.step('Upload and deploy Conditional Events BPMN from Web Modeler', async () => {
|
|
254
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
255
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
256
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
257
|
+
const { uploadFile } = await Promise.resolve().then(() => __importStar(require('../../utils/fileUpload')));
|
|
258
|
+
await uploadFile(page, bpmnFileName);
|
|
259
|
+
await (0, sleep_1.sleep)(5000);
|
|
260
|
+
await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
|
|
261
|
+
});
|
|
262
|
+
await SM_8_9_1.test.step('Start process instance with variable {"myVar": 8}', async () => {
|
|
263
|
+
const variables = '{"myVar": 8}';
|
|
264
|
+
await modelerCreatePage.runProcessInstance(variables);
|
|
265
|
+
});
|
|
266
|
+
await SM_8_9_1.test.step('Verify process instance is completed in Operate', async () => {
|
|
267
|
+
await navigationPage.goToOperate();
|
|
268
|
+
await operateHomePage.clickProcessesTab();
|
|
269
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
270
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry(60000, 15);
|
|
271
|
+
});
|
|
272
|
+
await SM_8_9_1.test.step('Navigate to Optimize and create a User Task Table report for Conditional Events process (CE-OPT-03)', async () => {
|
|
273
|
+
await navigationPage.goToOptimize();
|
|
274
|
+
await (0, sleep_1.sleep)(60000);
|
|
275
|
+
await page.reload();
|
|
276
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
277
|
+
await optimizeCollectionsPage.clickCreateNewButton();
|
|
278
|
+
await optimizeCollectionsPage.clickReportOption();
|
|
279
|
+
await optimizeReportPage.clickProcessSelectionButton();
|
|
280
|
+
await optimizeReportPage.clickUserTaskProcess(processName);
|
|
281
|
+
await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
|
|
282
|
+
timeout: 30000,
|
|
283
|
+
});
|
|
284
|
+
await optimizeReportPage.clickVersionSelection();
|
|
285
|
+
await optimizeReportPage.clickAlwaysDisplayLatestSelection();
|
|
286
|
+
await optimizeReportPage.clickBlankReportButton();
|
|
287
|
+
await optimizeReportPage.clickCreateReportLink();
|
|
288
|
+
await optimizeReportPage.clickSelectDropdown();
|
|
289
|
+
await optimizeReportPage.clickUserTaskOption();
|
|
290
|
+
await optimizeReportPage.clickHeatMapButton();
|
|
291
|
+
await (0, test_1.expect)(optimizeReportPage.tableOption).toBeVisible({
|
|
292
|
+
timeout: 30000,
|
|
293
|
+
});
|
|
294
|
+
await optimizeReportPage.clickTableOption();
|
|
295
|
+
await optimizeReportPage.clickReportName();
|
|
296
|
+
await optimizeReportPage.clearReportName();
|
|
297
|
+
await optimizeReportPage.fillReportName(reportName);
|
|
298
|
+
await optimizeReportPage.clickSaveButton();
|
|
299
|
+
});
|
|
300
|
+
await SM_8_9_1.test.step('Verify the report is listed in Collections (CE-OPT-03)', async () => {
|
|
301
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
302
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
|
|
303
|
+
});
|
|
304
|
+
await SM_8_9_1.test.step('Verify the report shows exactly 1 completed instance for Conditional Events (CE-OPT-04)', async () => {
|
|
305
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
306
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, optimizeReportPage.oneUserTaskInstance, 'One user task instance count', 90000);
|
|
307
|
+
await (0, test_1.expect)(optimizeReportPage.twoUserTaskInstance).not.toBeVisible();
|
|
308
|
+
});
|
|
309
|
+
});
|
|
310
|
+
(0, SM_8_9_1.test)('Conditional Events - Report Updates After Second Process Run @tasklistV2', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, optimizeHomePage, optimizeCollectionsPage, optimizeReportPage, }) => {
|
|
311
|
+
SM_8_9_1.test.slow();
|
|
312
|
+
const bpmnFileName = 'Conditional_Events_All.bpmn';
|
|
313
|
+
const processName = 'Conditional Events Auto-Run';
|
|
314
|
+
const reportName = await (0, _setup_1.generateRandomStringAsync)(5);
|
|
315
|
+
await SM_8_9_1.test.step('Upload and deploy Conditional Events BPMN from Web Modeler', async () => {
|
|
316
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
317
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
318
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
319
|
+
const { uploadFile } = await Promise.resolve().then(() => __importStar(require('../../utils/fileUpload')));
|
|
320
|
+
await uploadFile(page, bpmnFileName);
|
|
321
|
+
await (0, sleep_1.sleep)(5000);
|
|
322
|
+
await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
|
|
323
|
+
});
|
|
324
|
+
await SM_8_9_1.test.step('Start first process instance with variable {"myVar": 8}', async () => {
|
|
325
|
+
const variables = '{"myVar": 8}';
|
|
326
|
+
await modelerCreatePage.runProcessInstance(variables);
|
|
327
|
+
});
|
|
328
|
+
await SM_8_9_1.test.step('Verify first process instance is completed in Operate', async () => {
|
|
329
|
+
await navigationPage.goToOperate();
|
|
330
|
+
await operateHomePage.clickProcessesTab();
|
|
331
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
332
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry(60000, 15);
|
|
333
|
+
});
|
|
334
|
+
await SM_8_9_1.test.step('Create a User Task Table report in Optimize and verify it shows count of 1', async () => {
|
|
335
|
+
await navigationPage.goToOptimize();
|
|
336
|
+
await (0, sleep_1.sleep)(60000);
|
|
337
|
+
await page.reload();
|
|
338
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
339
|
+
await optimizeCollectionsPage.clickCreateNewButton();
|
|
340
|
+
await optimizeCollectionsPage.clickReportOption();
|
|
341
|
+
await optimizeReportPage.clickProcessSelectionButton();
|
|
342
|
+
await optimizeReportPage.clickUserTaskProcess(processName);
|
|
343
|
+
await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
|
|
344
|
+
timeout: 30000,
|
|
345
|
+
});
|
|
346
|
+
await optimizeReportPage.clickVersionSelection();
|
|
347
|
+
await optimizeReportPage.clickAlwaysDisplayLatestSelection();
|
|
348
|
+
await optimizeReportPage.clickBlankReportButton();
|
|
349
|
+
await optimizeReportPage.clickCreateReportLink();
|
|
350
|
+
await optimizeReportPage.clickSelectDropdown();
|
|
351
|
+
await optimizeReportPage.clickUserTaskOption();
|
|
352
|
+
await optimizeReportPage.clickHeatMapButton();
|
|
353
|
+
await (0, test_1.expect)(optimizeReportPage.tableOption).toBeVisible({
|
|
354
|
+
timeout: 30000,
|
|
355
|
+
});
|
|
356
|
+
await optimizeReportPage.clickTableOption();
|
|
357
|
+
await optimizeReportPage.clickReportName();
|
|
358
|
+
await optimizeReportPage.clearReportName();
|
|
359
|
+
await optimizeReportPage.fillReportName(reportName);
|
|
360
|
+
await optimizeReportPage.clickSaveButton();
|
|
361
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
362
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
|
|
363
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
364
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, optimizeReportPage.oneUserTaskInstance, 'One user task instance count', 90000);
|
|
365
|
+
});
|
|
366
|
+
await SM_8_9_1.test.step('Start a second process instance with variable {"myVar": 8} in Modeler', async () => {
|
|
367
|
+
await navigationPage.goToModeler();
|
|
368
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
369
|
+
await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
|
|
370
|
+
const variables = '{"myVar": 8}';
|
|
371
|
+
await modelerCreatePage.runProcessInstance(variables);
|
|
372
|
+
await (0, sleep_1.sleep)(10000);
|
|
373
|
+
});
|
|
374
|
+
await SM_8_9_1.test.step('Verify second process instance is completed in Operate', async () => {
|
|
375
|
+
await navigationPage.goToOperate();
|
|
376
|
+
await (0, sleep_1.sleep)(20000);
|
|
377
|
+
await page.reload();
|
|
378
|
+
await operateHomePage.clickProcessesTab();
|
|
379
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
380
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry(60000, 15);
|
|
381
|
+
});
|
|
382
|
+
await SM_8_9_1.test.step('Verify the Optimize report now shows 2 instances and the single instance count is gone (CE-OPT-05)', async () => {
|
|
383
|
+
await navigationPage.goToOptimize();
|
|
384
|
+
await (0, sleep_1.sleep)(60000);
|
|
385
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
386
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
|
|
387
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
388
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, optimizeReportPage.twoUserTaskInstance, 'Two user task instance count', 90000);
|
|
389
|
+
await (0, test_1.expect)(optimizeReportPage.oneUserTaskInstance).not.toBeVisible();
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
(0, SM_8_9_1.test)('Conditional Events - Report Starts at Zero and Updates After First Run @tasklistV2', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, optimizeHomePage, optimizeCollectionsPage, optimizeReportPage, }) => {
|
|
393
|
+
SM_8_9_1.test.slow();
|
|
394
|
+
const bpmnFileName = 'Conditional_Events_All.bpmn';
|
|
395
|
+
const processName = 'Conditional Events Auto-Run';
|
|
396
|
+
const reportName = await (0, _setup_1.generateRandomStringAsync)(5);
|
|
397
|
+
await SM_8_9_1.test.step('Upload and deploy Conditional Events BPMN from Web Modeler', async () => {
|
|
398
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
399
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
400
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
401
|
+
const { uploadFile } = await Promise.resolve().then(() => __importStar(require('../../utils/fileUpload')));
|
|
402
|
+
await uploadFile(page, bpmnFileName);
|
|
403
|
+
await (0, sleep_1.sleep)(5000);
|
|
404
|
+
await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
|
|
405
|
+
});
|
|
406
|
+
await SM_8_9_1.test.step('Deploy the process without starting any instance', async () => {
|
|
407
|
+
await modelerCreatePage.deployProcessInstance();
|
|
408
|
+
await (0, sleep_1.sleep)(60000);
|
|
409
|
+
});
|
|
410
|
+
await SM_8_9_1.test.step('Create a User Task Table report in Optimize and verify it shows 0 instances (CE-OPT-08)', async () => {
|
|
411
|
+
await navigationPage.goToOptimize();
|
|
412
|
+
await (0, sleep_1.sleep)(120000);
|
|
413
|
+
await page.reload();
|
|
414
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
415
|
+
await optimizeCollectionsPage.clickCreateNewButton();
|
|
416
|
+
await optimizeCollectionsPage.clickReportOption();
|
|
417
|
+
await optimizeReportPage.clickProcessSelectionButton();
|
|
418
|
+
await optimizeReportPage.clickUserTaskProcess(processName);
|
|
419
|
+
await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
|
|
420
|
+
timeout: 30000,
|
|
421
|
+
});
|
|
422
|
+
await optimizeReportPage.clickVersionSelection();
|
|
423
|
+
await optimizeReportPage.clickAlwaysDisplayLatestSelection();
|
|
424
|
+
await optimizeReportPage.clickBlankReportButton();
|
|
425
|
+
await optimizeReportPage.clickCreateReportLink();
|
|
426
|
+
await optimizeReportPage.clickSelectDropdown();
|
|
427
|
+
await optimizeReportPage.clickUserTaskOption();
|
|
428
|
+
await optimizeReportPage.clickHeatMapButton();
|
|
429
|
+
await (0, test_1.expect)(optimizeReportPage.tableOption).toBeVisible({
|
|
430
|
+
timeout: 30000,
|
|
431
|
+
});
|
|
432
|
+
await optimizeReportPage.clickTableOption();
|
|
433
|
+
await optimizeReportPage.clickReportName();
|
|
434
|
+
await optimizeReportPage.clearReportName();
|
|
435
|
+
await optimizeReportPage.fillReportName(reportName);
|
|
436
|
+
await optimizeReportPage.clickSaveButton();
|
|
437
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
438
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
|
|
439
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
440
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, 'Displaying data from 0 instances.', false, 30000);
|
|
441
|
+
});
|
|
442
|
+
await SM_8_9_1.test.step('Start a process instance with variable {"myVar": 8} and verify completion in Operate', async () => {
|
|
443
|
+
await navigationPage.goToModeler();
|
|
444
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
445
|
+
await modelerHomePage.clickProcessDiagram(bpmnFileName.replace('.bpmn', ''));
|
|
446
|
+
const variables = '{"myVar": 8}';
|
|
447
|
+
await modelerCreatePage.runProcessInstance(variables);
|
|
448
|
+
await (0, sleep_1.sleep)(20000);
|
|
449
|
+
await navigationPage.goToOperate();
|
|
450
|
+
await operateHomePage.clickProcessesTab();
|
|
451
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
452
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry(60000, 15);
|
|
453
|
+
});
|
|
454
|
+
await SM_8_9_1.test.step('Verify the Optimize report now shows data from 1 instance (CE-OPT-07 & CE-OPT-08)', async () => {
|
|
455
|
+
await navigationPage.goToOptimize();
|
|
456
|
+
await (0, sleep_1.sleep)(30000);
|
|
457
|
+
await page.reload();
|
|
458
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
459
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, reportName, false, 30000);
|
|
460
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
461
|
+
await (0, UtilitiesPage_2.assertPageTextWithRetry)(page, 'Displaying data from 1 instance.', false, 30000);
|
|
462
|
+
});
|
|
463
|
+
});
|
|
183
464
|
});
|
|
184
465
|
}
|
|
@@ -185,6 +185,25 @@ SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
185
185
|
timeout: 60000,
|
|
186
186
|
});
|
|
187
187
|
});
|
|
188
|
+
await SM_8_9_1.test.step('Navigate to Optimize and verify process appears in dashboard (CE-OPT-01)', async () => {
|
|
189
|
+
await navigationPage.goToOptimize();
|
|
190
|
+
await optimizeHomePage.clickDashboardLink();
|
|
191
|
+
await (0, sleep_1.sleep)(60000);
|
|
192
|
+
await page.reload();
|
|
193
|
+
await optimizeDashboardPage.clickFilterTable();
|
|
194
|
+
await optimizeDashboardPage.fillFilterTable(processName);
|
|
195
|
+
await optimizeDashboardPage.processAssertion(processName);
|
|
196
|
+
});
|
|
197
|
+
await SM_8_9_1.test.step('Verify the Conditional Events process link is navigable in the Optimize dashboard (CE-OPT-02)', async () => {
|
|
198
|
+
await page.reload();
|
|
199
|
+
await optimizeDashboardPage.clickFilterTable();
|
|
200
|
+
await optimizeDashboardPage.fillFilterTable(processName);
|
|
201
|
+
await optimizeDashboardPage.processAssertion(processName);
|
|
202
|
+
await page.getByTitle(processName).first().click({ timeout: 60000 });
|
|
203
|
+
await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
|
|
204
|
+
timeout: 60000,
|
|
205
|
+
});
|
|
206
|
+
});
|
|
188
207
|
}
|
|
189
208
|
});
|
|
190
209
|
});
|