@camunda/e2e-test-suite 0.0.330 → 0.0.332
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.10/IdentityTenantPage.js +2 -1
- package/dist/pages/SM-8.10/ModelerCreatePage.d.ts +1 -1
- package/dist/pages/SM-8.10/ModelerCreatePage.js +5 -1
- package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.js +7 -3
- package/dist/pages/SM-8.10/TaskDetailsPage.js +1 -1
- package/dist/pages/SM-8.10/UtilitiesPage.d.ts +4 -4
- package/dist/pages/SM-8.10/UtilitiesPage.js +42 -9
- package/dist/pages/SM-8.6/IdentityTenantPage.js +1 -0
- package/dist/pages/SM-8.7/IdentityTenantPage.js +1 -0
- package/dist/pages/SM-8.8/IdentityTenantPage.js +1 -0
- package/dist/pages/SM-8.9/IdentityTenantPage.js +2 -1
- package/dist/pages/SM-8.9/ModelerCreatePage.d.ts +1 -1
- package/dist/pages/SM-8.9/ModelerCreatePage.js +5 -1
- package/dist/pages/SM-8.9/OCIdentityClusterVariablesPage.js +7 -3
- package/dist/pages/SM-8.9/TaskDetailsPage.js +1 -1
- package/dist/pages/SM-8.9/UtilitiesPage.d.ts +4 -4
- package/dist/pages/SM-8.9/UtilitiesPage.js +42 -9
- package/dist/tests/8.8/idp-user-flows.spec.js +1 -1
- package/dist/tests/SM-8.10/cluster-variables.spec.js +48 -12
- package/dist/tests/SM-8.10/connectors-user-flows.spec.js +7 -6
- package/dist/tests/SM-8.10/hto-user-flows.spec.js +7 -6
- package/dist/tests/SM-8.10/mt-enabled-user-flows.spec.js +8 -6
- package/dist/tests/SM-8.6/mt-enabled-user-flows.spec.js +8 -6
- package/dist/tests/SM-8.8/mt-enabled-user-flows.spec.js +8 -6
- package/dist/tests/SM-8.9/cluster-variables.spec.js +48 -12
- package/dist/tests/SM-8.9/connectors-user-flows.spec.js +7 -6
- package/dist/tests/SM-8.9/hto-user-flows.spec.js +7 -6
- package/dist/tests/SM-8.9/mt-enabled-user-flows.spec.js +8 -6
- package/dist/utils/apiHelpers.js +15 -5
- package/package.json +1 -1
|
@@ -167,7 +167,8 @@ class IdentityTenantPage {
|
|
|
167
167
|
await this.clickAssignUsersButton();
|
|
168
168
|
await this.clickSearchUsersInput();
|
|
169
169
|
await this.fillSearchUsersInput(user);
|
|
170
|
-
await this.page.getByText(userEmail).
|
|
170
|
+
await (0, test_1.expect)(this.page.getByText(userEmail)).toBeVisible({ timeout: 30000 });
|
|
171
|
+
await this.page.getByText(userEmail).click({ timeout: 30000 });
|
|
171
172
|
await this.clickAssignUserFinalButton();
|
|
172
173
|
}
|
|
173
174
|
async removeUserFromTenant(tenantName) {
|
|
@@ -86,7 +86,7 @@ declare class ModelerCreatePage {
|
|
|
86
86
|
readonly closeDetailsPanel: Locator;
|
|
87
87
|
readonly openDetailsPanel: Locator;
|
|
88
88
|
constructor(page: Page);
|
|
89
|
-
deployProcessInstance(): Promise<void>;
|
|
89
|
+
deployProcessInstance(tenant?: string): Promise<void>;
|
|
90
90
|
clickCloseModalButton(): Promise<void>;
|
|
91
91
|
modelCamundaUserTaskDiagram(processName: string, processId?: string, formName?: string): Promise<void>;
|
|
92
92
|
modelJobWorkerDiagram(processName: string): Promise<void>;
|
|
@@ -245,8 +245,12 @@ class ModelerCreatePage {
|
|
|
245
245
|
this.closeDetailsPanel = page.getByTitle('Close Details Panel');
|
|
246
246
|
this.openDetailsPanel = page.getByTitle('Open Details Panel');
|
|
247
247
|
}
|
|
248
|
-
async deployProcessInstance() {
|
|
248
|
+
async deployProcessInstance(tenant = '') {
|
|
249
249
|
await this.clickDeployButton();
|
|
250
|
+
if (tenant.length > 0) {
|
|
251
|
+
await this.clickTenantIdInput();
|
|
252
|
+
await this.fillTenantIdInput(tenant);
|
|
253
|
+
}
|
|
250
254
|
await this.clickDeploySubButton();
|
|
251
255
|
await (0, test_1.expect)(this.page.getByText('Process successfully deployed')).toBeVisible({
|
|
252
256
|
timeout: 30000,
|
|
@@ -51,9 +51,13 @@ class OCIdentityClusterVariablesPage {
|
|
|
51
51
|
await (0, test_1.expect)(this.variableValueField).toBeVisible();
|
|
52
52
|
await (0, test_1.expect)(this.monacoEditor).toBeVisible();
|
|
53
53
|
await this.monacoEditor.click();
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
// Monaco editor doesn't respond reliably to clear()/fill() on the
|
|
55
|
+
// hidden textarea. Use keyboard shortcuts to select-all and replace,
|
|
56
|
+
// which mirrors real user interaction.
|
|
57
|
+
await this.monacoEditorTextArea.press('Control+a');
|
|
58
|
+
await this.monacoEditorTextArea.press('Delete');
|
|
59
|
+
await this.monacoEditorTextArea.pressSequentially(newValue, { delay: 10 });
|
|
60
|
+
await (0, test_1.expect)(this.saveVariableButton).toBeEnabled({ timeout: 10000 });
|
|
57
61
|
await this.saveVariableButton.click();
|
|
58
62
|
await (0, test_1.expect)(this.successMessage).toBeVisible();
|
|
59
63
|
await (0, test_1.expect)(this.editVariableModal).toBeHidden();
|
|
@@ -94,7 +94,7 @@ class TaskDetailsPage {
|
|
|
94
94
|
this.detailsInfo = page.getByTestId('details-info');
|
|
95
95
|
this.textInput = page.locator('[class="fjs-input"]');
|
|
96
96
|
this.textInput = page.locator('[class="fjs-input"]');
|
|
97
|
-
this.taskCompletedBanner = this.page.getByText('Task completed');
|
|
97
|
+
this.taskCompletedBanner = this.page.getByText('Task completed').first();
|
|
98
98
|
this.assignedToMeText = page
|
|
99
99
|
.getByTestId('assignee')
|
|
100
100
|
.getByText('Assigned to me');
|
|
@@ -15,10 +15,10 @@ import { OCIdentityMappingRulesPage } from '../SM-8.10/OCIdentityMappingRulesPag
|
|
|
15
15
|
import { OCIdentityRolesPage } from '../SM-8.10/OCIdentityRolesPage';
|
|
16
16
|
import { Serializable } from 'playwright-core/types/structs';
|
|
17
17
|
export declare function deleteAllUserGroups(): Promise<void>;
|
|
18
|
-
export declare function runMultipleProcesses(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, numberOfProcesses: number, processName: string, processId?: string): Promise<void>;
|
|
18
|
+
export declare function runMultipleProcesses(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, numberOfProcesses: number, processName: string, processId?: string, tenant?: string): Promise<void>;
|
|
19
19
|
export declare function createUserAndAssignToRole(page: Page, navigationPage: NavigationPage, managementIdentityPage: ManagementIdentityPage, keycloakLoginPage: KeycloakLoginPage, keycloakAdminPage: KeycloakAdminPage, ocIdentityHomePage: OCIdentityHomePage, identityMappingRulesPage: OCIdentityMappingRulesPage, identityRolesPage: OCIdentityRolesPage, username: string, password: string, role?: string, testMappings?: Serializable): Promise<void>;
|
|
20
20
|
export declare function assignMappingToRole(page: Page, ocIdentityHomePage: OCIdentityHomePage, ocIdentityRolesPage: OCIdentityRolesPage, role: string, mappingRuleId: string, testMappings?: Serializable): Promise<void>;
|
|
21
|
-
export declare function createAndRunProcess(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string): Promise<void>;
|
|
21
|
+
export declare function createAndRunProcess(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string, tenant?: string): Promise<void>;
|
|
22
22
|
export declare function completeTaskWithRetry(page: Page, taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number): Promise<void>;
|
|
23
23
|
export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, connectorMarketplacePage: ConnectorMarketplacePage, processName: string, url: string, auth: string, resultExpression: string, resultVariable?: string, basicAuthCredentials?: {
|
|
24
24
|
username: string;
|
|
@@ -27,8 +27,8 @@ export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage,
|
|
|
27
27
|
export declare function assertLocatorVisibleWithPaginated(page: Page, locator: Locator, text: string): Promise<void>;
|
|
28
28
|
export declare function assertLocatorVisibleWithRetry(page: Page, locator: Locator, text: string, timeout?: number, notVisible?: boolean, maxRetries?: number, clickLocator?: Locator): Promise<void>;
|
|
29
29
|
export declare function assertPageTextWithRetry(page: Page, text: string, notVisible?: boolean, timeout?: number, maxRetries?: number): Promise<void>;
|
|
30
|
-
export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
|
|
30
|
+
export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, connectorTemplatePage: ConnectorTemplatePage, tenant?: string): Promise<void>;
|
|
31
31
|
export declare function findTextWithPagination(page: Page, text: string, timeout?: number, action?: (locator: Locator) => Promise<void>): Promise<boolean>;
|
|
32
32
|
export declare function modelDiagramFromFile(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, fileName?: string, nrOfRenamedUserTasks?: number, taskName?: string): Promise<void>;
|
|
33
33
|
export declare function expectTextWithPagination(page: Page, text: string, shouldExist?: boolean, timeout?: number): Promise<void>;
|
|
34
|
-
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string, endpoint: string): Promise<void>;
|
|
34
|
+
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string, endpoint: string, tenant?: string): Promise<void>;
|
|
@@ -14,9 +14,9 @@ async function deleteAllUserGroups() {
|
|
|
14
14
|
// await identityPage.deleteAllGroups();
|
|
15
15
|
}
|
|
16
16
|
exports.deleteAllUserGroups = deleteAllUserGroups;
|
|
17
|
-
async function runMultipleProcesses(page, modelerHomePage, modelerCreatePage, numberOfProcesses, processName, processId = '') {
|
|
17
|
+
async function runMultipleProcesses(page, modelerHomePage, modelerCreatePage, numberOfProcesses, processName, processId = '', tenant = '') {
|
|
18
18
|
for (let i = 1; i <= numberOfProcesses; i++) {
|
|
19
|
-
await createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName + i, processId.length > 0 ? processId + i : processId);
|
|
19
|
+
await createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName + i, processId.length > 0 ? processId + i : processId, tenant);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.runMultipleProcesses = runMultipleProcesses;
|
|
@@ -57,15 +57,30 @@ async function assignMappingToRole(page, ocIdentityHomePage, ocIdentityRolesPage
|
|
|
57
57
|
await assertLocatorVisibleWithPaginated(page, ocIdentityRolesPage.mappingRuleRow(mappingRuleId).first(), `${mappingRuleId} Mapping Rule`);
|
|
58
58
|
}
|
|
59
59
|
exports.assignMappingToRole = assignMappingToRole;
|
|
60
|
-
async function createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName, processId = '') {
|
|
60
|
+
async function createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName, processId = '', tenant = '') {
|
|
61
61
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
62
62
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
63
63
|
await modelerCreatePage.modelCamundaUserTaskDiagram(processName, processId);
|
|
64
|
-
await modelerCreatePage.runProcessInstance();
|
|
64
|
+
await modelerCreatePage.runProcessInstance('', tenant);
|
|
65
65
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
66
66
|
}
|
|
67
67
|
exports.createAndRunProcess = createAndRunProcess;
|
|
68
68
|
async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskName, taskPriority, maxRetries = 7) {
|
|
69
|
+
// Dismiss any lingering "Task completed" toast from a previous completion
|
|
70
|
+
// to avoid strict mode violations and stale UI state
|
|
71
|
+
try {
|
|
72
|
+
const toastCloseButton = page
|
|
73
|
+
.locator('.cds--toast-notification')
|
|
74
|
+
.getByRole('button', { name: /close/i })
|
|
75
|
+
.first();
|
|
76
|
+
if (await toastCloseButton.isVisible({ timeout: 2000 })) {
|
|
77
|
+
await toastCloseButton.click();
|
|
78
|
+
await (0, sleep_1.sleep)(500);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// No toast to dismiss, continue
|
|
83
|
+
}
|
|
69
84
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
70
85
|
try {
|
|
71
86
|
await page.waitForLoadState('networkidle');
|
|
@@ -78,8 +93,12 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
78
93
|
throw new Error(`Task ${taskName} not found in available tasks`);
|
|
79
94
|
}
|
|
80
95
|
await taskPanelPage.openTask(taskName, false);
|
|
81
|
-
await (0, sleep_1.sleep)(
|
|
96
|
+
await (0, sleep_1.sleep)(1000);
|
|
82
97
|
await (0, test_1.expect)(taskDetailsPage.detailsPanel).toBeVisible({ timeout: 30000 });
|
|
98
|
+
// Verify the correct task is loaded by checking the task name appears
|
|
99
|
+
// in the details-info section (the task name heading is outside the
|
|
100
|
+
// complementary panel, so we use detailsInfo instead of detailsPanel)
|
|
101
|
+
await (0, test_1.expect)(taskDetailsPage.detailsInfo.getByText(taskName)).toBeVisible({ timeout: 30000 });
|
|
83
102
|
if (!(await taskDetailsPage.assignedToMeText.isVisible({ timeout: 5000 }))) {
|
|
84
103
|
await taskDetailsPage.clickAssignToMeButton();
|
|
85
104
|
}
|
|
@@ -92,6 +111,20 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
92
111
|
catch (error) {
|
|
93
112
|
console.warn(`Attempt ${attempt + 1} failed for completing task ${taskName}:`, error instanceof Error ? error.message : error);
|
|
94
113
|
if (attempt < maxRetries - 1) {
|
|
114
|
+
// Dismiss any toast before reloading
|
|
115
|
+
try {
|
|
116
|
+
const toastCloseButton = page
|
|
117
|
+
.locator('.cds--toast-notification')
|
|
118
|
+
.getByRole('button', { name: /close/i })
|
|
119
|
+
.first();
|
|
120
|
+
if (await toastCloseButton.isVisible({ timeout: 1000 })) {
|
|
121
|
+
await toastCloseButton.click();
|
|
122
|
+
await (0, sleep_1.sleep)(300);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// No toast to dismiss
|
|
127
|
+
}
|
|
95
128
|
await page.reload();
|
|
96
129
|
await page.waitForLoadState('networkidle');
|
|
97
130
|
await (0, sleep_1.sleep)(500);
|
|
@@ -275,7 +308,7 @@ async function assertPageTextWithRetry(page, text, notVisible, timeout = 120000,
|
|
|
275
308
|
}
|
|
276
309
|
}
|
|
277
310
|
exports.assertPageTextWithRetry = assertPageTextWithRetry;
|
|
278
|
-
async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, connectorTemplatePage) {
|
|
311
|
+
async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, connectorTemplatePage, tenant = '') {
|
|
279
312
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
280
313
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
281
314
|
await modelerHomePage.clickUploadFilesButton();
|
|
@@ -311,7 +344,7 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
|
|
|
311
344
|
await (0, sleep_1.sleep)(5000);
|
|
312
345
|
await page.reload();
|
|
313
346
|
await (0, sleep_1.sleep)(5000);
|
|
314
|
-
await modelerCreatePage.runProcessInstance();
|
|
347
|
+
await modelerCreatePage.runProcessInstance('', tenant);
|
|
315
348
|
}
|
|
316
349
|
exports.modelAndRunConnectorsTimerEventDiagram = modelAndRunConnectorsTimerEventDiagram;
|
|
317
350
|
async function findTextWithPagination(page, text, timeout = 30000, action) {
|
|
@@ -393,7 +426,7 @@ async function expectTextWithPagination(page, text, shouldExist = true, timeout
|
|
|
393
426
|
}
|
|
394
427
|
}
|
|
395
428
|
exports.expectTextWithPagination = expectTextWithPagination;
|
|
396
|
-
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, zeebeUrl, zeebeClientId, zeebeClientSecret, endpoint) {
|
|
429
|
+
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, zeebeUrl, zeebeClientId, zeebeClientSecret, endpoint, tenant = '') {
|
|
397
430
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
398
431
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
399
432
|
await modelerHomePage.clickUploadFilesButton();
|
|
@@ -430,6 +463,6 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
|
|
|
430
463
|
await modelerCreatePage.clickCloseDetailsPanel();
|
|
431
464
|
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('g:nth-child(9) > .djs-element > .djs-hit'), endpoint, { openPanel: true });
|
|
432
465
|
await (0, sleep_1.sleep)(2000);
|
|
433
|
-
await modelerCreatePage.runProcessInstance();
|
|
466
|
+
await modelerCreatePage.runProcessInstance('', tenant);
|
|
434
467
|
}
|
|
435
468
|
exports.modelAndRunConnectorsDocHandlingDiagram = modelAndRunConnectorsDocHandlingDiagram;
|
|
@@ -139,6 +139,7 @@ class IdentityTenantPage {
|
|
|
139
139
|
await this.clickAssignUsersButton();
|
|
140
140
|
await this.clickSearchUsersInput();
|
|
141
141
|
await this.fillSearchUsersInput(user);
|
|
142
|
+
await (0, test_1.expect)(this.page.getByText(userEmail)).toBeVisible({ timeout: 30000 });
|
|
142
143
|
await this.page.getByText(userEmail).click();
|
|
143
144
|
await this.clickAssignUserFinalButton();
|
|
144
145
|
await (0, test_1.expect)(this.page.getByText('Users assigned')).toBeVisible({
|
|
@@ -233,6 +233,7 @@ class IdentityTenantPage {
|
|
|
233
233
|
await this.clickAssignUsersButton();
|
|
234
234
|
await this.clickSearchUsersInput();
|
|
235
235
|
await this.fillSearchUsersInput(user);
|
|
236
|
+
await (0, test_1.expect)(this.page.getByText(userEmail)).toBeVisible({ timeout: 30000 });
|
|
236
237
|
await this.page.getByText(userEmail).click();
|
|
237
238
|
await this.clickAssignUserFinalButton();
|
|
238
239
|
await (0, test_1.expect)(this.page.getByText('Users assigned')).toBeVisible({
|
|
@@ -166,6 +166,7 @@ class IdentityTenantPage {
|
|
|
166
166
|
await this.clickAssignUsersButton();
|
|
167
167
|
await this.clickSearchUsersInput();
|
|
168
168
|
await this.fillSearchUsersInput(user);
|
|
169
|
+
await (0, test_1.expect)(this.page.getByText(userEmail)).toBeVisible({ timeout: 30000 });
|
|
169
170
|
await this.page.getByText(userEmail).click();
|
|
170
171
|
await this.clickAssignUserFinalButton();
|
|
171
172
|
}
|
|
@@ -167,7 +167,8 @@ class IdentityTenantPage {
|
|
|
167
167
|
await this.clickAssignUsersButton();
|
|
168
168
|
await this.clickSearchUsersInput();
|
|
169
169
|
await this.fillSearchUsersInput(user);
|
|
170
|
-
await this.page.getByText(userEmail).
|
|
170
|
+
await (0, test_1.expect)(this.page.getByText(userEmail)).toBeVisible({ timeout: 30000 });
|
|
171
|
+
await this.page.getByText(userEmail).click({ timeout: 30000 });
|
|
171
172
|
await this.clickAssignUserFinalButton();
|
|
172
173
|
}
|
|
173
174
|
async removeUserFromTenant(tenantName) {
|
|
@@ -86,7 +86,7 @@ declare class ModelerCreatePage {
|
|
|
86
86
|
readonly closeDetailsPanel: Locator;
|
|
87
87
|
readonly openDetailsPanel: Locator;
|
|
88
88
|
constructor(page: Page);
|
|
89
|
-
deployProcessInstance(): Promise<void>;
|
|
89
|
+
deployProcessInstance(tenant?: string): Promise<void>;
|
|
90
90
|
clickCloseModalButton(): Promise<void>;
|
|
91
91
|
modelCamundaUserTaskDiagram(processName: string, processId?: string, formName?: string): Promise<void>;
|
|
92
92
|
modelJobWorkerDiagram(processName: string): Promise<void>;
|
|
@@ -245,8 +245,12 @@ class ModelerCreatePage {
|
|
|
245
245
|
this.closeDetailsPanel = page.getByTitle('Close Details Panel');
|
|
246
246
|
this.openDetailsPanel = page.getByTitle('Open Details Panel');
|
|
247
247
|
}
|
|
248
|
-
async deployProcessInstance() {
|
|
248
|
+
async deployProcessInstance(tenant = '') {
|
|
249
249
|
await this.clickDeployButton();
|
|
250
|
+
if (tenant.length > 0) {
|
|
251
|
+
await this.clickTenantIdInput();
|
|
252
|
+
await this.fillTenantIdInput(tenant);
|
|
253
|
+
}
|
|
250
254
|
await this.clickDeploySubButton();
|
|
251
255
|
await (0, test_1.expect)(this.page.getByText('Process successfully deployed')).toBeVisible({
|
|
252
256
|
timeout: 30000,
|
|
@@ -51,9 +51,13 @@ class OCIdentityClusterVariablesPage {
|
|
|
51
51
|
await (0, test_1.expect)(this.variableValueField).toBeVisible();
|
|
52
52
|
await (0, test_1.expect)(this.monacoEditor).toBeVisible();
|
|
53
53
|
await this.monacoEditor.click();
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
// Monaco editor doesn't respond reliably to clear()/fill() on the
|
|
55
|
+
// hidden textarea. Use keyboard shortcuts to select-all and replace,
|
|
56
|
+
// which mirrors real user interaction.
|
|
57
|
+
await this.monacoEditorTextArea.press('Control+a');
|
|
58
|
+
await this.monacoEditorTextArea.press('Delete');
|
|
59
|
+
await this.monacoEditorTextArea.pressSequentially(newValue, { delay: 10 });
|
|
60
|
+
await (0, test_1.expect)(this.saveVariableButton).toBeEnabled({ timeout: 10000 });
|
|
57
61
|
await this.saveVariableButton.click();
|
|
58
62
|
await (0, test_1.expect)(this.successMessage).toBeVisible();
|
|
59
63
|
await (0, test_1.expect)(this.editVariableModal).toBeHidden();
|
|
@@ -94,7 +94,7 @@ class TaskDetailsPage {
|
|
|
94
94
|
this.detailsInfo = page.getByTestId('details-info');
|
|
95
95
|
this.textInput = page.locator('[class="fjs-input"]');
|
|
96
96
|
this.textInput = page.locator('[class="fjs-input"]');
|
|
97
|
-
this.taskCompletedBanner = this.page.getByText('Task completed');
|
|
97
|
+
this.taskCompletedBanner = this.page.getByText('Task completed').first();
|
|
98
98
|
this.assignedToMeText = page
|
|
99
99
|
.getByTestId('assignee')
|
|
100
100
|
.getByText('Assigned to me');
|
|
@@ -15,10 +15,10 @@ import { OCIdentityMappingRulesPage } from '../SM-8.9/OCIdentityMappingRulesPage
|
|
|
15
15
|
import { OCIdentityRolesPage } from '../SM-8.9/OCIdentityRolesPage';
|
|
16
16
|
import { Serializable } from 'playwright-core/types/structs';
|
|
17
17
|
export declare function deleteAllUserGroups(): Promise<void>;
|
|
18
|
-
export declare function runMultipleProcesses(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, numberOfProcesses: number, processName: string, processId?: string): Promise<void>;
|
|
18
|
+
export declare function runMultipleProcesses(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, numberOfProcesses: number, processName: string, processId?: string, tenant?: string): Promise<void>;
|
|
19
19
|
export declare function createUserAndAssignToRole(page: Page, navigationPage: NavigationPage, managementIdentityPage: ManagementIdentityPage, keycloakLoginPage: KeycloakLoginPage, keycloakAdminPage: KeycloakAdminPage, ocIdentityHomePage: OCIdentityHomePage, identityMappingRulesPage: OCIdentityMappingRulesPage, identityRolesPage: OCIdentityRolesPage, username: string, password: string, role?: string, testMappings?: Serializable): Promise<void>;
|
|
20
20
|
export declare function assignMappingToRole(page: Page, ocIdentityHomePage: OCIdentityHomePage, ocIdentityRolesPage: OCIdentityRolesPage, role: string, mappingRuleId: string, testMappings?: Serializable): Promise<void>;
|
|
21
|
-
export declare function createAndRunProcess(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string): Promise<void>;
|
|
21
|
+
export declare function createAndRunProcess(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string, tenant?: string): Promise<void>;
|
|
22
22
|
export declare function completeTaskWithRetry(page: Page, taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number): Promise<void>;
|
|
23
23
|
export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, connectorMarketplacePage: ConnectorMarketplacePage, processName: string, url: string, auth: string, resultExpression: string, resultVariable?: string, basicAuthCredentials?: {
|
|
24
24
|
username: string;
|
|
@@ -27,8 +27,8 @@ export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage,
|
|
|
27
27
|
export declare function assertLocatorVisibleWithPaginated(page: Page, locator: Locator, text: string): Promise<void>;
|
|
28
28
|
export declare function assertLocatorVisibleWithRetry(page: Page, locator: Locator, text: string, timeout?: number, notVisible?: boolean, maxRetries?: number, clickLocator?: Locator): Promise<void>;
|
|
29
29
|
export declare function assertPageTextWithRetry(page: Page, text: string, notVisible?: boolean, timeout?: number, maxRetries?: number): Promise<void>;
|
|
30
|
-
export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
|
|
30
|
+
export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, connectorTemplatePage: ConnectorTemplatePage, tenant?: string): Promise<void>;
|
|
31
31
|
export declare function findTextWithPagination(page: Page, text: string, timeout?: number, action?: (locator: Locator) => Promise<void>): Promise<boolean>;
|
|
32
32
|
export declare function modelDiagramFromFile(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, fileName?: string, nrOfRenamedUserTasks?: number, taskName?: string): Promise<void>;
|
|
33
33
|
export declare function expectTextWithPagination(page: Page, text: string, shouldExist?: boolean, timeout?: number): Promise<void>;
|
|
34
|
-
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string, endpoint: string): Promise<void>;
|
|
34
|
+
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string, endpoint: string, tenant?: string): Promise<void>;
|
|
@@ -14,9 +14,9 @@ async function deleteAllUserGroups() {
|
|
|
14
14
|
// await identityPage.deleteAllGroups();
|
|
15
15
|
}
|
|
16
16
|
exports.deleteAllUserGroups = deleteAllUserGroups;
|
|
17
|
-
async function runMultipleProcesses(page, modelerHomePage, modelerCreatePage, numberOfProcesses, processName, processId = '') {
|
|
17
|
+
async function runMultipleProcesses(page, modelerHomePage, modelerCreatePage, numberOfProcesses, processName, processId = '', tenant = '') {
|
|
18
18
|
for (let i = 1; i <= numberOfProcesses; i++) {
|
|
19
|
-
await createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName + i, processId.length > 0 ? processId + i : processId);
|
|
19
|
+
await createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName + i, processId.length > 0 ? processId + i : processId, tenant);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.runMultipleProcesses = runMultipleProcesses;
|
|
@@ -57,15 +57,30 @@ async function assignMappingToRole(page, ocIdentityHomePage, ocIdentityRolesPage
|
|
|
57
57
|
await assertLocatorVisibleWithPaginated(page, ocIdentityRolesPage.mappingRuleRow(mappingRuleId).first(), `${mappingRuleId} Mapping Rule`);
|
|
58
58
|
}
|
|
59
59
|
exports.assignMappingToRole = assignMappingToRole;
|
|
60
|
-
async function createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName, processId = '') {
|
|
60
|
+
async function createAndRunProcess(page, modelerHomePage, modelerCreatePage, processName, processId = '', tenant = '') {
|
|
61
61
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
62
62
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
63
63
|
await modelerCreatePage.modelCamundaUserTaskDiagram(processName, processId);
|
|
64
|
-
await modelerCreatePage.runProcessInstance();
|
|
64
|
+
await modelerCreatePage.runProcessInstance('', tenant);
|
|
65
65
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
66
66
|
}
|
|
67
67
|
exports.createAndRunProcess = createAndRunProcess;
|
|
68
68
|
async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskName, taskPriority, maxRetries = 7) {
|
|
69
|
+
// Dismiss any lingering "Task completed" toast from a previous completion
|
|
70
|
+
// to avoid strict mode violations and stale UI state
|
|
71
|
+
try {
|
|
72
|
+
const toastCloseButton = page
|
|
73
|
+
.locator('.cds--toast-notification')
|
|
74
|
+
.getByRole('button', { name: /close/i })
|
|
75
|
+
.first();
|
|
76
|
+
if (await toastCloseButton.isVisible({ timeout: 2000 })) {
|
|
77
|
+
await toastCloseButton.click();
|
|
78
|
+
await (0, sleep_1.sleep)(500);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// No toast to dismiss, continue
|
|
83
|
+
}
|
|
69
84
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
70
85
|
try {
|
|
71
86
|
await page.waitForLoadState('networkidle');
|
|
@@ -78,8 +93,12 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
78
93
|
throw new Error(`Task ${taskName} not found in available tasks`);
|
|
79
94
|
}
|
|
80
95
|
await taskPanelPage.openTask(taskName, false);
|
|
81
|
-
await (0, sleep_1.sleep)(
|
|
96
|
+
await (0, sleep_1.sleep)(1000);
|
|
82
97
|
await (0, test_1.expect)(taskDetailsPage.detailsPanel).toBeVisible({ timeout: 30000 });
|
|
98
|
+
// Verify the correct task is loaded by checking the task name appears
|
|
99
|
+
// in the details-info section (the task name heading is outside the
|
|
100
|
+
// complementary panel, so we use detailsInfo instead of detailsPanel)
|
|
101
|
+
await (0, test_1.expect)(taskDetailsPage.detailsInfo.getByText(taskName)).toBeVisible({ timeout: 30000 });
|
|
83
102
|
if (!(await taskDetailsPage.assignedToMeText.isVisible({ timeout: 5000 }))) {
|
|
84
103
|
await taskDetailsPage.clickAssignToMeButton();
|
|
85
104
|
}
|
|
@@ -92,6 +111,20 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
92
111
|
catch (error) {
|
|
93
112
|
console.warn(`Attempt ${attempt + 1} failed for completing task ${taskName}:`, error instanceof Error ? error.message : error);
|
|
94
113
|
if (attempt < maxRetries - 1) {
|
|
114
|
+
// Dismiss any toast before reloading
|
|
115
|
+
try {
|
|
116
|
+
const toastCloseButton = page
|
|
117
|
+
.locator('.cds--toast-notification')
|
|
118
|
+
.getByRole('button', { name: /close/i })
|
|
119
|
+
.first();
|
|
120
|
+
if (await toastCloseButton.isVisible({ timeout: 1000 })) {
|
|
121
|
+
await toastCloseButton.click();
|
|
122
|
+
await (0, sleep_1.sleep)(300);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// No toast to dismiss
|
|
127
|
+
}
|
|
95
128
|
await page.reload();
|
|
96
129
|
await page.waitForLoadState('networkidle');
|
|
97
130
|
await (0, sleep_1.sleep)(500);
|
|
@@ -275,7 +308,7 @@ async function assertPageTextWithRetry(page, text, notVisible, timeout = 120000,
|
|
|
275
308
|
}
|
|
276
309
|
}
|
|
277
310
|
exports.assertPageTextWithRetry = assertPageTextWithRetry;
|
|
278
|
-
async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, connectorTemplatePage) {
|
|
311
|
+
async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, connectorTemplatePage, tenant = '') {
|
|
279
312
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
280
313
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
281
314
|
await modelerHomePage.clickUploadFilesButton();
|
|
@@ -311,7 +344,7 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
|
|
|
311
344
|
await (0, sleep_1.sleep)(5000);
|
|
312
345
|
await page.reload();
|
|
313
346
|
await (0, sleep_1.sleep)(5000);
|
|
314
|
-
await modelerCreatePage.runProcessInstance();
|
|
347
|
+
await modelerCreatePage.runProcessInstance('', tenant);
|
|
315
348
|
}
|
|
316
349
|
exports.modelAndRunConnectorsTimerEventDiagram = modelAndRunConnectorsTimerEventDiagram;
|
|
317
350
|
async function findTextWithPagination(page, text, timeout = 30000, action) {
|
|
@@ -393,7 +426,7 @@ async function expectTextWithPagination(page, text, shouldExist = true, timeout
|
|
|
393
426
|
}
|
|
394
427
|
}
|
|
395
428
|
exports.expectTextWithPagination = expectTextWithPagination;
|
|
396
|
-
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, zeebeUrl, zeebeClientId, zeebeClientSecret, endpoint) {
|
|
429
|
+
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, zeebeUrl, zeebeClientId, zeebeClientSecret, endpoint, tenant = '') {
|
|
397
430
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
398
431
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
399
432
|
await modelerHomePage.clickUploadFilesButton();
|
|
@@ -430,6 +463,6 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
|
|
|
430
463
|
await modelerCreatePage.clickCloseDetailsPanel();
|
|
431
464
|
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('g:nth-child(9) > .djs-element > .djs-hit'), endpoint, { openPanel: true });
|
|
432
465
|
await (0, sleep_1.sleep)(2000);
|
|
433
|
-
await modelerCreatePage.runProcessInstance();
|
|
466
|
+
await modelerCreatePage.runProcessInstance('', tenant);
|
|
434
467
|
}
|
|
435
468
|
exports.modelAndRunConnectorsDocHandlingDiagram = modelAndRunConnectorsDocHandlingDiagram;
|
|
@@ -11,12 +11,16 @@ const CLUSTER_VAR_NAMES = {
|
|
|
11
11
|
ORIGINAL_STRING: 'ORIGINAL_APP_VERSION',
|
|
12
12
|
UPDATABLE_STRING: 'UPDATABLE_APP_VERSION',
|
|
13
13
|
};
|
|
14
|
+
// Resolve cluster variable values from available env vars with fallbacks
|
|
15
|
+
const clusterVariableJsonValue = process.env.CLUSTER_VARIABLE_JSON_VALUE || process.env.CLUSTER_VARIABLE_JSON;
|
|
16
|
+
const clusterVariableStringValue = process.env.CLUSTER_VARIABLE_STRING_VALUE || 'v1.0.0';
|
|
14
17
|
function getConfigByType(type) {
|
|
15
18
|
const configs = {
|
|
16
19
|
JSON: {
|
|
17
20
|
processName: 'Cluster Variable Original JSON',
|
|
18
21
|
processNameUpdatable: 'Cluster Variable Updatable JSON',
|
|
19
22
|
taskName: 'Preview JSON cluster variables',
|
|
23
|
+
taskElementId: 'Activity_1whhatc',
|
|
20
24
|
originalVariableName: CLUSTER_VAR_NAMES.ORIGINAL_JSON,
|
|
21
25
|
updatableVariableName: CLUSTER_VAR_NAMES.UPDATABLE_JSON,
|
|
22
26
|
originalValue: originalJsonClusterVariableValue,
|
|
@@ -27,6 +31,7 @@ function getConfigByType(type) {
|
|
|
27
31
|
processName: 'Cluster Variable Original String',
|
|
28
32
|
processNameUpdatable: 'Cluster Variable Updatable String',
|
|
29
33
|
taskName: 'Preview String cluster variable',
|
|
34
|
+
taskElementId: 'Activity_1whhatc',
|
|
30
35
|
originalVariableName: CLUSTER_VAR_NAMES.ORIGINAL_STRING,
|
|
31
36
|
updatableVariableName: CLUSTER_VAR_NAMES.UPDATABLE_STRING,
|
|
32
37
|
originalValue: originalStringClusterVariableValue,
|
|
@@ -47,15 +52,17 @@ SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
|
47
52
|
SM_8_10_1.test.describe('Cluster Variables User Flows', () => {
|
|
48
53
|
SM_8_10_1.test.beforeAll(async () => {
|
|
49
54
|
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
55
|
+
if (!clusterVariableJsonValue) {
|
|
56
|
+
throw new Error('Neither CLUSTER_VARIABLE_JSON_VALUE nor CLUSTER_VARIABLE_JSON env var is set');
|
|
57
|
+
}
|
|
50
58
|
await Promise.all([
|
|
51
|
-
(0, apiHelpers_1.createJsonClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.ORIGINAL_JSON,
|
|
52
|
-
(0, apiHelpers_1.createJsonClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.UPDATABLE_JSON,
|
|
53
|
-
(0, apiHelpers_1.createStringClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.ORIGINAL_STRING,
|
|
54
|
-
(0, apiHelpers_1.createStringClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.UPDATABLE_STRING,
|
|
59
|
+
(0, apiHelpers_1.createJsonClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.ORIGINAL_JSON, clusterVariableJsonValue),
|
|
60
|
+
(0, apiHelpers_1.createJsonClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.UPDATABLE_JSON, clusterVariableJsonValue),
|
|
61
|
+
(0, apiHelpers_1.createStringClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.ORIGINAL_STRING, clusterVariableStringValue),
|
|
62
|
+
(0, apiHelpers_1.createStringClusterVariable)(authToken, 'sm', CLUSTER_VAR_NAMES.UPDATABLE_STRING, clusterVariableStringValue),
|
|
55
63
|
]);
|
|
56
|
-
originalJsonClusterVariableValue = JSON.parse(
|
|
57
|
-
originalStringClusterVariableValue =
|
|
58
|
-
process.env.CLUSTER_VARIABLE_STRING_VALUE;
|
|
64
|
+
originalJsonClusterVariableValue = JSON.parse(clusterVariableJsonValue);
|
|
65
|
+
originalStringClusterVariableValue = clusterVariableStringValue;
|
|
59
66
|
const deployments = [
|
|
60
67
|
{
|
|
61
68
|
path: './resources/cluster_variables/cluster_variable_json_readonly.bpmn',
|
|
@@ -109,20 +116,49 @@ SM_8_10_1.test.describe('Cluster Variables User Flows', () => {
|
|
|
109
116
|
},
|
|
110
117
|
];
|
|
111
118
|
for (const config of testConfigs) {
|
|
112
|
-
(0, SM_8_10_1.test)(`User views ${config.type} cluster variable in Tasklist from readonly process and completes task`, async ({ navigationPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, taskPanelPage, taskDetailsPage, }) => {
|
|
119
|
+
(0, SM_8_10_1.test)(`User views ${config.type} cluster variable in Tasklist from readonly process and completes task`, async ({ page, navigationPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, taskPanelPage, taskDetailsPage, }) => {
|
|
113
120
|
SM_8_10_1.test.slow();
|
|
114
121
|
const derived = getConfigByType(config.type);
|
|
115
122
|
const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(config.processKeyDisplay()), authToken);
|
|
116
123
|
await SM_8_10_1.test.step('User can access the process on operate', async () => {
|
|
117
124
|
await operateHomePage.clickProcessesTab();
|
|
118
125
|
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
119
|
-
await operateProcessesPage.clickProcessInstanceLink(
|
|
126
|
+
await operateProcessesPage.clickProcessInstanceLink(String(instanceKey));
|
|
120
127
|
await operateProcessInstancePage.assertActiveTokenIsPresent();
|
|
121
128
|
});
|
|
122
129
|
await SM_8_10_1.test.step(`User can view the process with ${config.type} cluster variable on tasklist`, async () => {
|
|
123
130
|
await navigationPage.goToTasklist();
|
|
124
131
|
await (0, sleep_1.sleep)(5000);
|
|
125
|
-
|
|
132
|
+
// Tasklist may display the BPMN element ID instead of the task name
|
|
133
|
+
// due to inconsistent metadata. Determine which label is visible.
|
|
134
|
+
const taskNameLocator = taskPanelPage.availableTasks.getByText(derived.taskName, { exact: true });
|
|
135
|
+
const taskElementIdLocator = taskPanelPage.availableTasks.getByText(derived.taskElementId, { exact: true });
|
|
136
|
+
let taskLabel = derived.taskName;
|
|
137
|
+
for (let attempt = 1; attempt <= 30; attempt++) {
|
|
138
|
+
const [nameVisible, elementIdVisible] = await Promise.all([
|
|
139
|
+
taskNameLocator
|
|
140
|
+
.first()
|
|
141
|
+
.isVisible()
|
|
142
|
+
.catch(() => false),
|
|
143
|
+
taskElementIdLocator
|
|
144
|
+
.first()
|
|
145
|
+
.isVisible()
|
|
146
|
+
.catch(() => false),
|
|
147
|
+
]);
|
|
148
|
+
if (nameVisible) {
|
|
149
|
+
taskLabel = derived.taskName;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
if (elementIdVisible) {
|
|
153
|
+
taskLabel = derived.taskElementId;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
if (attempt < 30) {
|
|
157
|
+
await page.reload();
|
|
158
|
+
await (0, sleep_1.sleep)(2000);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
await taskPanelPage.openTask(taskLabel);
|
|
126
162
|
await taskDetailsPage.clickAssignToMeButton();
|
|
127
163
|
});
|
|
128
164
|
await SM_8_10_1.test.step(`User can view the value of ${config.type} cluster variable and complete the task`, async () => {
|
|
@@ -141,7 +177,7 @@ SM_8_10_1.test.describe('Cluster Variables User Flows', () => {
|
|
|
141
177
|
await operateHomePage.clickProcessesTab();
|
|
142
178
|
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
143
179
|
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
144
|
-
await operateProcessesPage.clickProcessInstanceLink(
|
|
180
|
+
await operateProcessesPage.clickProcessInstanceLink(String(instanceKey), 'completed');
|
|
145
181
|
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
146
182
|
});
|
|
147
183
|
});
|
|
@@ -177,7 +213,7 @@ SM_8_10_1.test.describe('Cluster Variables User Flows', () => {
|
|
|
177
213
|
await operateHomePage.clickProcessesTab();
|
|
178
214
|
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
179
215
|
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
180
|
-
await operateProcessesPage.clickProcessInstanceLink(
|
|
216
|
+
await operateProcessesPage.clickProcessInstanceLink(String(instanceKey), 'completed');
|
|
181
217
|
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
182
218
|
});
|
|
183
219
|
await SM_8_10_1.test.step(`User verifies the updated ${config.type} cluster variable value is present in process variables`, async () => {
|