@camunda/e2e-test-suite 0.0.1442 → 0.0.1444
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/.github/c8_versions.json +1 -0
- package/README.md +2 -0
- package/dist/fixtures/SM-8.11.d.ts +77 -0
- package/dist/fixtures/SM-8.11.js +176 -0
- package/dist/pages/8.7/ModelerCreatePage.js +21 -0
- package/dist/pages/SM-8.11/Authorization.d.ts +39 -0
- package/dist/pages/SM-8.11/Authorization.js +349 -0
- package/dist/pages/SM-8.11/ClusterDetailsPage.d.ts +8 -0
- package/dist/pages/SM-8.11/ClusterDetailsPage.js +65 -0
- package/dist/pages/SM-8.11/ClusterPage.d.ts +11 -0
- package/dist/pages/SM-8.11/ClusterPage.js +37 -0
- package/dist/pages/SM-8.11/ConnectorMarketplacePage.d.ts +27 -0
- package/dist/pages/SM-8.11/ConnectorMarketplacePage.js +187 -0
- package/dist/pages/SM-8.11/ConnectorSettingsPage.d.ts +41 -0
- package/dist/pages/SM-8.11/ConnectorSettingsPage.js +153 -0
- package/dist/pages/SM-8.11/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/SM-8.11/ConnectorTemplatePage.js +34 -0
- package/dist/pages/SM-8.11/FormJsPage.d.ts +33 -0
- package/dist/pages/SM-8.11/FormJsPage.js +109 -0
- package/dist/pages/SM-8.11/HomePage.d.ts +20 -0
- package/dist/pages/SM-8.11/HomePage.js +49 -0
- package/dist/pages/SM-8.11/IdentityTenantPage.d.ts +53 -0
- package/dist/pages/SM-8.11/IdentityTenantPage.js +264 -0
- package/dist/pages/SM-8.11/IdentityUsersPage.d.ts +92 -0
- package/dist/pages/SM-8.11/IdentityUsersPage.js +485 -0
- package/dist/pages/SM-8.11/KeycloakAdminPage.d.ts +17 -0
- package/dist/pages/SM-8.11/KeycloakAdminPage.js +78 -0
- package/dist/pages/SM-8.11/KeycloakLoginPage.d.ts +12 -0
- package/dist/pages/SM-8.11/KeycloakLoginPage.js +32 -0
- package/dist/pages/SM-8.11/KeycloakUtils.d.ts +17 -0
- package/dist/pages/SM-8.11/KeycloakUtils.js +94 -0
- package/dist/pages/SM-8.11/LoginPage.d.ts +21 -0
- package/dist/pages/SM-8.11/LoginPage.js +112 -0
- package/dist/pages/SM-8.11/ManagementIdentityPage.d.ts +44 -0
- package/dist/pages/SM-8.11/ManagementIdentityPage.js +176 -0
- package/dist/pages/SM-8.11/ModelerCreatePage.d.ts +238 -0
- package/dist/pages/SM-8.11/ModelerCreatePage.js +1950 -0
- package/dist/pages/SM-8.11/ModelerHomePage.d.ts +97 -0
- package/dist/pages/SM-8.11/ModelerHomePage.js +956 -0
- package/dist/pages/SM-8.11/NavigationPage.d.ts +58 -0
- package/dist/pages/SM-8.11/NavigationPage.js +389 -0
- package/dist/pages/SM-8.11/OCIdentityAuthorizationsPage.d.ts +10 -0
- package/dist/pages/SM-8.11/OCIdentityAuthorizationsPage.js +22 -0
- package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.d.ts +22 -0
- package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.js +120 -0
- package/dist/pages/SM-8.11/OCIdentityGroupsPage.d.ts +39 -0
- package/dist/pages/SM-8.11/OCIdentityGroupsPage.js +154 -0
- package/dist/pages/SM-8.11/OCIdentityHomePage.d.ts +23 -0
- package/dist/pages/SM-8.11/OCIdentityHomePage.js +115 -0
- package/dist/pages/SM-8.11/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/SM-8.11/OCIdentityMappingRulesPage.js +116 -0
- package/dist/pages/SM-8.11/OCIdentityRolesPage.d.ts +61 -0
- package/dist/pages/SM-8.11/OCIdentityRolesPage.js +433 -0
- package/dist/pages/SM-8.11/OCTenantPage.d.ts +73 -0
- package/dist/pages/SM-8.11/OCTenantPage.js +399 -0
- package/dist/pages/SM-8.11/OperateHomePage.d.ts +26 -0
- package/dist/pages/SM-8.11/OperateHomePage.js +139 -0
- package/dist/pages/SM-8.11/OperateProcessInstancePage.d.ts +30 -0
- package/dist/pages/SM-8.11/OperateProcessInstancePage.js +276 -0
- package/dist/pages/SM-8.11/OperateProcessesPage.d.ts +38 -0
- package/dist/pages/SM-8.11/OperateProcessesPage.js +383 -0
- package/dist/pages/SM-8.11/OptimizeCollectionsPage.d.ts +17 -0
- package/dist/pages/SM-8.11/OptimizeCollectionsPage.js +62 -0
- package/dist/pages/SM-8.11/OptimizeDashboardPage.d.ts +14 -0
- package/dist/pages/SM-8.11/OptimizeDashboardPage.js +63 -0
- package/dist/pages/SM-8.11/OptimizeHomePage.d.ts +19 -0
- package/dist/pages/SM-8.11/OptimizeHomePage.js +76 -0
- package/dist/pages/SM-8.11/OptimizeReportPage.d.ts +50 -0
- package/dist/pages/SM-8.11/OptimizeReportPage.js +209 -0
- package/dist/pages/SM-8.11/PlayPage.d.ts +47 -0
- package/dist/pages/SM-8.11/PlayPage.js +389 -0
- package/dist/pages/SM-8.11/ProcessApplicationPage.d.ts +35 -0
- package/dist/pages/SM-8.11/ProcessApplicationPage.js +340 -0
- package/dist/pages/SM-8.11/SettingsPage.d.ts +12 -0
- package/dist/pages/SM-8.11/SettingsPage.js +34 -0
- package/dist/pages/SM-8.11/TaskDetailsPage.d.ts +70 -0
- package/dist/pages/SM-8.11/TaskDetailsPage.js +273 -0
- package/dist/pages/SM-8.11/TaskPanelPage.d.ts +29 -0
- package/dist/pages/SM-8.11/TaskPanelPage.js +320 -0
- package/dist/pages/SM-8.11/TaskProcessesPage.d.ts +15 -0
- package/dist/pages/SM-8.11/TaskProcessesPage.js +77 -0
- package/dist/pages/SM-8.11/UtilitiesPage.d.ts +38 -0
- package/dist/pages/SM-8.11/UtilitiesPage.js +573 -0
- package/dist/pages/SM-8.11/optimizeReportUtils.d.ts +6 -0
- package/dist/pages/SM-8.11/optimizeReportUtils.js +77 -0
- package/dist/tests/SM-8.11/cluster-management-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/cluster-management-user-flows.spec.js +48 -0
- package/dist/tests/SM-8.11/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/cluster-variables.spec.js +226 -0
- package/dist/tests/SM-8.11/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/connectors-user-flows.spec.js +307 -0
- package/dist/tests/SM-8.11/document-handling-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/document-handling-user-flows.spec.js +174 -0
- package/dist/tests/SM-8.11/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/hto-user-flows.spec.js +410 -0
- package/dist/tests/SM-8.11/hub-web-modeler-smoke.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/hub-web-modeler-smoke.spec.js +24 -0
- package/dist/tests/SM-8.11/identity-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/identity-user-flows.spec.js +220 -0
- package/dist/tests/SM-8.11/license-key-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/license-key-user-flows.spec.js +461 -0
- package/dist/tests/SM-8.11/login.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/login.spec.js +24 -0
- package/dist/tests/SM-8.11/migration-path-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/migration-path-user-flows.spec.js +263 -0
- package/dist/tests/SM-8.11/mt-enabled-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/mt-enabled-user-flows.spec.js +607 -0
- package/dist/tests/SM-8.11/optimize-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/optimize-user-flows.spec.js +505 -0
- package/dist/tests/SM-8.11/play.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/play.spec.js +144 -0
- package/dist/tests/SM-8.11/rba-enabled-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/rba-enabled-user-flows.spec.js +712 -0
- package/dist/tests/SM-8.11/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/smoke-tests.spec.js +167 -0
- package/dist/tests/SM-8.11/test-setup.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/test-setup.spec.js +24 -0
- package/dist/tests/SM-8.11/topology-orchestration-smoke.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/topology-orchestration-smoke.spec.js +58 -0
- package/dist/tests/SM-8.11/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/web-modeler-user-flows.spec.js +223 -0
- package/package.json +1 -1
- package/playwright.config.ts +21 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperateProcessInstancePage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const constants_1 = require("../../utils/constants");
|
|
7
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
8
|
+
class OperateProcessInstancePage {
|
|
9
|
+
page;
|
|
10
|
+
diagram;
|
|
11
|
+
completedIcon;
|
|
12
|
+
diagramSpinner;
|
|
13
|
+
activeIcon;
|
|
14
|
+
incidentIcon;
|
|
15
|
+
variablesList;
|
|
16
|
+
messageVariable;
|
|
17
|
+
constructor(page) {
|
|
18
|
+
this.page = page;
|
|
19
|
+
this.diagram = page.getByTestId('diagram');
|
|
20
|
+
this.completedIcon = page
|
|
21
|
+
.getByTestId('instance-header')
|
|
22
|
+
.getByTestId('COMPLETED-icon');
|
|
23
|
+
this.diagramSpinner = page.getByTestId('diagram-spinner');
|
|
24
|
+
this.activeIcon = page
|
|
25
|
+
.getByTestId('instance-header')
|
|
26
|
+
.getByTestId('ACTIVE-icon');
|
|
27
|
+
this.incidentIcon = page
|
|
28
|
+
.getByTestId('instance-header')
|
|
29
|
+
.getByTestId('INCIDENT-icon');
|
|
30
|
+
this.variablesList = page.getByTestId('variables-list');
|
|
31
|
+
this.messageVariable = page.getByTestId('variable-message');
|
|
32
|
+
}
|
|
33
|
+
async connectorResultVariableName(name) {
|
|
34
|
+
return await this.page.getByTestId(name);
|
|
35
|
+
}
|
|
36
|
+
async connectorResultVariableValue(variableName) {
|
|
37
|
+
return await this.page.getByTestId(variableName).locator('td').last();
|
|
38
|
+
}
|
|
39
|
+
async completedIconAssertion() {
|
|
40
|
+
let retryCount = 0;
|
|
41
|
+
const maxRetries = 3;
|
|
42
|
+
while (retryCount < maxRetries) {
|
|
43
|
+
try {
|
|
44
|
+
await (0, test_1.expect)(this.completedIcon).toBeVisible({
|
|
45
|
+
timeout: 90000,
|
|
46
|
+
});
|
|
47
|
+
return; // Exit the function if the expectation is met
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
// If the completed icon isn't found, reload the page and try again
|
|
51
|
+
retryCount++;
|
|
52
|
+
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
53
|
+
await this.page.reload();
|
|
54
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
throw new Error(`Completed icon not visible after ${maxRetries} attempts.`);
|
|
58
|
+
}
|
|
59
|
+
async activeIconAssertion() {
|
|
60
|
+
let retryCount = 0;
|
|
61
|
+
const maxRetries = 3;
|
|
62
|
+
while (retryCount < maxRetries) {
|
|
63
|
+
try {
|
|
64
|
+
await (0, test_1.expect)(this.activeIcon).toBeVisible({
|
|
65
|
+
timeout: 90000,
|
|
66
|
+
});
|
|
67
|
+
return; // Exit the function if the expectation is met
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
// If the active icon isn't found, reload the page and try again
|
|
71
|
+
retryCount++;
|
|
72
|
+
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
73
|
+
await this.page.reload();
|
|
74
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
throw new Error(`Active icon not visible after ${maxRetries} attempts.`);
|
|
78
|
+
}
|
|
79
|
+
async activeUserTaskIconVisibleAssertion(taskName) {
|
|
80
|
+
let retryCount = 0;
|
|
81
|
+
const maxRetries = 3;
|
|
82
|
+
while (retryCount < maxRetries) {
|
|
83
|
+
try {
|
|
84
|
+
await (0, test_1.expect)(this.page.getByTestId(taskName)).toBeVisible({
|
|
85
|
+
timeout: 90000,
|
|
86
|
+
});
|
|
87
|
+
return; // Exit the function if the expectation is met
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
// If the active icon isn't found, reload the page and try again
|
|
91
|
+
retryCount++;
|
|
92
|
+
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
93
|
+
await this.page.reload();
|
|
94
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
throw new Error(`Active icon not visible after ${maxRetries} attempts.`);
|
|
98
|
+
}
|
|
99
|
+
async activeUserTaskIconNotVisibleAssertion(taskName) {
|
|
100
|
+
let retryCount = 0;
|
|
101
|
+
const maxRetries = 3;
|
|
102
|
+
while (retryCount < maxRetries) {
|
|
103
|
+
try {
|
|
104
|
+
await (0, test_1.expect)(this.page.getByTestId(taskName)).not.toBeVisible({
|
|
105
|
+
timeout: 90000,
|
|
106
|
+
});
|
|
107
|
+
return; // Exit the function if the expectation is met
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
// If the active icon is found, reload the page and try again
|
|
111
|
+
retryCount++;
|
|
112
|
+
console.log(`Attempt ${retryCount} failed. Retrying...`);
|
|
113
|
+
await this.page.reload();
|
|
114
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
throw new Error(`Active icon visible after ${maxRetries} attempts.`);
|
|
118
|
+
}
|
|
119
|
+
async tenantNameAssertion(name) {
|
|
120
|
+
await (0, test_1.expect)(this.page.getByRole('cell', { name: name, exact: true })).toBeVisible({ timeout: 60000 });
|
|
121
|
+
}
|
|
122
|
+
async incidentIconAssertion() {
|
|
123
|
+
await (0, test_1.expect)(this.incidentIcon).toBeVisible({ timeout: 90000 });
|
|
124
|
+
}
|
|
125
|
+
async assertEitherIncidentOrActiveIconVisible() {
|
|
126
|
+
const either = this.incidentIcon.or(this.activeIcon);
|
|
127
|
+
await (0, test_1.expect)(either).toBeVisible({ timeout: 90000 });
|
|
128
|
+
if (await this.incidentIcon.isVisible())
|
|
129
|
+
return 'incident';
|
|
130
|
+
return 'active';
|
|
131
|
+
}
|
|
132
|
+
async assertEitherIncidentOrCompletedIconVisible() {
|
|
133
|
+
const either = this.incidentIcon.or(this.completedIcon);
|
|
134
|
+
await (0, test_1.expect)(either).toBeVisible({ timeout: 90000 });
|
|
135
|
+
if (await this.incidentIcon.isVisible())
|
|
136
|
+
return 'incident';
|
|
137
|
+
return 'completed';
|
|
138
|
+
}
|
|
139
|
+
async assertProcessCompleteStatusWithRetry(timeout = 60000, maxRetries = 10) {
|
|
140
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
141
|
+
try {
|
|
142
|
+
await (0, test_1.expect)(this.completedIcon).toBeVisible({
|
|
143
|
+
timeout: timeout,
|
|
144
|
+
});
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
if (attempt < maxRetries - 1) {
|
|
149
|
+
console.warn(`Process complete status attempt ${attempt + 1} failed. Retrying...`);
|
|
150
|
+
await this.page.reload();
|
|
151
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
throw new Error(`Assertion failed after ${maxRetries} attempts`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async assertProcessVariableContainsText(variableName, text) {
|
|
160
|
+
const maxRetries = 3;
|
|
161
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
162
|
+
try {
|
|
163
|
+
await (0, test_1.expect)(this.page.getByTestId(`variable-${variableName}`)).toContainText(text, { timeout: 8000 });
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
catch (uiError) {
|
|
167
|
+
// Document-typed variables render as a compact summary
|
|
168
|
+
// (e.g. "3 documents" or "<docId> <size>") that omits metadata
|
|
169
|
+
// such as filename, storeId, and contentType. Fall back to the
|
|
170
|
+
// raw JSON value from the variables API response.
|
|
171
|
+
try {
|
|
172
|
+
const value = await this.captureVariableJsonValue(variableName);
|
|
173
|
+
if (value != null && value.includes(text)) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch (apiError) {
|
|
178
|
+
console.log(`captureVariableJsonValue for ${variableName} attempt ${attempt + 1}/${maxRetries} failed: ${apiError}`);
|
|
179
|
+
}
|
|
180
|
+
console.log(`assertProcessVariableContainsText attempt ${attempt + 1}/${maxRetries} failed: ${uiError}`);
|
|
181
|
+
if (attempt < maxRetries - 1) {
|
|
182
|
+
await this.page.reload({ timeout: 10000 }).catch(() => { });
|
|
183
|
+
await this.page.waitForLoadState('domcontentloaded').catch(() => { });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
throw new Error(`Failed to assert variable ${variableName} contains "${text}" after ${maxRetries} attempts.`);
|
|
188
|
+
}
|
|
189
|
+
async captureVariableJsonValue(variableName) {
|
|
190
|
+
let capturedValue = null;
|
|
191
|
+
const responsePromise = this.page
|
|
192
|
+
.waitForResponse(async (resp) => {
|
|
193
|
+
if (!resp.url().includes('/v2/variables/search') ||
|
|
194
|
+
resp.status() !== 200) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
const body = await resp.text();
|
|
199
|
+
const data = JSON.parse(body);
|
|
200
|
+
const item = data?.items?.find((i) => i.name === variableName);
|
|
201
|
+
if (item?.value != null) {
|
|
202
|
+
capturedValue = String(item.value);
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
catch {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
}, { timeout: 15000 })
|
|
211
|
+
.catch(() => null);
|
|
212
|
+
await this.page.reload({ timeout: 10000 }).catch(() => { });
|
|
213
|
+
await this.page.waitForLoadState('domcontentloaded').catch(() => { });
|
|
214
|
+
await responsePromise;
|
|
215
|
+
return capturedValue;
|
|
216
|
+
}
|
|
217
|
+
async assertResultVariableVisibleWithRetry(variableName) {
|
|
218
|
+
const maxRetries = 3;
|
|
219
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
220
|
+
try {
|
|
221
|
+
await (0, test_1.expect)(this.variablesList).toBeVisible({ timeout: 8000 });
|
|
222
|
+
await (0, test_1.expect)(this.page.getByTestId(`variable-${variableName}`)).toBeVisible({ timeout: 8000 });
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
console.log(`assertResultVariableVisibleWithRetry attempt ${attempt + 1}/${maxRetries} failed: ${error}`);
|
|
227
|
+
if (attempt < maxRetries - 1) {
|
|
228
|
+
await this.page.reload({ timeout: 10000 }).catch(() => { });
|
|
229
|
+
await this.page.waitForLoadState('domcontentloaded').catch(() => { });
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
throw new Error(`Failed to assert variable ${variableName} visible after ${maxRetries} attempts.`);
|
|
234
|
+
}
|
|
235
|
+
async assertActiveTokenIsPresent() {
|
|
236
|
+
await (0, test_1.expect)(this.activeIcon).toBeVisible({ timeout: 60000 });
|
|
237
|
+
}
|
|
238
|
+
async assertBusinessIdVisible(businessId) {
|
|
239
|
+
const instanceHeader = this.page.getByTestId('instance-header');
|
|
240
|
+
const reload = async () => {
|
|
241
|
+
await this.page.reload();
|
|
242
|
+
};
|
|
243
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, instanceHeader.getByText('Business ID'), {
|
|
244
|
+
totalTimeout: 180000,
|
|
245
|
+
visibilityTimeout: 10000,
|
|
246
|
+
maxRetries: 10,
|
|
247
|
+
postAction: reload,
|
|
248
|
+
});
|
|
249
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, instanceHeader.getByText(businessId, { exact: true }), {
|
|
250
|
+
totalTimeout: 180000,
|
|
251
|
+
visibilityTimeout: 10000,
|
|
252
|
+
maxRetries: 10,
|
|
253
|
+
postAction: reload,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
async assertVariablesListVisible(timeout = 30000) {
|
|
257
|
+
const startTime = Date.now();
|
|
258
|
+
while (Date.now() - startTime < timeout) {
|
|
259
|
+
try {
|
|
260
|
+
await (0, test_1.expect)(this.variablesList).toBeVisible({
|
|
261
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
262
|
+
});
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
console.log(`Variables list not visible, reloading... (${Math.round((Date.now() - startTime) / 1000)}s elapsed)`);
|
|
267
|
+
await this.page
|
|
268
|
+
.reload({ timeout: 10000 })
|
|
269
|
+
.catch(() => console.log('Page reload timed out, continuing...'));
|
|
270
|
+
await (0, sleep_1.sleep)(2000);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
throw new Error(`Variables list not visible after ${Math.round(timeout / 1000)}s`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
exports.OperateProcessInstancePage = OperateProcessInstancePage;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class OperateProcessesPage {
|
|
3
|
+
private page;
|
|
4
|
+
readonly processResultCount: Locator;
|
|
5
|
+
readonly processActiveCheckbox: Locator;
|
|
6
|
+
readonly processCompletedCheckbox: Locator;
|
|
7
|
+
readonly processRunningInstancesCheckbox: Locator;
|
|
8
|
+
readonly processIncidentsCheckbox: Locator;
|
|
9
|
+
readonly processPageHeading: Locator;
|
|
10
|
+
readonly noMatchingInstancesMessage: Locator;
|
|
11
|
+
readonly processFinishedInstancesCheckbox: Locator;
|
|
12
|
+
readonly moreFiltersButton: Locator;
|
|
13
|
+
readonly processInstanceKeyTextBox: Locator;
|
|
14
|
+
private readonly whatsNewPopUp;
|
|
15
|
+
private readonly gotItButton;
|
|
16
|
+
private readonly processesTabLink;
|
|
17
|
+
constructor(page: Page);
|
|
18
|
+
private setCheckboxState;
|
|
19
|
+
private checkCheckbox;
|
|
20
|
+
private uncheckCheckbox;
|
|
21
|
+
private uncheckCompletedCheckbox;
|
|
22
|
+
private uncheckActiveCheckbox;
|
|
23
|
+
private toggleActiveCheckboxOn;
|
|
24
|
+
private toggleCompletedCheckbox;
|
|
25
|
+
private applyProcessStateFilter;
|
|
26
|
+
private dismissWhatsNewPopUp;
|
|
27
|
+
private checkTableForProcess;
|
|
28
|
+
clickProcessActiveCheckbox(): Promise<void>;
|
|
29
|
+
clickProcessCompletedCheckbox(): Promise<void>;
|
|
30
|
+
clickProcessIncidentsCheckbox(): Promise<void>;
|
|
31
|
+
clickRunningProcessInstancesCheckbox(): Promise<void>;
|
|
32
|
+
clickFinishedProcessInstancesCheckbox(): Promise<void>;
|
|
33
|
+
clickProcessInstanceLink(processName: string, type?: 'active' | 'completed'): Promise<void>;
|
|
34
|
+
clickProcessInstanceLinkWithPartialNameMatch(processName: string): Promise<void>;
|
|
35
|
+
private getMoreFilterValueLocator;
|
|
36
|
+
applyMoreFilters(filter: string, value: string): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export { OperateProcessesPage };
|