@camunda/e2e-test-suite 0.0.202 → 0.0.203
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/README.md +1 -0
- package/dist/fixtures/8.10.d.ts +75 -0
- package/dist/fixtures/8.10.js +187 -0
- package/dist/pages/8.10/AppsPage.d.ts +38 -0
- package/dist/pages/8.10/AppsPage.js +398 -0
- package/dist/pages/8.10/Authorization.d.ts +31 -0
- package/dist/pages/8.10/Authorization.js +143 -0
- package/dist/pages/8.10/ClientCredentialsDetailsPage.d.ts +12 -0
- package/dist/pages/8.10/ClientCredentialsDetailsPage.js +36 -0
- package/dist/pages/8.10/ClusterDetailsPage.d.ts +81 -0
- package/dist/pages/8.10/ClusterDetailsPage.js +475 -0
- package/dist/pages/8.10/ClusterPage.d.ts +63 -0
- package/dist/pages/8.10/ClusterPage.js +349 -0
- package/dist/pages/8.10/ClusterSecretsPage.d.ts +46 -0
- package/dist/pages/8.10/ClusterSecretsPage.js +219 -0
- package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +19 -0
- package/dist/pages/8.10/ConnectorMarketplacePage.js +56 -0
- package/dist/pages/8.10/ConnectorSettingsPage.d.ts +38 -0
- package/dist/pages/8.10/ConnectorSettingsPage.js +142 -0
- package/dist/pages/8.10/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/8.10/ConnectorTemplatePage.js +34 -0
- package/dist/pages/8.10/ConsoleOrganizationPage.d.ts +76 -0
- package/dist/pages/8.10/ConsoleOrganizationPage.js +402 -0
- package/dist/pages/8.10/FormJsPage.d.ts +28 -0
- package/dist/pages/8.10/FormJsPage.js +85 -0
- package/dist/pages/8.10/HomePage.d.ts +27 -0
- package/dist/pages/8.10/HomePage.js +88 -0
- package/dist/pages/8.10/IdpCreatePage.d.ts +81 -0
- package/dist/pages/8.10/IdpCreatePage.js +355 -0
- package/dist/pages/8.10/LoginPage.d.ts +42 -0
- package/dist/pages/8.10/LoginPage.js +93 -0
- package/dist/pages/8.10/ModelerCreatePage.d.ts +224 -0
- package/dist/pages/8.10/ModelerCreatePage.js +1166 -0
- package/dist/pages/8.10/ModelerHomePage.d.ts +54 -0
- package/dist/pages/8.10/ModelerHomePage.js +235 -0
- package/dist/pages/8.10/ModelerUserInvitePage.d.ts +29 -0
- package/dist/pages/8.10/ModelerUserInvitePage.js +136 -0
- package/dist/pages/8.10/OCIdentityAuthorizationsPage.d.ts +11 -0
- package/dist/pages/8.10/OCIdentityAuthorizationsPage.js +32 -0
- package/dist/pages/8.10/OCIdentityGroupsPage.d.ts +38 -0
- package/dist/pages/8.10/OCIdentityGroupsPage.js +166 -0
- package/dist/pages/8.10/OCIdentityHomePage.d.ts +18 -0
- package/dist/pages/8.10/OCIdentityHomePage.js +57 -0
- package/dist/pages/8.10/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/8.10/OCIdentityMappingRulesPage.js +124 -0
- package/dist/pages/8.10/OCIdentityRolesPage.d.ts +40 -0
- package/dist/pages/8.10/OCIdentityRolesPage.js +182 -0
- package/dist/pages/8.10/OperateHomePage.d.ts +23 -0
- package/dist/pages/8.10/OperateHomePage.js +73 -0
- package/dist/pages/8.10/OperateProcessInstancePage.d.ts +23 -0
- package/dist/pages/8.10/OperateProcessInstancePage.js +94 -0
- package/dist/pages/8.10/OperateProcessesPage.d.ts +25 -0
- package/dist/pages/8.10/OperateProcessesPage.js +103 -0
- package/dist/pages/8.10/OptimizeCollectionsPage.d.ts +17 -0
- package/dist/pages/8.10/OptimizeCollectionsPage.js +68 -0
- package/dist/pages/8.10/OptimizeDashboardPage.d.ts +11 -0
- package/dist/pages/8.10/OptimizeDashboardPage.js +65 -0
- package/dist/pages/8.10/OptimizeHomePage.d.ts +13 -0
- package/dist/pages/8.10/OptimizeHomePage.js +55 -0
- package/dist/pages/8.10/OptimizeReportPage.d.ts +48 -0
- package/dist/pages/8.10/OptimizeReportPage.js +159 -0
- package/dist/pages/8.10/PlayPage.d.ts +14 -0
- package/dist/pages/8.10/PlayPage.js +68 -0
- package/dist/pages/8.10/SettingsPage.d.ts +10 -0
- package/dist/pages/8.10/SettingsPage.js +43 -0
- package/dist/pages/8.10/SignUpPage.d.ts +42 -0
- package/dist/pages/8.10/SignUpPage.js +134 -0
- package/dist/pages/8.10/TaskDetailsPage.d.ts +75 -0
- package/dist/pages/8.10/TaskDetailsPage.js +269 -0
- package/dist/pages/8.10/TaskPanelPage.d.ts +21 -0
- package/dist/pages/8.10/TaskPanelPage.js +93 -0
- package/dist/pages/8.10/TaskProcessesPage.d.ts +13 -0
- package/dist/pages/8.10/TaskProcessesPage.js +68 -0
- package/dist/pages/8.10/UtilitiesPage.d.ts +47 -0
- package/dist/pages/8.10/UtilitiesPage.js +489 -0
- package/dist/tests/8.10/access-user-role-management.spec.d.ts +1 -0
- package/dist/tests/8.10/access-user-role-management.spec.js +323 -0
- package/dist/tests/8.10/agentic-ai-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/agentic-ai-user-flows.spec.js +185 -0
- package/dist/tests/8.10/api-tests-v2.spec.d.ts +1 -0
- package/dist/tests/8.10/api-tests-v2.spec.js +20 -0
- package/dist/tests/8.10/aws-cluster-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/aws-cluster-user-flows.spec.js +178 -0
- package/dist/tests/8.10/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/8.10/cluster-variables.spec.js +70 -0
- package/dist/tests/8.10/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/connectors-user-flows.spec.js +479 -0
- package/dist/tests/8.10/console-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/console-user-flows.spec.js +187 -0
- package/dist/tests/8.10/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/hto-user-flows.spec.js +471 -0
- package/dist/tests/8.10/idp-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/idp-user-flows.spec.js +214 -0
- package/dist/tests/8.10/login-negative-tests.spec.d.ts +1 -0
- package/dist/tests/8.10/login-negative-tests.spec.js +29 -0
- package/dist/tests/8.10/login.spec.d.ts +1 -0
- package/dist/tests/8.10/login.spec.js +26 -0
- package/dist/tests/8.10/navigation.spec.d.ts +1 -0
- package/dist/tests/8.10/navigation.spec.js +65 -0
- package/dist/tests/8.10/operate-access-flow.spec.d.ts +1 -0
- package/dist/tests/8.10/operate-access-flow.spec.js +51 -0
- package/dist/tests/8.10/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/8.10/optimize-api-tests.spec.js +268 -0
- package/dist/tests/8.10/optimize-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/optimize-user-flows.spec.js +255 -0
- package/dist/tests/8.10/play.spec.d.ts +1 -0
- package/dist/tests/8.10/play.spec.js +85 -0
- package/dist/tests/8.10/rba-enabled-v1-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/rba-enabled-v1-user-flows.spec.js +443 -0
- package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.js +446 -0
- package/dist/tests/8.10/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/8.10/smoke-tests.spec.js +181 -0
- package/dist/tests/8.10/test-setup.spec.d.ts +1 -0
- package/dist/tests/8.10/test-setup.spec.js +94 -0
- package/dist/tests/8.10/utr-enabled-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/utr-enabled-user-flows.spec.js +182 -0
- package/dist/tests/8.10/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.10/web-modeler-user-flows.spec.js +544 -0
- package/package.json +1 -1
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskDetailsPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const UtilitiesPage_1 = require("./UtilitiesPage");
|
|
6
|
+
function cardinalToOrdinal(numberValue) {
|
|
7
|
+
const realOrderIndex = numberValue.toString();
|
|
8
|
+
if (['11', '12', '13'].includes(realOrderIndex.slice(-2))) {
|
|
9
|
+
return `${realOrderIndex}th`;
|
|
10
|
+
}
|
|
11
|
+
switch (realOrderIndex.slice(-1)) {
|
|
12
|
+
case '1':
|
|
13
|
+
return `${realOrderIndex}st`;
|
|
14
|
+
case '2':
|
|
15
|
+
return `${realOrderIndex}nd`;
|
|
16
|
+
case '3':
|
|
17
|
+
return `${realOrderIndex}rd`;
|
|
18
|
+
default:
|
|
19
|
+
return `${realOrderIndex}th`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class TaskDetailsPage {
|
|
23
|
+
page;
|
|
24
|
+
assignToMeButton;
|
|
25
|
+
completeButton;
|
|
26
|
+
unassignButton;
|
|
27
|
+
assignee;
|
|
28
|
+
completeTaskButton;
|
|
29
|
+
addVariableButton;
|
|
30
|
+
detailsPanel;
|
|
31
|
+
detailsHeader;
|
|
32
|
+
pendingTaskDescription;
|
|
33
|
+
pickATaskHeader;
|
|
34
|
+
emptyTaskMessage;
|
|
35
|
+
nameInput;
|
|
36
|
+
addressInput;
|
|
37
|
+
ageInput;
|
|
38
|
+
variablesTable;
|
|
39
|
+
nameColumnHeader;
|
|
40
|
+
valueColumnHeader;
|
|
41
|
+
form;
|
|
42
|
+
numberInput;
|
|
43
|
+
incrementButton;
|
|
44
|
+
decrementButton;
|
|
45
|
+
dateInput;
|
|
46
|
+
timeInput;
|
|
47
|
+
checkbox;
|
|
48
|
+
selectDropdown;
|
|
49
|
+
tagList;
|
|
50
|
+
detailsInfo;
|
|
51
|
+
textInput;
|
|
52
|
+
assignedToMeText;
|
|
53
|
+
textBox;
|
|
54
|
+
noPreviewContainer;
|
|
55
|
+
previewContainer;
|
|
56
|
+
aiResponseField;
|
|
57
|
+
publicFormsNotSupportedHeading;
|
|
58
|
+
submitButton;
|
|
59
|
+
constructor(page) {
|
|
60
|
+
this.page = page;
|
|
61
|
+
this.assignToMeButton = page.getByRole('button', { name: 'Assign to me' });
|
|
62
|
+
this.completeButton = page.getByRole('button', { name: 'Complete' });
|
|
63
|
+
this.unassignButton = page.getByRole('button', { name: 'Unassign' });
|
|
64
|
+
this.assignee = page.getByTestId('assignee');
|
|
65
|
+
this.completeTaskButton = page.getByRole('button', { name: 'Complete Task' });
|
|
66
|
+
this.addVariableButton = page.getByRole('button', { name: 'Add Variable' });
|
|
67
|
+
this.detailsPanel = this.page.getByRole('complementary', {
|
|
68
|
+
name: 'Task details right panel',
|
|
69
|
+
});
|
|
70
|
+
this.detailsHeader = page.getByTitle('Task details header');
|
|
71
|
+
this.pendingTaskDescription = page.getByText('Pending task');
|
|
72
|
+
this.pickATaskHeader = page.getByRole('heading', {
|
|
73
|
+
name: 'Pick a task to work on',
|
|
74
|
+
});
|
|
75
|
+
this.emptyTaskMessage = page.getByRole('heading', {
|
|
76
|
+
name: /task has no variables/i,
|
|
77
|
+
});
|
|
78
|
+
this.nameInput = page.getByLabel('Full Name');
|
|
79
|
+
this.addressInput = page.getByLabel('Address*');
|
|
80
|
+
this.ageInput = page.getByLabel('Age');
|
|
81
|
+
this.variablesTable = page.getByTestId('variables-table');
|
|
82
|
+
this.nameColumnHeader = this.variablesTable.getByRole('columnheader', {
|
|
83
|
+
name: 'Name',
|
|
84
|
+
});
|
|
85
|
+
this.valueColumnHeader = this.variablesTable.getByRole('columnheader', {
|
|
86
|
+
name: 'Value',
|
|
87
|
+
});
|
|
88
|
+
this.form = page.getByTestId('embedded-form');
|
|
89
|
+
this.numberInput = this.form.getByLabel('Count');
|
|
90
|
+
this.incrementButton = page.getByRole('button', { name: 'Increment' });
|
|
91
|
+
this.decrementButton = page.getByRole('button', { name: 'Decrement' });
|
|
92
|
+
this.dateInput = page.getByLabel('Date of Birth');
|
|
93
|
+
this.timeInput = page.getByPlaceholder('hh:mm ?m');
|
|
94
|
+
this.checkbox = this.form.getByLabel('Agree');
|
|
95
|
+
this.selectDropdown = this.form.getByText('Select').last();
|
|
96
|
+
this.tagList = page.getByPlaceholder('Search');
|
|
97
|
+
this.detailsInfo = page.getByTestId('details-info');
|
|
98
|
+
this.textInput = page.locator('[class="fjs-input"]');
|
|
99
|
+
this.assignedToMeText = this.page
|
|
100
|
+
.getByTestId('assignee')
|
|
101
|
+
.getByText('Assigned to me');
|
|
102
|
+
this.textBox = this.page.getByLabel('Text Box');
|
|
103
|
+
this.noPreviewContainer = this.page.locator('[class = "fjs-documentPreview-non-preview-item fjs-documentPreview-single-document-container"]');
|
|
104
|
+
this.previewContainer = this.page.locator('[class = "fjs-documentPreview-single-document-container"]');
|
|
105
|
+
this.aiResponseField = this.page.getByLabel('AI Response');
|
|
106
|
+
this.publicFormsNotSupportedHeading = page.getByRole('heading', {
|
|
107
|
+
name: 'Public forms not supported',
|
|
108
|
+
});
|
|
109
|
+
this.submitButton = page.getByRole('button', {
|
|
110
|
+
name: 'Submit',
|
|
111
|
+
exact: true,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
async clickAssignToMeButton() {
|
|
115
|
+
await this.assignToMeButton.click({ timeout: 60000 });
|
|
116
|
+
await (0, test_1.expect)(this.page.getByText('Assigning...')).not.toBeVisible({
|
|
117
|
+
timeout: 180000,
|
|
118
|
+
});
|
|
119
|
+
await (0, UtilitiesPage_1.assertPageTextWithRetry)(this.page, 'Assigned to me', false, 30000);
|
|
120
|
+
}
|
|
121
|
+
async clickUnassignButton() {
|
|
122
|
+
await this.unassignButton.click();
|
|
123
|
+
}
|
|
124
|
+
async clickCompleteTaskButton() {
|
|
125
|
+
await this.completeTaskButton.click({ timeout: 60000 });
|
|
126
|
+
await (0, test_1.expect)(this.page.getByText('Task completed')).toBeVisible({
|
|
127
|
+
timeout: 60000,
|
|
128
|
+
});
|
|
129
|
+
await this.page.reload();
|
|
130
|
+
}
|
|
131
|
+
async clickAddVariableButton() {
|
|
132
|
+
await this.addVariableButton.click();
|
|
133
|
+
}
|
|
134
|
+
async replaceExistingVariableValue(values) {
|
|
135
|
+
const { name, value } = values;
|
|
136
|
+
await this.page.getByTitle(name).clear();
|
|
137
|
+
await this.page.getByTitle(name).fill(value);
|
|
138
|
+
}
|
|
139
|
+
getNthVariableNameInput(nth) {
|
|
140
|
+
return this.page.getByRole('textbox', {
|
|
141
|
+
name: `${cardinalToOrdinal(nth)} variable name`,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
getNthVariableValueInput(nth) {
|
|
145
|
+
return this.page.getByRole('textbox', {
|
|
146
|
+
name: `${cardinalToOrdinal(nth)} variable value`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async addVariable(payload) {
|
|
150
|
+
const { name, value } = payload;
|
|
151
|
+
this.clickAddVariableButton();
|
|
152
|
+
await this.getNthVariableNameInput(1).fill(name);
|
|
153
|
+
await this.getNthVariableValueInput(1).fill(value);
|
|
154
|
+
}
|
|
155
|
+
async fillNumber(number) {
|
|
156
|
+
await this.numberInput.fill(number);
|
|
157
|
+
}
|
|
158
|
+
async clickIncrementButton() {
|
|
159
|
+
await this.incrementButton.click();
|
|
160
|
+
}
|
|
161
|
+
async clickDecrementButton() {
|
|
162
|
+
await this.decrementButton.click();
|
|
163
|
+
}
|
|
164
|
+
async fillDate(date) {
|
|
165
|
+
await this.dateInput.click();
|
|
166
|
+
await this.dateInput.fill(date);
|
|
167
|
+
await this.dateInput.press('Enter');
|
|
168
|
+
}
|
|
169
|
+
async enterTime(time) {
|
|
170
|
+
await this.timeInput.click();
|
|
171
|
+
await this.page.getByText(time).click();
|
|
172
|
+
}
|
|
173
|
+
async checkCheckbox() {
|
|
174
|
+
await this.checkbox.check();
|
|
175
|
+
}
|
|
176
|
+
async selectDropdownValue(value) {
|
|
177
|
+
await this.selectDropdown.click();
|
|
178
|
+
await this.page.getByText(value).click();
|
|
179
|
+
}
|
|
180
|
+
async clickRadioButton(radioBtnLabel) {
|
|
181
|
+
await this.page.getByText(radioBtnLabel).click();
|
|
182
|
+
}
|
|
183
|
+
async checkChecklistBox(label) {
|
|
184
|
+
await this.page.getByLabel(label).check();
|
|
185
|
+
}
|
|
186
|
+
async enterTwoValuesInTagList(value1, value2) {
|
|
187
|
+
await this.tagList.click();
|
|
188
|
+
await this.page.getByText(value1).click();
|
|
189
|
+
await this.page.getByText(value2, { exact: true }).click();
|
|
190
|
+
}
|
|
191
|
+
async clickTextInput() {
|
|
192
|
+
const maxRetries = 10;
|
|
193
|
+
let attempts = 0;
|
|
194
|
+
while (attempts < maxRetries) {
|
|
195
|
+
try {
|
|
196
|
+
await this.textInput.click({ timeout: 90000 });
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
attempts += 1;
|
|
201
|
+
if (attempts < maxRetries) {
|
|
202
|
+
console.warn(`Attempt ${attempts} failed. Reloading page and retrying...`);
|
|
203
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
204
|
+
await sleep(10000);
|
|
205
|
+
await this.page.reload();
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
throw new Error(`Failed to click text input after ${maxRetries} attempts`);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
async fillTextInput(value) {
|
|
214
|
+
await this.textInput.fill(value, { timeout: 90000 });
|
|
215
|
+
}
|
|
216
|
+
async fillTextBox(text) {
|
|
217
|
+
await this.textBox.fill(text);
|
|
218
|
+
}
|
|
219
|
+
async fillName(nameInput) {
|
|
220
|
+
await this.nameInput.fill(nameInput);
|
|
221
|
+
}
|
|
222
|
+
async assertDocumentDownloadButton(documentName) {
|
|
223
|
+
await (0, test_1.expect)(this.page.locator(`button[aria-label="Download ${documentName}"]`)).toBeVisible({ timeout: 60000 });
|
|
224
|
+
}
|
|
225
|
+
async assertLoadedImage(documentName) {
|
|
226
|
+
await (0, test_1.expect)(this.page.locator(`img[alt="${documentName}"]`)).toBeVisible({
|
|
227
|
+
timeout: 60000,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
async assertPdfPreviewViewerExists() {
|
|
231
|
+
const containers = this.page.locator('[class="fjs-documentPreview-single-document-container"]');
|
|
232
|
+
const firstPdfViewer = containers
|
|
233
|
+
.first()
|
|
234
|
+
.locator('.fjs-documentPreview-pdf-viewer');
|
|
235
|
+
const lastPdfViewer = containers
|
|
236
|
+
.last()
|
|
237
|
+
.locator('.fjs-documentPreview-pdf-viewer');
|
|
238
|
+
await (0, test_1.expect)(firstPdfViewer.or(lastPdfViewer)).toBeVisible();
|
|
239
|
+
}
|
|
240
|
+
async assertAIResponse(expected) {
|
|
241
|
+
await (0, test_1.expect)(this.aiResponseField).toBeVisible();
|
|
242
|
+
await (0, test_1.expect)(this.aiResponseField).toHaveText(expected, {
|
|
243
|
+
timeout: 180000,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
async clickSubmitButton() {
|
|
247
|
+
await this.submitButton.click();
|
|
248
|
+
}
|
|
249
|
+
async assertTextIsPresent(expectedText) {
|
|
250
|
+
const maxAttempts = 3;
|
|
251
|
+
let attempts = 0;
|
|
252
|
+
while (attempts < maxAttempts) {
|
|
253
|
+
try {
|
|
254
|
+
await (0, test_1.expect)(this.page.getByText(expectedText).first()).toBeVisible({
|
|
255
|
+
timeout: 60000,
|
|
256
|
+
});
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
attempts++;
|
|
261
|
+
if (attempts >= maxAttempts) {
|
|
262
|
+
throw error;
|
|
263
|
+
}
|
|
264
|
+
await this.page.reload();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
exports.TaskDetailsPage = TaskDetailsPage;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class TaskPanelPage {
|
|
3
|
+
private page;
|
|
4
|
+
readonly availableTasks: Locator;
|
|
5
|
+
readonly filterPanel: Locator;
|
|
6
|
+
readonly taskListPageBanner: Locator;
|
|
7
|
+
readonly processesPageTab: Locator;
|
|
8
|
+
readonly tasksTab: Locator;
|
|
9
|
+
readonly noPermissionsMessage: Locator;
|
|
10
|
+
readonly expandButton: Locator;
|
|
11
|
+
readonly processesInfoText: Locator;
|
|
12
|
+
constructor(page: Page);
|
|
13
|
+
openTask(name: string): Promise<void>;
|
|
14
|
+
filterBy(option: 'All open' | 'Unassigned' | 'Assigned to me' | 'Completed'): Promise<void>;
|
|
15
|
+
taskCount(name: string): Promise<number>;
|
|
16
|
+
clickTasksTab(): Promise<void>;
|
|
17
|
+
scrollToLastTask(name: string): Promise<void>;
|
|
18
|
+
scrollToFirstTask(name: string): Promise<void>;
|
|
19
|
+
clickProcessesTab(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export { TaskPanelPage };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskPanelPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
7
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
8
|
+
class TaskPanelPage {
|
|
9
|
+
page;
|
|
10
|
+
availableTasks;
|
|
11
|
+
filterPanel;
|
|
12
|
+
taskListPageBanner;
|
|
13
|
+
processesPageTab;
|
|
14
|
+
tasksTab;
|
|
15
|
+
noPermissionsMessage;
|
|
16
|
+
expandButton;
|
|
17
|
+
processesInfoText;
|
|
18
|
+
constructor(page) {
|
|
19
|
+
this.page = page;
|
|
20
|
+
this.availableTasks = page.getByTitle('Available tasks');
|
|
21
|
+
this.filterPanel = page.locator('[aria-controls="task-nav-bar"]');
|
|
22
|
+
this.taskListPageBanner = page.getByRole('link', {
|
|
23
|
+
name: 'Camunda logo Tasklist',
|
|
24
|
+
});
|
|
25
|
+
this.processesPageTab = page.getByRole('link', { name: 'Processes' });
|
|
26
|
+
this.tasksTab = page.getByRole('link', { name: 'Tasks' });
|
|
27
|
+
this.noPermissionsMessage = page.getByText('You don’t have access to this component');
|
|
28
|
+
this.expandButton = page.getByRole('button', {
|
|
29
|
+
name: 'Expand to show filters',
|
|
30
|
+
});
|
|
31
|
+
this.processesInfoText = page.getByText('Browse and run processes published by your organization');
|
|
32
|
+
}
|
|
33
|
+
async openTask(name) {
|
|
34
|
+
let attempts = 0;
|
|
35
|
+
const maxAttempts = 3;
|
|
36
|
+
while (attempts < maxAttempts) {
|
|
37
|
+
try {
|
|
38
|
+
const task = this.availableTasks.getByText(name, { exact: true }).first();
|
|
39
|
+
await task.waitFor({ state: 'visible', timeout: 120000 });
|
|
40
|
+
await task.click({ timeout: 120000 });
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
attempts++;
|
|
45
|
+
if (attempts >= maxAttempts) {
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
await this.page.reload();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async filterBy(option) {
|
|
53
|
+
try {
|
|
54
|
+
await this.filterPanel.click({ timeout: 60000 });
|
|
55
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: option }).getByText(option)).toBeVisible({ timeout: 60000 });
|
|
56
|
+
await this.page
|
|
57
|
+
.getByRole('link', { name: option })
|
|
58
|
+
.getByText(option)
|
|
59
|
+
.click({ timeout: 60000 });
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
await this.expandButton.click({ timeout: 60000 });
|
|
63
|
+
await this.page
|
|
64
|
+
.getByRole('link', { name: option })
|
|
65
|
+
.getByText(option)
|
|
66
|
+
.click({ timeout: 60000 });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async taskCount(name) {
|
|
70
|
+
await (0, sleep_1.sleep)(20000);
|
|
71
|
+
return this.availableTasks.getByText(name, { exact: true }).count();
|
|
72
|
+
}
|
|
73
|
+
async clickTasksTab() {
|
|
74
|
+
await (0, test_1.expect)(this.tasksTab).toBeVisible({ timeout: 60000 });
|
|
75
|
+
await this.tasksTab.click({ timeout: 60000 });
|
|
76
|
+
}
|
|
77
|
+
async scrollToLastTask(name) {
|
|
78
|
+
await this.page.getByText(name).last().scrollIntoViewIfNeeded();
|
|
79
|
+
}
|
|
80
|
+
async scrollToFirstTask(name) {
|
|
81
|
+
await this.page.getByText(name).first().scrollIntoViewIfNeeded();
|
|
82
|
+
}
|
|
83
|
+
async clickProcessesTab() {
|
|
84
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.processesPageTab);
|
|
85
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.processesInfoText, {
|
|
86
|
+
preAction: async () => {
|
|
87
|
+
await (0, test_1.expect)(this.processesPageTab).toBeVisible({ timeout: 10000 });
|
|
88
|
+
await this.processesPageTab.click({ timeout: 10000 });
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.TaskPanelPage = TaskPanelPage;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class TaskProcessesPage {
|
|
3
|
+
private page;
|
|
4
|
+
readonly popupContinueButton: Locator;
|
|
5
|
+
readonly popup: Locator;
|
|
6
|
+
readonly processes: Locator;
|
|
7
|
+
readonly availableTasks: Locator;
|
|
8
|
+
readonly waitingForTasksText: Locator;
|
|
9
|
+
constructor(page: Page);
|
|
10
|
+
clickpopupContinueButton(): Promise<void>;
|
|
11
|
+
startProcess(name: string): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export { TaskProcessesPage };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskProcessesPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
6
|
+
const expectTextWithPagination_1 = require("../../utils/assertionHelpers/expectTextWithPagination");
|
|
7
|
+
class TaskProcessesPage {
|
|
8
|
+
page;
|
|
9
|
+
popupContinueButton;
|
|
10
|
+
popup;
|
|
11
|
+
processes;
|
|
12
|
+
availableTasks;
|
|
13
|
+
waitingForTasksText;
|
|
14
|
+
constructor(page) {
|
|
15
|
+
this.page = page;
|
|
16
|
+
this.popupContinueButton = page.getByRole('button', { name: 'Continue' });
|
|
17
|
+
this.popup = page.getByLabel('Start your process on demand');
|
|
18
|
+
this.processes = page.locator('[data-testid="process-tile"]');
|
|
19
|
+
this.availableTasks = page.getByTitle('Available tasks').first();
|
|
20
|
+
this.waitingForTasksText = this.page.getByText('Waiting for tasks...');
|
|
21
|
+
}
|
|
22
|
+
async clickpopupContinueButton() {
|
|
23
|
+
await this.page.waitForTimeout(3000);
|
|
24
|
+
if ((await this.popupContinueButton.count()) > 0) {
|
|
25
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.popupContinueButton);
|
|
26
|
+
}
|
|
27
|
+
await (0, test_1.expect)(this.popup.first()).not.toBeVisible({ timeout: 10000 });
|
|
28
|
+
}
|
|
29
|
+
async startProcess(name) {
|
|
30
|
+
if (process.env.TASKLIST_VERSION === 'v2') {
|
|
31
|
+
await (0, expectTextWithPagination_1.expectTextWithPagination)(this.page, name);
|
|
32
|
+
const container = this.page
|
|
33
|
+
.locator('div')
|
|
34
|
+
.filter({
|
|
35
|
+
hasText: new RegExp(`^${name}.*Start process$`),
|
|
36
|
+
})
|
|
37
|
+
.nth(1);
|
|
38
|
+
await container
|
|
39
|
+
.getByRole('button', { name: 'Start process', exact: true })
|
|
40
|
+
.first()
|
|
41
|
+
.click({ timeout: 60000 });
|
|
42
|
+
await (0, test_1.expect)(this.waitingForTasksText).not.toBeVisible({
|
|
43
|
+
timeout: 60000,
|
|
44
|
+
});
|
|
45
|
+
await (0, test_1.expect)(this.availableTasks.first()).toBeVisible({
|
|
46
|
+
timeout: 90000, //redirection to tasks tab
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
else if (process.env.TASKLIST_VERSION === 'v1') {
|
|
50
|
+
const processStartButton = this.processes
|
|
51
|
+
.filter({ hasText: name })
|
|
52
|
+
.nth(0)
|
|
53
|
+
.getByRole('button', { name: 'Start process' });
|
|
54
|
+
await (0, test_1.expect)(processStartButton).toBeVisible({ timeout: 30000 });
|
|
55
|
+
await processStartButton.click();
|
|
56
|
+
await (0, test_1.expect)(this.waitingForTasksText).not.toBeVisible({
|
|
57
|
+
timeout: 60000,
|
|
58
|
+
});
|
|
59
|
+
await (0, test_1.expect)(this.availableTasks.first()).toBeVisible({
|
|
60
|
+
timeout: 90000,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
throw new Error(`Unknown TASKLIST_VERSION: ${process.env.TASKLIST_VERSION}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.TaskProcessesPage = TaskProcessesPage;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
import { ModelerCreatePage } from './ModelerCreatePage';
|
|
3
|
+
import { ModelerHomePage } from './ModelerHomePage';
|
|
4
|
+
import { HomePage } from './HomePage';
|
|
5
|
+
import { ClusterPage } from './ClusterPage';
|
|
6
|
+
import { ClusterDetailsPage } from './ClusterDetailsPage';
|
|
7
|
+
import { AppsPage } from './AppsPage';
|
|
8
|
+
import { TaskPanelPage } from './TaskPanelPage';
|
|
9
|
+
import { TaskDetailsPage } from './TaskDetailsPage';
|
|
10
|
+
import { ConsoleOrganizationPage } from './ConsoleOrganizationPage';
|
|
11
|
+
import { OperateProcessInstancePage } from './OperateProcessInstancePage';
|
|
12
|
+
import { ConnectorSettingsPage } from './ConnectorSettingsPage';
|
|
13
|
+
import { LoginPage } from './LoginPage';
|
|
14
|
+
import { ConnectorMarketplacePage } from './ConnectorMarketplacePage';
|
|
15
|
+
import { ConnectorTemplatePage } from './ConnectorTemplatePage';
|
|
16
|
+
import { MailSlurp } from 'mailslurp-client';
|
|
17
|
+
export declare function loginWithRetry(page: Page, loginPage: LoginPage, testUser: {
|
|
18
|
+
username: string;
|
|
19
|
+
password: string;
|
|
20
|
+
}, timeout: number, maxRetries?: number): Promise<void>;
|
|
21
|
+
export declare function modelDiagramFromFile(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, fileName?: string, nrOfRenamedUserTasks?: number, taskName?: string): Promise<void>;
|
|
22
|
+
export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, processName: string, url: string, auth: string, resultExpression: string, resultVariable?: string, basicAuthCredentials?: {
|
|
23
|
+
username: string;
|
|
24
|
+
password: string;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
export declare function assertLocatorVisibleWithRetry(page: Page | OperateProcessInstancePage | ModelerHomePage, locator: Locator, text: string, timeout?: number, notVisible?: boolean, maxRetries?: number, clickLocator?: Locator): Promise<void>;
|
|
27
|
+
export declare function assertPageTextWithRetry(page: Page, text: string, notVisible?: boolean, timeout?: number, maxRetries?: number): Promise<void>;
|
|
28
|
+
export declare function completeTaskWithRetry(taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number): Promise<void>;
|
|
29
|
+
export declare function runProcess(clusterName: string, page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string, uploadFromFile?: string): Promise<void>;
|
|
30
|
+
export declare function runMultipleProcesses(clusterName: string, page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, options?: {
|
|
31
|
+
numberOfProcesses?: number;
|
|
32
|
+
processName?: string;
|
|
33
|
+
uploadFromFile?: string;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
export declare function disableRBA(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, clusterDetailsPage: ClusterDetailsPage, appsPage: AppsPage): Promise<void>;
|
|
36
|
+
export declare function enableAuthorizations(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, clusterDetailsPage: ClusterDetailsPage, appsPage: AppsPage): Promise<void>;
|
|
37
|
+
export declare function clickInvitationLinkInEmail(page: Page, id: string): Promise<void>;
|
|
38
|
+
export declare function assertLatestAlertEmail(id: string, mailSlurp: MailSlurp, processName: string, alertText: string): Promise<string>;
|
|
39
|
+
export declare function assertTestUsesCorrectOrganization(page: Page): Promise<void>;
|
|
40
|
+
export declare function deleteAllUserGroups(homePage: HomePage, organizationPage: ConsoleOrganizationPage, appsPage: AppsPage): Promise<void>;
|
|
41
|
+
export declare function deleteCluster(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, appsPage: AppsPage): Promise<void>;
|
|
42
|
+
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, clusterName: string, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
|
|
43
|
+
export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, clusterName: string, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
|
|
44
|
+
export declare function createAPIClient(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
|
|
45
|
+
export declare function expectCountToBeOneOf(locator: Locator, count1: number, count2: number): Promise<void>;
|
|
46
|
+
export declare function assertTestUsesCorrectOrganizationFromModeler(page: Page): Promise<void>;
|
|
47
|
+
export declare function waitForLoadingToFinish(page: Page, timeout?: number): Promise<void>;
|