@camunda/e2e-test-suite 0.0.590 → 0.0.592
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/pages/SM-8.7/ConnectorMarketplacePage.js +2 -2
- package/dist/pages/SM-8.7/ModelerCreatePage.d.ts +6 -0
- package/dist/pages/SM-8.7/ModelerCreatePage.js +41 -0
- package/dist/pages/SM-8.7/OperateProcessInstancePage.js +2 -2
- package/dist/pages/SM-8.7/TaskDetailsPage.js +2 -4
- package/dist/pages/SM-8.7/UtlitiesPage.js +24 -24
- package/dist/tests/SM-8.7/connectors-user-flows.spec.js +0 -6
- package/dist/tests/SM-8.7/play.spec.js +6 -9
- package/dist/tests/SM-8.7/rba-enabled-user-flows.spec.js +1 -0
- package/dist/tests/SM-8.7/test-setup.spec.js +3 -1
- package/dist/tests/SM-8.7/web-modeler-user-flows.spec.js +0 -1
- package/package.json +1 -1
|
@@ -21,11 +21,11 @@ class ConnectorMarketplacePage {
|
|
|
21
21
|
}
|
|
22
22
|
async clickSearchForConnectorTextbox() {
|
|
23
23
|
await this.searchForConnectorTextbox.click({ timeout: 60000 });
|
|
24
|
-
await (0, sleep_1.sleep)(2000);
|
|
25
24
|
}
|
|
26
25
|
async fillSearchForConnectorTextbox(connectorName) {
|
|
27
26
|
await this.searchForConnectorTextbox.fill(connectorName, { timeout: 60000 });
|
|
28
|
-
|
|
27
|
+
// Wait for search debounce + client-side filtering to complete
|
|
28
|
+
await (0, sleep_1.sleep)(5000);
|
|
29
29
|
}
|
|
30
30
|
async clickDownloadToProjectButton() {
|
|
31
31
|
await this.downloadToProjectButton.click({ timeout: 60000 });
|
|
@@ -98,6 +98,12 @@ declare class ModelerCreatePage {
|
|
|
98
98
|
clickSecondPlacedElement(): Promise<void>;
|
|
99
99
|
clickFirstPlacedGateway(): Promise<void>;
|
|
100
100
|
clickSecondPlacedGateway(): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Detects if the page has been redirected to the Keycloak login page
|
|
103
|
+
* (session expiry) or is in the middle of an OIDC redirect, and performs
|
|
104
|
+
* a re-login if necessary.
|
|
105
|
+
*/
|
|
106
|
+
private handleSessionExpiry;
|
|
101
107
|
clickStartInstanceMainButton(): Promise<void>;
|
|
102
108
|
clickStartInstanceSubButton(): Promise<void>;
|
|
103
109
|
clickViewProcessInstanceLink(): Promise<void>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ModelerCreatePage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const ConnectorMarketplacePage_1 = require("./ConnectorMarketplacePage");
|
|
6
|
+
const LoginPage_1 = require("./LoginPage");
|
|
6
7
|
const sleep_1 = require("../../utils/sleep");
|
|
7
8
|
class ModelerCreatePage {
|
|
8
9
|
page;
|
|
@@ -463,6 +464,40 @@ class ModelerCreatePage {
|
|
|
463
464
|
await this.secondPlacedGateway.click({ timeout: 3000 });
|
|
464
465
|
}
|
|
465
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* Detects if the page has been redirected to the Keycloak login page
|
|
469
|
+
* (session expiry) or is in the middle of an OIDC redirect, and performs
|
|
470
|
+
* a re-login if necessary.
|
|
471
|
+
*/
|
|
472
|
+
async handleSessionExpiry() {
|
|
473
|
+
const currentUrl = this.page.url();
|
|
474
|
+
// If we're on a login-callback or auth redirect URL, wait for navigation
|
|
475
|
+
// to settle — the OIDC flow may redirect to Keycloak login form.
|
|
476
|
+
if (currentUrl.includes('login-callback') ||
|
|
477
|
+
currentUrl.includes('/auth/realms/')) {
|
|
478
|
+
console.warn(`clickStartInstanceMainButton: detected auth redirect URL (${currentUrl}), waiting for navigation...`);
|
|
479
|
+
await this.page
|
|
480
|
+
.waitForLoadState('domcontentloaded', { timeout: 10000 })
|
|
481
|
+
.catch(() => { });
|
|
482
|
+
}
|
|
483
|
+
const loginPage = new LoginPage_1.LoginPage(this.page);
|
|
484
|
+
const keycloakBanner = this.page.locator('body#keycloak-bg[data-page-id="login-login"]');
|
|
485
|
+
const usernameField = this.page.locator('#username');
|
|
486
|
+
// Check if we landed on a login page (Keycloak form)
|
|
487
|
+
const isOnLoginPage = await keycloakBanner
|
|
488
|
+
.or(usernameField)
|
|
489
|
+
.isVisible({ timeout: 5000 })
|
|
490
|
+
.catch(() => false);
|
|
491
|
+
if (!isOnLoginPage) {
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
console.warn('clickStartInstanceMainButton: session expired — performing re-login');
|
|
495
|
+
const username = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
|
|
496
|
+
const password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || '';
|
|
497
|
+
await loginPage.login(username, password);
|
|
498
|
+
// Wait for modeler to load after re-login
|
|
499
|
+
await this.page.waitForLoadState('domcontentloaded', { timeout: 30000 });
|
|
500
|
+
}
|
|
466
501
|
async clickStartInstanceMainButton() {
|
|
467
502
|
const maxRetries = 3;
|
|
468
503
|
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
@@ -473,6 +508,12 @@ class ModelerCreatePage {
|
|
|
473
508
|
.catch((reloadErr) => {
|
|
474
509
|
console.warn(`clickStartInstanceMainButton: page.reload error (ignored): ${reloadErr}`);
|
|
475
510
|
});
|
|
511
|
+
// Handle Keycloak session expiry after reload
|
|
512
|
+
await this.handleSessionExpiry();
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
// Even on first attempt, check if session already expired
|
|
516
|
+
await this.handleSessionExpiry();
|
|
476
517
|
}
|
|
477
518
|
if (this.page.isClosed()) {
|
|
478
519
|
throw new Error('Target page, context or browser has been closed');
|
|
@@ -60,7 +60,7 @@ class OperateProcessInstancePage {
|
|
|
60
60
|
retryCount++;
|
|
61
61
|
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
62
62
|
await this.page.reload();
|
|
63
|
-
await
|
|
63
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
throw new Error(`Completed icon not visible after ${maxRetries} attempts.`);
|
|
@@ -80,7 +80,7 @@ class OperateProcessInstancePage {
|
|
|
80
80
|
retryCount++;
|
|
81
81
|
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
82
82
|
await this.page.reload();
|
|
83
|
-
await
|
|
83
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
throw new Error(`Active icon not visible after ${maxRetries} attempts.`);
|
|
@@ -211,8 +211,7 @@ class TaskDetailsPage {
|
|
|
211
211
|
retryCount++;
|
|
212
212
|
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
213
213
|
await this.page.reload();
|
|
214
|
-
|
|
215
|
-
await sleep(10000);
|
|
214
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
217
|
throw new Error(`Priority not visible after ${maxRetries} attempts.`);
|
|
@@ -231,8 +230,7 @@ class TaskDetailsPage {
|
|
|
231
230
|
retryCount++;
|
|
232
231
|
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
233
232
|
await this.page.reload();
|
|
234
|
-
|
|
235
|
-
await sleep(10000);
|
|
233
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
236
234
|
}
|
|
237
235
|
}
|
|
238
236
|
throw new Error(`Task not visible after ${maxRetries} attempts.`);
|
|
@@ -4,7 +4,6 @@ exports.modelDiagramFromFile = exports.modelAndRunConnectorsTimerEventDiagram =
|
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
|
-
const constants_1 = require("../../utils/constants");
|
|
8
7
|
async function deleteAllUserGroups(navigationPage, identityPage) {
|
|
9
8
|
await navigationPage.goToIdentity();
|
|
10
9
|
await identityPage.clickGroupsTab();
|
|
@@ -101,7 +100,9 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
101
100
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
102
101
|
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
103
102
|
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
104
|
-
await (0,
|
|
103
|
+
await (0, test_1.expect)(connectorMarketplacePage.downloadToProjectButton).toBeVisible({
|
|
104
|
+
timeout: 30000,
|
|
105
|
+
});
|
|
105
106
|
await connectorMarketplacePage.downloadConnectorToProject();
|
|
106
107
|
}
|
|
107
108
|
await modelerCreatePage.clickRestConnectorOption();
|
|
@@ -138,14 +139,13 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
138
139
|
});
|
|
139
140
|
await connectorSettingsPage.clickResultVariableInput();
|
|
140
141
|
await connectorSettingsPage.fillResultVariableInput('result');
|
|
141
|
-
await (0, sleep_1.sleep)(5000);
|
|
142
142
|
}
|
|
143
143
|
await connectorSettingsPage.clickResultExpressionInput();
|
|
144
144
|
await connectorSettingsPage.fillResultExpressionInput(resultExpression);
|
|
145
|
-
await (0, sleep_1.sleep)(5000);
|
|
146
145
|
await modelerCreatePage.clickAppendElementButton();
|
|
147
146
|
await modelerCreatePage.clickAppendEndEventButton();
|
|
148
|
-
|
|
147
|
+
// Brief pause for auto-save before process can be run
|
|
148
|
+
await (0, sleep_1.sleep)(2000);
|
|
149
149
|
}
|
|
150
150
|
exports.modelRestConnector = modelRestConnector;
|
|
151
151
|
async function modelIntermediateWebhookConnector(modelerCreatePage, connectorMarketplacePage, processName, webhookId) {
|
|
@@ -178,7 +178,9 @@ async function modelIntermediateWebhookConnector(modelerCreatePage, connectorMar
|
|
|
178
178
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
179
179
|
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
180
180
|
await connectorMarketplacePage.fillSearchForConnectorTextbox('Webhook Connector');
|
|
181
|
-
await (0,
|
|
181
|
+
await (0, test_1.expect)(connectorMarketplacePage.downloadToProjectButton).toBeVisible({
|
|
182
|
+
timeout: 30000,
|
|
183
|
+
});
|
|
182
184
|
await connectorMarketplacePage.downloadConnectorToProject();
|
|
183
185
|
await modelerCreatePage.clickChangeTypeButton();
|
|
184
186
|
}
|
|
@@ -224,7 +226,9 @@ async function modelWebhookConnector(modelerCreatePage, connectorMarketplacePage
|
|
|
224
226
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
225
227
|
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
226
228
|
await connectorMarketplacePage.fillSearchForConnectorTextbox('Webhook Connector');
|
|
227
|
-
await (0,
|
|
229
|
+
await (0, test_1.expect)(connectorMarketplacePage.downloadToProjectButton).toBeVisible({
|
|
230
|
+
timeout: 30000,
|
|
231
|
+
});
|
|
228
232
|
await connectorMarketplacePage.downloadConnectorToProject();
|
|
229
233
|
await modelerCreatePage.clickChangeTypeButton();
|
|
230
234
|
}
|
|
@@ -237,27 +241,25 @@ async function modelWebhookConnector(modelerCreatePage, connectorMarketplacePage
|
|
|
237
241
|
await (0, sleep_1.sleep)(1000); // trying to run the process to fast causes it to miss the process id
|
|
238
242
|
}
|
|
239
243
|
exports.modelWebhookConnector = modelWebhookConnector;
|
|
240
|
-
async function assertLocatorVisibleWithRetry(page, locator, text, maxRetries =
|
|
244
|
+
async function assertLocatorVisibleWithRetry(page, locator, text, maxRetries = 30) {
|
|
241
245
|
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
242
246
|
try {
|
|
243
247
|
await (0, test_1.expect)(locator).toBeVisible({
|
|
244
|
-
timeout:
|
|
248
|
+
timeout: 3000,
|
|
245
249
|
});
|
|
246
250
|
return;
|
|
247
251
|
}
|
|
248
252
|
catch (error) {
|
|
249
|
-
|
|
250
|
-
if (attempt < maxRetries - 1) {
|
|
251
|
-
console.warn(`Attempt ${attempt + 1} failed for asserting ${text}. Retrying...`);
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
253
|
+
if (attempt >= maxRetries - 1) {
|
|
254
254
|
throw new Error(`Assertion failed after ${maxRetries} attempts`);
|
|
255
255
|
}
|
|
256
|
+
console.warn(`Attempt ${attempt + 1} failed for asserting ${text}. Retrying...`);
|
|
257
|
+
await page.reload();
|
|
256
258
|
}
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
261
|
exports.assertLocatorVisibleWithRetry = assertLocatorVisibleWithRetry;
|
|
260
|
-
async function assertPageTextWithRetry(page, text, notVisible, timeout =
|
|
262
|
+
async function assertPageTextWithRetry(page, text, notVisible, timeout = 3000, maxRetries = 30) {
|
|
261
263
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
262
264
|
try {
|
|
263
265
|
if (notVisible == true) {
|
|
@@ -273,13 +275,11 @@ async function assertPageTextWithRetry(page, text, notVisible, timeout = constan
|
|
|
273
275
|
return;
|
|
274
276
|
}
|
|
275
277
|
catch (error) {
|
|
276
|
-
|
|
277
|
-
if (attempt < maxRetries - 1) {
|
|
278
|
-
console.warn(`Attempt ${attempt + 1} failed for asserting ${text}. Retrying...`);
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
278
|
+
if (attempt >= maxRetries - 1) {
|
|
281
279
|
throw new Error(`Assertion failed after ${maxRetries} attempts`);
|
|
282
280
|
}
|
|
281
|
+
console.warn(`Attempt ${attempt + 1} failed for asserting ${text}. Retrying...`);
|
|
282
|
+
await page.reload();
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -307,7 +307,6 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
|
|
|
307
307
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
308
308
|
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
309
309
|
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
310
|
-
await (0, sleep_1.sleep)(10000);
|
|
311
310
|
await (0, test_1.expect)(page.getByText('REST ConnectorBy CamundaConnect, interact, and synchronize processes')).toBeVisible({
|
|
312
311
|
timeout: 60000,
|
|
313
312
|
});
|
|
@@ -317,9 +316,9 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
|
|
|
317
316
|
await connectorTemplatePage.publishConnector();
|
|
318
317
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
319
318
|
await modelerHomePage.clickProcessDiagram(processName);
|
|
320
|
-
await
|
|
319
|
+
await page.waitForLoadState('networkidle');
|
|
321
320
|
await page.reload();
|
|
322
|
-
await
|
|
321
|
+
await page.waitForLoadState('networkidle');
|
|
323
322
|
await modelerCreatePage.runProcessInstance();
|
|
324
323
|
}
|
|
325
324
|
exports.modelAndRunConnectorsTimerEventDiagram = modelAndRunConnectorsTimerEventDiagram;
|
|
@@ -335,6 +334,7 @@ async function modelDiagramFromFile(page, modelerHomePage, modelerCreatePage, pr
|
|
|
335
334
|
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
336
335
|
await modelerCreatePage.clickIdInput();
|
|
337
336
|
await modelerCreatePage.fillIdInput(processName);
|
|
338
|
-
|
|
337
|
+
// Wait for auto-save to complete
|
|
338
|
+
await page.waitForLoadState('networkidle');
|
|
339
339
|
}
|
|
340
340
|
exports.modelDiagramFromFile = modelDiagramFromFile;
|
|
@@ -20,7 +20,6 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
20
20
|
});
|
|
21
21
|
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
22
22
|
SM_8_7_1.test.skip('REST Connector No Auth User Flow', async ({ page, operateHomePage, modelerHomePage, operateProcessInstancePage, modelerCreatePage, connectorSettingsPage, operateProcessesPage, connectorMarketplacePage, navigationPage, context, }) => {
|
|
23
|
-
SM_8_7_1.test.slow();
|
|
24
23
|
const processName = 'REST_Connector_No_Auth_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
25
24
|
await SM_8_7_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
26
25
|
await context.clearCookies();
|
|
@@ -52,7 +51,6 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
52
51
|
});
|
|
53
52
|
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
54
53
|
SM_8_7_1.test.skip('REST Connector Bearer Token Auth User Flow', async ({ page, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, context, }) => {
|
|
55
|
-
SM_8_7_1.test.slow();
|
|
56
54
|
const processName = 'REST_Connector_Bearer_Auth_Process' +
|
|
57
55
|
(await (0, _setup_1.generateRandomStringAsync)(3));
|
|
58
56
|
await SM_8_7_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -84,7 +82,6 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
84
82
|
});
|
|
85
83
|
});
|
|
86
84
|
(0, SM_8_7_1.test)('Message Start Event Webhook Connector No Auth User Flow', async ({ modelerHomePage, navigationPage, modelerCreatePage, request, operateHomePage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, context, }) => {
|
|
87
|
-
SM_8_7_1.test.slow();
|
|
88
85
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
89
86
|
const processName = 'Start_Event_Webhook_Connector_No_Auth_Process' + randomString;
|
|
90
87
|
await SM_8_7_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -126,7 +123,6 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
126
123
|
});
|
|
127
124
|
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
128
125
|
SM_8_7_1.test.skip('Connector Secrets User Flow', async ({ page, operateHomePage, modelerHomePage, navigationPage, modelerCreatePage, connectorSettingsPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, context, }) => {
|
|
129
|
-
SM_8_7_1.test.slow();
|
|
130
126
|
const processName = 'REST_Connector_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
131
127
|
await SM_8_7_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
132
128
|
await context.clearCookies();
|
|
@@ -156,7 +152,6 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
156
152
|
});
|
|
157
153
|
});
|
|
158
154
|
(0, SM_8_7_1.test)('Intermediate Event Webhook Connector No Auth User Flow', async ({ modelerHomePage, modelerCreatePage, request, operateHomePage, operateProcessInstancePage, operateProcessesPage, navigationPage, connectorMarketplacePage, context, }) => {
|
|
159
|
-
SM_8_7_1.test.slow();
|
|
160
155
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
161
156
|
const processName = 'Intermediate_Event_Webhook_Connector_No_Auth_Process' + randomString;
|
|
162
157
|
await SM_8_7_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -204,7 +199,6 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
204
199
|
});
|
|
205
200
|
//Skipped due to bug 1252: https://github.com/camunda/c8-cross-component-e2e-tests/issues/1252
|
|
206
201
|
SM_8_7_1.test.skip('Connectors Timer Event User Flow', async ({ page, modelerHomePage, modelerCreatePage, connectorMarketplacePage, connectorTemplatePage, navigationPage, operateProcessInstancePage, operateHomePage, operateProcessesPage, context, }) => {
|
|
207
|
-
SM_8_7_1.test.slow();
|
|
208
202
|
const processName = 'Connectors_Timer_Event_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
209
203
|
await SM_8_7_1.test.step('Open Cross Component Test Project and Create a REST Connector Document Handling Flow', async () => {
|
|
210
204
|
await context.clearCookies();
|
|
@@ -3,11 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const test_1 = require("@playwright/test");
|
|
4
4
|
const SM_8_7_1 = require("../../fixtures/SM-8.7");
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
|
-
const sleep_1 = require("../../utils/sleep");
|
|
7
6
|
const KeycloakUtils_1 = require("../../pages/SM-8.7/KeycloakUtils");
|
|
8
7
|
const loggingUtils_1 = require("../../utils/loggingUtils");
|
|
9
8
|
const UtlitiesPage_1 = require("../../pages/SM-8.7/UtlitiesPage");
|
|
10
|
-
const env_1 = require("../../utils/env");
|
|
11
9
|
SM_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
12
10
|
SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
13
11
|
SM_8_7_1.test.beforeEach(async ({ navigationPage, identityPage, identityTenantPage, keycloakLoginPage, keycloakAdminPage, }, testInfo) => {
|
|
@@ -20,7 +18,6 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
20
18
|
(0, loggingUtils_1.cleanupTestLogging)();
|
|
21
19
|
});
|
|
22
20
|
(0, SM_8_7_1.test)('User Tasks and Service Task', async ({ page, modelerHomePage, modelerCreatePage, playPage, context, navigationPage, }) => {
|
|
23
|
-
SM_8_7_1.test.slow();
|
|
24
21
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
25
22
|
const processName = 'Play_Test_Process' + randomString;
|
|
26
23
|
await SM_8_7_1.test.step('Open Cross Component Test Project', async () => {
|
|
@@ -50,6 +47,7 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
50
47
|
});
|
|
51
48
|
});
|
|
52
49
|
(0, SM_8_7_1.test)('Create,update and delete test scenarios in play', async ({ modelerHomePage, modelerCreatePage, playPage, context, navigationPage, page, }) => {
|
|
50
|
+
// This test has two Play configuration switches, each with up to 180s timeout
|
|
53
51
|
SM_8_7_1.test.slow();
|
|
54
52
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
55
53
|
const processName = 'Play_Test_Process' + randomString;
|
|
@@ -77,9 +75,9 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
77
75
|
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
78
76
|
timeout: 30000,
|
|
79
77
|
});
|
|
80
|
-
// Wait for modeler background auto-save to complete
|
|
81
|
-
//
|
|
82
|
-
await
|
|
78
|
+
// Wait for modeler background auto-save network requests to complete
|
|
79
|
+
// before switching to Play, which deploys the current saved version.
|
|
80
|
+
await page.waitForLoadState('networkidle');
|
|
83
81
|
});
|
|
84
82
|
await SM_8_7_1.test.step('Open Play', async () => {
|
|
85
83
|
await modelerCreatePage.switchToPlay();
|
|
@@ -111,9 +109,8 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
111
109
|
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
112
110
|
timeout: 30000,
|
|
113
111
|
});
|
|
114
|
-
// Wait for modeler background auto-save to complete
|
|
115
|
-
|
|
116
|
-
await (0, sleep_1.sleep)(env_1.isOpenSearch ? 15000 : 2000);
|
|
112
|
+
// Wait for modeler background auto-save network requests to complete.
|
|
113
|
+
await page.waitForLoadState('networkidle');
|
|
117
114
|
await modelerCreatePage.switchToPlay();
|
|
118
115
|
await modelerCreatePage.completePlayConfiguration();
|
|
119
116
|
await playPage.clickStartInstanceButton();
|
|
@@ -8,6 +8,7 @@ const KeycloakUtils_1 = require("../../pages/SM-8.7/KeycloakUtils");
|
|
|
8
8
|
const sleep_1 = require("../../utils/sleep");
|
|
9
9
|
const loggingUtils_1 = require("../../utils/loggingUtils");
|
|
10
10
|
SM_8_7_1.test.describe('RBA Enabled User Flows Test', () => {
|
|
11
|
+
SM_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
11
12
|
SM_8_7_1.test.beforeEach(async ({ navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, identityTenantPage, context, }, testInfo) => {
|
|
12
13
|
(0, loggingUtils_1.setupTestLogging)(testInfo);
|
|
13
14
|
await context.clearCookies();
|
|
@@ -163,7 +163,9 @@ SM_8_7_1.test.describe('SM Setup Tests', () => {
|
|
|
163
163
|
await identityPage.clickModelerCheckbox();
|
|
164
164
|
await identityPage.clickConsoleCheckbox();
|
|
165
165
|
await identityPage.clickAddButton();
|
|
166
|
-
|
|
166
|
+
// Role propagation is verified by the next step's 180s-timeout assertions.
|
|
167
|
+
// A brief pause ensures the Identity API call completes before navigation.
|
|
168
|
+
await (0, sleep_1.sleep)(5000);
|
|
167
169
|
});
|
|
168
170
|
await SM_8_7_1.test.step('Ensure Apps are Accessible', async () => {
|
|
169
171
|
await navigationPage.goToOperate();
|
|
@@ -17,7 +17,6 @@ SM_8_7_1.test.describe.parallel('Web Modeler User Flow Tests', () => {
|
|
|
17
17
|
(0, loggingUtils_1.cleanupTestLogging)();
|
|
18
18
|
});
|
|
19
19
|
(0, SM_8_7_1.test)('Form.js Integration with User Task', async ({ context, taskDetailsPage, taskPanelPage, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, page, }) => {
|
|
20
|
-
SM_8_7_1.test.slow();
|
|
21
20
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
22
21
|
const processName = 'User_Task_Process_With_Form' + randomString;
|
|
23
22
|
const formName = 'New form' + randomString;
|