@camunda/e2e-test-suite 0.0.463 → 0.0.464
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.
|
@@ -266,3 +266,173 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
|
|
|
266
266
|
(0, test_1.expect)(status).toBe(404);
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
|
+
_8_10_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_10_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_10_1.test)('CE-OPT-09: Creating a Process Report for Conditional Events via API returns HTTP 200', async ({ request, }) => {
|
|
313
|
+
await _8_10_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_10_1.test)('CE-OPT-10: Exporting the Conditional Events report definition via API returns the full report payload', async ({ request, }) => {
|
|
348
|
+
await _8_10_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_10_1.test)('CE-OPT-11: Exporting the Conditional Events report without a token returns 401', async ({ request, }) => {
|
|
367
|
+
await _8_10_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_10_1.test)('CE-OPT-12: Exporting the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
|
|
376
|
+
await _8_10_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_10_1.test)('CE-OPT-13: Deleting the Conditional Events report via API succeeds with HTTP 200', async ({ request, }) => {
|
|
388
|
+
// Create a separate report to delete so the shared one remains available for other tests
|
|
389
|
+
const reportToDeleteId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
|
|
390
|
+
optimizeCookie,
|
|
391
|
+
collectionId: conditionalEventsCollectionId,
|
|
392
|
+
name: await (0, randomName_1.randomNameAgregator)('CE Report To Delete'),
|
|
393
|
+
definitions: [
|
|
394
|
+
{
|
|
395
|
+
key: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
396
|
+
filter: [],
|
|
397
|
+
groupBy: { type: 'none', value: null },
|
|
398
|
+
distributedBy: { type: 'none', value: null },
|
|
399
|
+
view: { entity: 'processInstance', properties: ['frequency'] },
|
|
400
|
+
},
|
|
401
|
+
],
|
|
402
|
+
});
|
|
403
|
+
await _8_10_1.test.step('Delete report successfully (200)', async () => {
|
|
404
|
+
const response = await request.delete(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
|
|
405
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
(0, _8_10_1.test)('CE-OPT-14: A deleted Conditional Events report is no longer retrievable via the API', async ({ request, }) => {
|
|
409
|
+
const reportToDeleteId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
|
|
410
|
+
optimizeCookie,
|
|
411
|
+
collectionId: conditionalEventsCollectionId,
|
|
412
|
+
name: await (0, randomName_1.randomNameAgregator)('CE Report Delete Verify'),
|
|
413
|
+
definitions: [
|
|
414
|
+
{
|
|
415
|
+
key: CONDITIONAL_EVENTS_PROCESS_KEY,
|
|
416
|
+
filter: [],
|
|
417
|
+
groupBy: { type: 'none', value: null },
|
|
418
|
+
distributedBy: { type: 'none', value: null },
|
|
419
|
+
view: { entity: 'processInstance', properties: ['frequency'] },
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
});
|
|
423
|
+
await _8_10_1.test.step('Delete the report', async () => {
|
|
424
|
+
const deleteResponse = await request.delete(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
|
|
425
|
+
await (0, apiHelpers_1.assertResponseStatus)(deleteResponse, 200);
|
|
426
|
+
});
|
|
427
|
+
await _8_10_1.test.step('Verify deleted report is no longer retrievable (404 or 500)', async () => {
|
|
428
|
+
const getResponse = await request.get(`${baseUrl}/api/public/report/${reportToDeleteId}`, { headers: { Authorization: optimizeBearerToken } });
|
|
429
|
+
(0, test_1.expect)([404, 500]).toContain(getResponse.status());
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
(0, _8_10_1.test)('CE-OPT-15: Attempting to delete the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
|
|
433
|
+
await _8_10_1.test.step('Delete report with invalid token (401)', async () => {
|
|
434
|
+
const response = await request.delete(`${baseUrl}/api/public/report/${conditionalEventsReportId}`, { headers: { Authorization: 'Bearer invalid_token' } });
|
|
435
|
+
(0, test_1.expect)(response.status()).toBe(401);
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
});
|
|
@@ -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_10_1 = require("../../fixtures/SM-8.10");
|
|
@@ -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_10_1.test)('Conditional Events - Process Import Flow @tasklistV2', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, optimizeHomePage, optimizeDashboardPage, }) => {
|
|
207
|
+
SM_8_10_1.test.slow();
|
|
208
|
+
const bpmnFileName = 'Conditional_Events_All.bpmn';
|
|
209
|
+
const processName = 'Conditional Events Auto-Run';
|
|
210
|
+
await SM_8_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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
|
}
|
|
@@ -164,7 +164,7 @@ SM_8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
164
164
|
await operateProcessInstancePage.assertProcessVariableContainsText('myVar', '8');
|
|
165
165
|
});
|
|
166
166
|
if (process.env.IS_OPTIMIZE !== 'false') {
|
|
167
|
-
await SM_8_10_1.test.step('Navigate to Optimize and verify process in dashboard', async () => {
|
|
167
|
+
await SM_8_10_1.test.step('Navigate to Optimize and verify process appears in dashboard (CE-OPT-01)', async () => {
|
|
168
168
|
await navigationPage.goToOptimize();
|
|
169
169
|
await optimizeHomePage.clickDashboardLink();
|
|
170
170
|
await (0, sleep_1.sleep)(60000);
|
|
@@ -173,6 +173,16 @@ SM_8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
173
173
|
await optimizeDashboardPage.fillFilterTable(processName);
|
|
174
174
|
await optimizeDashboardPage.processAssertion(processName);
|
|
175
175
|
});
|
|
176
|
+
await SM_8_10_1.test.step('Verify the Conditional Events process link is navigable in the Optimize dashboard (CE-OPT-02)', async () => {
|
|
177
|
+
await page.reload();
|
|
178
|
+
await optimizeDashboardPage.clickFilterTable();
|
|
179
|
+
await optimizeDashboardPage.fillFilterTable(processName);
|
|
180
|
+
await optimizeDashboardPage.processAssertion(processName);
|
|
181
|
+
await page.getByTitle(processName).first().click({ timeout: 60000 });
|
|
182
|
+
await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
|
|
183
|
+
timeout: 60000,
|
|
184
|
+
});
|
|
185
|
+
});
|
|
176
186
|
}
|
|
177
187
|
});
|
|
178
188
|
});
|