@camunda/e2e-test-suite 0.0.257 → 0.0.258

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.
Files changed (120) hide show
  1. package/dist/fixtures/SM-8.10.d.ts +81 -0
  2. package/dist/fixtures/SM-8.10.js +184 -0
  3. package/dist/pages/SM-8.10/Authorization.d.ts +31 -0
  4. package/dist/pages/SM-8.10/Authorization.js +146 -0
  5. package/dist/pages/SM-8.10/ClusterDetailsPage.d.ts +8 -0
  6. package/dist/pages/SM-8.10/ClusterDetailsPage.js +28 -0
  7. package/dist/pages/SM-8.10/ClusterPage.d.ts +11 -0
  8. package/dist/pages/SM-8.10/ClusterPage.js +32 -0
  9. package/dist/pages/SM-8.10/ConnectorMarketplacePage.d.ts +16 -0
  10. package/dist/pages/SM-8.10/ConnectorMarketplacePage.js +52 -0
  11. package/dist/pages/SM-8.10/ConnectorSettingsPage.d.ts +40 -0
  12. package/dist/pages/SM-8.10/ConnectorSettingsPage.js +133 -0
  13. package/dist/pages/SM-8.10/ConnectorTemplatePage.d.ts +11 -0
  14. package/dist/pages/SM-8.10/ConnectorTemplatePage.js +34 -0
  15. package/dist/pages/SM-8.10/ConsoleHomePage.d.ts +11 -0
  16. package/dist/pages/SM-8.10/ConsoleHomePage.js +31 -0
  17. package/dist/pages/SM-8.10/ConsoleOrganizationPage.d.ts +22 -0
  18. package/dist/pages/SM-8.10/ConsoleOrganizationPage.js +68 -0
  19. package/dist/pages/SM-8.10/FormJsPage.d.ts +31 -0
  20. package/dist/pages/SM-8.10/FormJsPage.js +87 -0
  21. package/dist/pages/SM-8.10/HomePage.d.ts +20 -0
  22. package/dist/pages/SM-8.10/HomePage.js +49 -0
  23. package/dist/pages/SM-8.10/IdentityTenantPage.d.ts +52 -0
  24. package/dist/pages/SM-8.10/IdentityTenantPage.js +218 -0
  25. package/dist/pages/SM-8.10/IdentityUsersPage.d.ts +92 -0
  26. package/dist/pages/SM-8.10/IdentityUsersPage.js +473 -0
  27. package/dist/pages/SM-8.10/KeycloakAdminPage.d.ts +15 -0
  28. package/dist/pages/SM-8.10/KeycloakAdminPage.js +68 -0
  29. package/dist/pages/SM-8.10/KeycloakLoginPage.d.ts +11 -0
  30. package/dist/pages/SM-8.10/KeycloakLoginPage.js +25 -0
  31. package/dist/pages/SM-8.10/KeycloakUtils.d.ts +16 -0
  32. package/dist/pages/SM-8.10/KeycloakUtils.js +63 -0
  33. package/dist/pages/SM-8.10/LoginPage.d.ts +21 -0
  34. package/dist/pages/SM-8.10/LoginPage.js +100 -0
  35. package/dist/pages/SM-8.10/ManagementIdentityPage.d.ts +46 -0
  36. package/dist/pages/SM-8.10/ManagementIdentityPage.js +153 -0
  37. package/dist/pages/SM-8.10/ModelerCreatePage.d.ts +199 -0
  38. package/dist/pages/SM-8.10/ModelerCreatePage.js +1052 -0
  39. package/dist/pages/SM-8.10/ModelerHomePage.d.ts +44 -0
  40. package/dist/pages/SM-8.10/ModelerHomePage.js +179 -0
  41. package/dist/pages/SM-8.10/NavigationPage.d.ts +47 -0
  42. package/dist/pages/SM-8.10/NavigationPage.js +134 -0
  43. package/dist/pages/SM-8.10/OCIdentityAuthorizationsPage.d.ts +10 -0
  44. package/dist/pages/SM-8.10/OCIdentityAuthorizationsPage.js +35 -0
  45. package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.d.ts +20 -0
  46. package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.js +69 -0
  47. package/dist/pages/SM-8.10/OCIdentityGroupsPage.d.ts +39 -0
  48. package/dist/pages/SM-8.10/OCIdentityGroupsPage.js +154 -0
  49. package/dist/pages/SM-8.10/OCIdentityHomePage.d.ts +23 -0
  50. package/dist/pages/SM-8.10/OCIdentityHomePage.js +81 -0
  51. package/dist/pages/SM-8.10/OCIdentityMappingRulesPage.d.ts +23 -0
  52. package/dist/pages/SM-8.10/OCIdentityMappingRulesPage.js +110 -0
  53. package/dist/pages/SM-8.10/OCIdentityRolesPage.d.ts +55 -0
  54. package/dist/pages/SM-8.10/OCIdentityRolesPage.js +197 -0
  55. package/dist/pages/SM-8.10/OCTenantPage.d.ts +67 -0
  56. package/dist/pages/SM-8.10/OCTenantPage.js +280 -0
  57. package/dist/pages/SM-8.10/OperateHomePage.d.ts +24 -0
  58. package/dist/pages/SM-8.10/OperateHomePage.js +81 -0
  59. package/dist/pages/SM-8.10/OperateProcessInstancePage.d.ts +24 -0
  60. package/dist/pages/SM-8.10/OperateProcessInstancePage.js +170 -0
  61. package/dist/pages/SM-8.10/OperateProcessesPage.d.ts +32 -0
  62. package/dist/pages/SM-8.10/OperateProcessesPage.js +205 -0
  63. package/dist/pages/SM-8.10/OptimizeCollectionsPage.d.ts +17 -0
  64. package/dist/pages/SM-8.10/OptimizeCollectionsPage.js +66 -0
  65. package/dist/pages/SM-8.10/OptimizeDashboardPage.d.ts +14 -0
  66. package/dist/pages/SM-8.10/OptimizeDashboardPage.js +56 -0
  67. package/dist/pages/SM-8.10/OptimizeHomePage.d.ts +19 -0
  68. package/dist/pages/SM-8.10/OptimizeHomePage.js +64 -0
  69. package/dist/pages/SM-8.10/OptimizeReportPage.d.ts +50 -0
  70. package/dist/pages/SM-8.10/OptimizeReportPage.js +179 -0
  71. package/dist/pages/SM-8.10/PlayPage.d.ts +44 -0
  72. package/dist/pages/SM-8.10/PlayPage.js +235 -0
  73. package/dist/pages/SM-8.10/SettingsPage.d.ts +12 -0
  74. package/dist/pages/SM-8.10/SettingsPage.js +25 -0
  75. package/dist/pages/SM-8.10/TaskDetailsPage.d.ts +70 -0
  76. package/dist/pages/SM-8.10/TaskDetailsPage.js +266 -0
  77. package/dist/pages/SM-8.10/TaskPanelPage.d.ts +24 -0
  78. package/dist/pages/SM-8.10/TaskPanelPage.js +93 -0
  79. package/dist/pages/SM-8.10/TaskProcessesPage.d.ts +14 -0
  80. package/dist/pages/SM-8.10/TaskProcessesPage.js +53 -0
  81. package/dist/pages/SM-8.10/UtilitiesPage.d.ts +34 -0
  82. package/dist/pages/SM-8.10/UtilitiesPage.js +435 -0
  83. package/dist/pages/SM-8.10/optimizeReportUtils.d.ts +6 -0
  84. package/dist/pages/SM-8.10/optimizeReportUtils.js +42 -0
  85. package/dist/pages/SM-8.7/ModelerCreatePage.js +3 -0
  86. package/dist/pages/SM-8.7/PlayPage.d.ts +1 -0
  87. package/dist/pages/SM-8.7/PlayPage.js +4 -2
  88. package/dist/tests/SM-8.10/cluster-variables.spec.d.ts +1 -0
  89. package/dist/tests/SM-8.10/cluster-variables.spec.js +190 -0
  90. package/dist/tests/SM-8.10/connectors-user-flows.spec.d.ts +1 -0
  91. package/dist/tests/SM-8.10/connectors-user-flows.spec.js +260 -0
  92. package/dist/tests/SM-8.10/console-user-flows.spec.d.ts +1 -0
  93. package/dist/tests/SM-8.10/console-user-flows.spec.js +88 -0
  94. package/dist/tests/SM-8.10/document-handling-user-flows.spec.d.ts +1 -0
  95. package/dist/tests/SM-8.10/document-handling-user-flows.spec.js +157 -0
  96. package/dist/tests/SM-8.10/hto-user-flows.spec.d.ts +1 -0
  97. package/dist/tests/SM-8.10/hto-user-flows.spec.js +408 -0
  98. package/dist/tests/SM-8.10/identity-user-flows.spec.d.ts +1 -0
  99. package/dist/tests/SM-8.10/identity-user-flows.spec.js +233 -0
  100. package/dist/tests/SM-8.10/license-key-user-flows.spec.d.ts +1 -0
  101. package/dist/tests/SM-8.10/license-key-user-flows.spec.js +523 -0
  102. package/dist/tests/SM-8.10/login.spec.d.ts +1 -0
  103. package/dist/tests/SM-8.10/login.spec.js +24 -0
  104. package/dist/tests/SM-8.10/migration-path-user-flows.spec.d.ts +1 -0
  105. package/dist/tests/SM-8.10/migration-path-user-flows.spec.js +224 -0
  106. package/dist/tests/SM-8.10/mt-enabled-user-flows.spec.d.ts +1 -0
  107. package/dist/tests/SM-8.10/mt-enabled-user-flows.spec.js +584 -0
  108. package/dist/tests/SM-8.10/optimize-user-flows.spec.d.ts +1 -0
  109. package/dist/tests/SM-8.10/optimize-user-flows.spec.js +184 -0
  110. package/dist/tests/SM-8.10/play.spec.d.ts +1 -0
  111. package/dist/tests/SM-8.10/play.spec.js +152 -0
  112. package/dist/tests/SM-8.10/rba-enabled-user-flows.spec.d.ts +1 -0
  113. package/dist/tests/SM-8.10/rba-enabled-user-flows.spec.js +715 -0
  114. package/dist/tests/SM-8.10/smoke-tests.spec.d.ts +1 -0
  115. package/dist/tests/SM-8.10/smoke-tests.spec.js +163 -0
  116. package/dist/tests/SM-8.10/test-setup.spec.d.ts +1 -0
  117. package/dist/tests/SM-8.10/test-setup.spec.js +24 -0
  118. package/dist/tests/SM-8.10/web-modeler-user-flows.spec.d.ts +1 -0
  119. package/dist/tests/SM-8.10/web-modeler-user-flows.spec.js +178 -0
  120. package/package.json +1 -1
@@ -0,0 +1,44 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class PlayPage {
3
+ private page;
4
+ readonly completeJobButton: Locator;
5
+ readonly saveScenarioButton: Locator;
6
+ readonly viewScenarioButton: Locator;
7
+ readonly runAllScenariosButton: Locator;
8
+ readonly confirmSaveScenarioButton: Locator;
9
+ readonly enterScenarioNameInput: Locator;
10
+ readonly confirmDeleteScenarioButton: Locator;
11
+ readonly viewAllScenariosButton: Locator;
12
+ readonly getScenarioRowByName: (scenarioName: string) => Locator;
13
+ readonly getScenarioRow: (scenarioName: string) => Locator;
14
+ readonly diagram: Locator;
15
+ readonly startInstanceButton: Locator;
16
+ readonly startInstanceWithCachedButton: Locator;
17
+ readonly notifications: Locator;
18
+ readonly saveScenarioModal: Locator;
19
+ readonly loadingInstanceDetailsText: Locator;
20
+ readonly retryButton: Locator;
21
+ readonly dialog: Locator;
22
+ constructor(page: Page);
23
+ waitForCompleteJobButtonToBeAvailable(): Promise<void>;
24
+ clickCompleteJobButton(): Promise<void>;
25
+ clickStartInstanceButton(): Promise<void>;
26
+ dismissStartModal(): Promise<void>;
27
+ clickStartInstanceWithCachedButton(): Promise<void>;
28
+ waitForInstanceDetailsToBeLoaded(): Promise<void>;
29
+ waitForNextElementToBeActive(historyItem: string): Promise<void>;
30
+ waitForProcessToBeCompleted(): Promise<void>;
31
+ clickSaveScenarioButton(): Promise<void>;
32
+ clickViewScenarioButton(): Promise<void>;
33
+ enterScenarioName(scenarioName: string): Promise<void>;
34
+ updateScenarioName(newScenarioName: string): Promise<void>;
35
+ clickViewAllScenariosButton(): Promise<void>;
36
+ confirmSaveScenario(): Promise<void>;
37
+ getDeleteIconForScenario(scenarioName: string): Promise<Locator>;
38
+ deleteScenario(scenarioName: string): Promise<void>;
39
+ confirmDeleteScenario(): Promise<void>;
40
+ clickRunAllScenariosButton(): Promise<void>;
41
+ clickmessagePublishButton(): Promise<void>;
42
+ assertScenarioCompleted(scenarioName: string): Promise<void>;
43
+ }
44
+ export { PlayPage };
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlayPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
7
+ const maxWaitTimeSeconds = 180000;
8
+ class PlayPage {
9
+ page;
10
+ completeJobButton;
11
+ saveScenarioButton;
12
+ viewScenarioButton;
13
+ runAllScenariosButton;
14
+ confirmSaveScenarioButton;
15
+ enterScenarioNameInput;
16
+ confirmDeleteScenarioButton;
17
+ viewAllScenariosButton;
18
+ getScenarioRowByName;
19
+ getScenarioRow;
20
+ diagram;
21
+ startInstanceButton;
22
+ startInstanceWithCachedButton;
23
+ notifications;
24
+ saveScenarioModal;
25
+ loadingInstanceDetailsText;
26
+ retryButton;
27
+ dialog;
28
+ constructor(page) {
29
+ this.page = page;
30
+ this.dialog = page.getByRole('dialog');
31
+ this.completeJobButton = page
32
+ .getByTestId('diagram')
33
+ .getByLabel('Complete job');
34
+ this.saveScenarioButton = page.getByRole('button', { name: 'Save scenario' });
35
+ this.viewScenarioButton = page.getByRole('button', { name: 'View scenario' });
36
+ this.runAllScenariosButton = page.getByRole('button', {
37
+ name: 'Run all scenarios',
38
+ });
39
+ this.confirmSaveScenarioButton = page
40
+ .getByTestId('save-scenario-modal')
41
+ .getByRole('button', { name: 'Save' });
42
+ this.enterScenarioNameInput = page
43
+ .getByTestId('save-scenario-modal')
44
+ .locator('input#scenario-name')
45
+ .first();
46
+ this.confirmDeleteScenarioButton = page.getByRole('button', {
47
+ name: 'danger Delete',
48
+ });
49
+ this.viewAllScenariosButton = page.getByText('(View all)').last();
50
+ this.getScenarioRowByName = (scenarioName) => page.locator('tr', { hasText: scenarioName });
51
+ this.getScenarioRow = (scenarioName) => page.locator('tr', { hasText: scenarioName });
52
+ this.diagram = page.getByTestId('diagram');
53
+ this.startInstanceButton = this.diagram.getByLabel('Start instance', {
54
+ exact: true,
55
+ });
56
+ this.startInstanceWithCachedButton = page.getByLabel('Start instance with cached');
57
+ this.notifications = page.locator('.cds--toast-notification');
58
+ this.saveScenarioModal = page.getByTestId('save-scenario-modal');
59
+ this.loadingInstanceDetailsText = this.page.getByText('Loading instance details...');
60
+ this.retryButton = this.page.getByRole('button', { name: 'Retry' });
61
+ }
62
+ async waitForCompleteJobButtonToBeAvailable() {
63
+ await (0, test_1.expect)(this.completeJobButton).toBeVisible({
64
+ timeout: maxWaitTimeSeconds,
65
+ });
66
+ }
67
+ async clickCompleteJobButton() {
68
+ await this.completeJobButton.click();
69
+ }
70
+ async clickStartInstanceButton() {
71
+ const maxRetries = 3;
72
+ let attempts = 0;
73
+ while (attempts < maxRetries) {
74
+ try {
75
+ await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
76
+ await this.startInstanceButton
77
+ .or(this.startInstanceWithCachedButton)
78
+ .first()
79
+ .click({ timeout: 30000 });
80
+ await (0, test_1.expect)(this.loadingInstanceDetailsText).toBeVisible();
81
+ await (0, test_1.expect)(this.loadingInstanceDetailsText).not.toBeVisible({
82
+ timeout: 60000,
83
+ });
84
+ return;
85
+ }
86
+ catch (error) {
87
+ if (attempts >= maxRetries - 1)
88
+ throw error;
89
+ await this.page.reload();
90
+ await (0, sleep_1.sleep)(2000);
91
+ attempts++;
92
+ }
93
+ }
94
+ }
95
+ async dismissStartModal() {
96
+ const buttonVariations = [
97
+ 'Start a process instance',
98
+ 'Start another instance',
99
+ 'Start new instance',
100
+ 'Start instance',
101
+ ];
102
+ for (const buttonName of buttonVariations) {
103
+ const button = this.page.getByRole('button', { name: buttonName });
104
+ const count = await button.count();
105
+ if (count > 0) {
106
+ await button.click();
107
+ return;
108
+ }
109
+ }
110
+ throw new Error('Could not find start instance button with any expected variation');
111
+ }
112
+ async clickStartInstanceWithCachedButton() {
113
+ await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
114
+ await this.startInstanceWithCachedButton.click({ timeout: 30000 });
115
+ }
116
+ async waitForInstanceDetailsToBeLoaded() {
117
+ const maxRetries = 2;
118
+ let attempts = 0;
119
+ while (attempts < maxRetries) {
120
+ try {
121
+ await (0, test_1.expect)(this.page.getByText(/process instance key/i)).toBeVisible({
122
+ timeout: maxWaitTimeSeconds,
123
+ });
124
+ await (0, test_1.expect)(this.page.getByText(/This process instance has no variables/i)).toBeVisible({
125
+ timeout: maxWaitTimeSeconds,
126
+ });
127
+ return;
128
+ }
129
+ catch (error) {
130
+ if (attempts >= maxRetries - 1)
131
+ throw error;
132
+ await this.page.reload();
133
+ attempts++;
134
+ }
135
+ }
136
+ }
137
+ async waitForNextElementToBeActive(historyItem) {
138
+ const locator = this.page.getByText(new RegExp(`^${historyItem}`, 'i'));
139
+ const maxRetries = 6; // ~1 min with the waits below
140
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
141
+ try {
142
+ await (0, test_1.expect)(locator.first()).toBeVisible({ timeout: 20000 });
143
+ return;
144
+ }
145
+ catch (e) {
146
+ if (attempt === maxRetries)
147
+ throw e;
148
+ await this.page.reload();
149
+ await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
150
+ await this.page.waitForTimeout(5000);
151
+ }
152
+ }
153
+ }
154
+ async waitForProcessToBeCompleted() {
155
+ await (0, test_1.expect)(this.page.getByText('Completed')).toBeVisible({
156
+ timeout: maxWaitTimeSeconds,
157
+ });
158
+ }
159
+ async clickSaveScenarioButton() {
160
+ await this.notifications
161
+ .first()
162
+ .waitFor({ state: 'hidden', timeout: 60000 })
163
+ .catch(() => { });
164
+ const isModalVisible = await this.saveScenarioModal
165
+ .isVisible()
166
+ .catch(() => false);
167
+ if (!isModalVisible) {
168
+ await (0, sleep_1.sleep)(3000);
169
+ await (0, test_1.expect)(this.saveScenarioButton).toBeVisible({ timeout: 30000 });
170
+ await (0, test_1.expect)(this.saveScenarioButton).toBeEnabled({ timeout: 30000 });
171
+ await this.saveScenarioButton.click({ force: true, timeout: 30000 });
172
+ }
173
+ }
174
+ async clickViewScenarioButton() {
175
+ await this.viewScenarioButton.click();
176
+ }
177
+ async enterScenarioName(scenarioName) {
178
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.dialog, {
179
+ postAction: async () => {
180
+ await this.saveScenarioButton.click({ timeout: 30000 });
181
+ },
182
+ });
183
+ const input = this.dialog.locator('input#scenario-name');
184
+ await input.waitFor({ state: 'visible', timeout: 10000 });
185
+ await input.clear();
186
+ await input.fill(scenarioName);
187
+ }
188
+ async updateScenarioName(newScenarioName) {
189
+ await this.enterScenarioNameInput.fill(newScenarioName);
190
+ }
191
+ async clickViewAllScenariosButton() {
192
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.viewAllScenariosButton);
193
+ await this.viewAllScenariosButton.click();
194
+ }
195
+ async confirmSaveScenario() {
196
+ await this.confirmSaveScenarioButton.click();
197
+ }
198
+ async getDeleteIconForScenario(scenarioName) {
199
+ const scenarioRow = this.page
200
+ .locator('tr')
201
+ .filter({ has: this.page.getByText(scenarioName, { exact: true }) });
202
+ return scenarioRow.getByLabel('Delete scenario');
203
+ }
204
+ async deleteScenario(scenarioName) {
205
+ const deleteIcon = await this.getDeleteIconForScenario(scenarioName);
206
+ await deleteIcon.click();
207
+ }
208
+ async confirmDeleteScenario() {
209
+ await this.confirmDeleteScenarioButton.click();
210
+ }
211
+ async clickRunAllScenariosButton() {
212
+ await this.runAllScenariosButton.click();
213
+ }
214
+ async clickmessagePublishButton() {
215
+ await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
216
+ const publishIcon = this.diagram
217
+ .locator('div.djs-overlays')
218
+ .getByLabel('Publish message', { exact: true });
219
+ await publishIcon.click({ timeout: 30000 });
220
+ }
221
+ async assertScenarioCompleted(scenarioName) {
222
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.page
223
+ .locator('tr', { hasText: scenarioName })
224
+ .locator('text=Completed'), {
225
+ totalTimeout: 90000,
226
+ visibilityTimeout: 20000,
227
+ postAction: async () => {
228
+ if (await this.retryButton.isVisible()) {
229
+ await this.retryButton.click();
230
+ }
231
+ },
232
+ });
233
+ }
234
+ }
235
+ exports.PlayPage = PlayPage;
@@ -0,0 +1,12 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class SettingsPage {
3
+ private page;
4
+ readonly openSettingsButton: Locator;
5
+ readonly logoutButton: Locator;
6
+ readonly openUserSidebarButton: Locator;
7
+ constructor(page: Page);
8
+ clickOpenSettingsButton(): Promise<void>;
9
+ clickOpenUserSideBarButton(): Promise<void>;
10
+ clickLogoutButton(): Promise<void>;
11
+ }
12
+ export { SettingsPage };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsPage = void 0;
4
+ class SettingsPage {
5
+ page;
6
+ openSettingsButton;
7
+ logoutButton;
8
+ openUserSidebarButton;
9
+ constructor(page) {
10
+ this.page = page;
11
+ this.openSettingsButton = page.getByLabel('Open Settings');
12
+ this.openUserSidebarButton = page.getByLabel('Open User Sidebar');
13
+ this.logoutButton = page.getByRole('button', { name: 'Log out' });
14
+ }
15
+ async clickOpenSettingsButton() {
16
+ await this.openSettingsButton.click({ timeout: 120000 });
17
+ }
18
+ async clickOpenUserSideBarButton() {
19
+ await this.openUserSidebarButton.click({ timeout: 120000 });
20
+ }
21
+ async clickLogoutButton() {
22
+ await this.logoutButton.click({ timeout: 30000 });
23
+ }
24
+ }
25
+ exports.SettingsPage = SettingsPage;
@@ -0,0 +1,70 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class TaskDetailsPage {
3
+ private page;
4
+ readonly assignToMeButton: Locator;
5
+ readonly completeButton: Locator;
6
+ readonly unassignButton: Locator;
7
+ readonly assignee: Locator;
8
+ readonly completeTaskButton: Locator;
9
+ readonly addVariableButton: Locator;
10
+ readonly detailsPanel: Locator;
11
+ readonly detailsHeader: Locator;
12
+ readonly pendingTaskDescription: Locator;
13
+ readonly pickATaskHeader: Locator;
14
+ readonly emptyTaskMessage: Locator;
15
+ readonly nameInput: Locator;
16
+ readonly addressInput: Locator;
17
+ readonly ageInput: Locator;
18
+ readonly variablesTable: Locator;
19
+ readonly nameColumnHeader: Locator;
20
+ readonly valueColumnHeader: Locator;
21
+ readonly form: Locator;
22
+ readonly numberInput: Locator;
23
+ readonly incrementButton: Locator;
24
+ readonly decrementButton: Locator;
25
+ readonly dateInput: Locator;
26
+ readonly timeInput: Locator;
27
+ readonly checkbox: Locator;
28
+ readonly selectDropdown: Locator;
29
+ readonly tagList: Locator;
30
+ readonly detailsInfo: Locator;
31
+ readonly textInput: Locator;
32
+ readonly taskCompletedBanner: Locator;
33
+ readonly assignedToMeText: Locator;
34
+ readonly noPreviewContainer: Locator;
35
+ readonly previewContainer: Locator;
36
+ constructor(page: Page);
37
+ clickAssignToMeButton(): Promise<void>;
38
+ clickUnassignButton(): Promise<void>;
39
+ clickCompleteTaskButton(): Promise<void>;
40
+ clickAddVariableButton(): Promise<void>;
41
+ replaceExistingVariableValue(values: {
42
+ name: string;
43
+ value: string;
44
+ }): Promise<void>;
45
+ getNthVariableNameInput(nth: number): Locator;
46
+ getNthVariableValueInput(nth: number): Locator;
47
+ addVariable(payload: {
48
+ name: string;
49
+ value: string;
50
+ }): Promise<void>;
51
+ fillNumber(number: string): Promise<void>;
52
+ clickIncrementButton(): Promise<void>;
53
+ clickDecrementButton(): Promise<void>;
54
+ fillDate(date: string): Promise<void>;
55
+ enterTime(time: string): Promise<void>;
56
+ checkCheckbox(): Promise<void>;
57
+ selectDropdownValue(value: string): Promise<void>;
58
+ clickRadioButton(radioBtnLabel: string): Promise<void>;
59
+ checkChecklistBox(label: string): Promise<void>;
60
+ enterTwoValuesInTagList(value1: string, value2: string): Promise<void>;
61
+ clickTextInput(): Promise<void>;
62
+ fillTextInput(value: string): Promise<void>;
63
+ priorityAssertion(priority: string): Promise<void>;
64
+ taskAssertion(name: string): Promise<void>;
65
+ assertLoadedImage(documentName: string): Promise<void>;
66
+ assertDocumentDownloadButton(documentName: string): Promise<void>;
67
+ assertPdfPreviewViewerExists(): Promise<void>;
68
+ assertTextIsPresent(expectedText: string): Promise<void>;
69
+ }
70
+ export { TaskDetailsPage };
@@ -0,0 +1,266 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskDetailsPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
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
+ taskCompletedBanner;
53
+ assignedToMeText;
54
+ noPreviewContainer;
55
+ previewContainer;
56
+ constructor(page) {
57
+ this.page = page;
58
+ this.assignToMeButton = page.getByRole('button', { name: 'Assign to me' });
59
+ this.completeButton = page.getByRole('button', { name: 'Complete' });
60
+ this.unassignButton = page.getByRole('button', { name: 'Unassign' });
61
+ this.assignee = page.getByTestId('assignee');
62
+ this.completeTaskButton = page.getByRole('button', { name: 'Complete Task' });
63
+ this.addVariableButton = page.getByRole('button', { name: 'Add Variable' });
64
+ this.detailsPanel = this.page.getByRole('complementary', {
65
+ name: 'Task details right panel',
66
+ });
67
+ this.detailsHeader = page.getByTitle('Task details header');
68
+ this.pendingTaskDescription = page.getByText('Pending task');
69
+ this.pickATaskHeader = page.getByRole('heading', {
70
+ name: 'Pick a task to work on',
71
+ });
72
+ this.emptyTaskMessage = page.getByRole('heading', {
73
+ name: /task has no variables/i,
74
+ });
75
+ this.nameInput = page.getByLabel('Name*');
76
+ this.addressInput = page.getByLabel('Address*');
77
+ this.ageInput = page.getByLabel('Age');
78
+ this.variablesTable = page.getByTestId('variables-table');
79
+ this.nameColumnHeader = this.variablesTable.getByRole('columnheader', {
80
+ name: 'Name',
81
+ });
82
+ this.valueColumnHeader = this.variablesTable.getByRole('columnheader', {
83
+ name: 'Value',
84
+ });
85
+ this.form = page.getByTestId('embedded-form');
86
+ this.numberInput = this.form.getByLabel('Number');
87
+ this.incrementButton = page.getByRole('button', { name: 'Increment' });
88
+ this.decrementButton = page.getByRole('button', { name: 'Decrement' });
89
+ this.dateInput = page.getByPlaceholder('mm/dd/yyyy');
90
+ this.timeInput = page.getByPlaceholder('hh:mm ?m');
91
+ this.checkbox = this.form.getByLabel('Checkbox');
92
+ this.selectDropdown = this.form.getByText('Select').last();
93
+ this.tagList = page.getByPlaceholder('Search');
94
+ this.detailsInfo = page.getByTestId('details-info');
95
+ this.textInput = page.locator('[class="fjs-input"]');
96
+ this.textInput = page.locator('[class="fjs-input"]');
97
+ this.taskCompletedBanner = this.page.getByText('Task completed');
98
+ this.assignedToMeText = page
99
+ .getByTestId('assignee')
100
+ .getByText('Assigned to me');
101
+ this.noPreviewContainer = this.page.locator('[class = "fjs-documentPreview-non-preview-item fjs-documentPreview-single-document-container"]');
102
+ this.previewContainer = this.page.locator('[class = "fjs-documentPreview-single-document-container"]');
103
+ }
104
+ async clickAssignToMeButton() {
105
+ await (0, test_1.expect)(this.assignToMeButton).toBeVisible({ timeout: 60000 });
106
+ await this.assignToMeButton.click({ timeout: 60000 });
107
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.assignedToMeText, {
108
+ postAction: async () => {
109
+ await this.page.reload();
110
+ },
111
+ });
112
+ }
113
+ async clickUnassignButton() {
114
+ await this.unassignButton.click();
115
+ }
116
+ async clickCompleteTaskButton() {
117
+ await this.completeTaskButton.click({ timeout: 60000 });
118
+ await (0, test_1.expect)(this.taskCompletedBanner).toBeVisible({
119
+ timeout: 200000,
120
+ });
121
+ }
122
+ async clickAddVariableButton() {
123
+ await this.addVariableButton.click({ timeout: 60000 });
124
+ }
125
+ async replaceExistingVariableValue(values) {
126
+ const { name, value } = values;
127
+ await this.page.getByTitle(name).clear();
128
+ await this.page.getByTitle(name).fill(value);
129
+ }
130
+ getNthVariableNameInput(nth) {
131
+ return this.page.getByRole('textbox', {
132
+ name: `${cardinalToOrdinal(nth)} variable name`,
133
+ });
134
+ }
135
+ getNthVariableValueInput(nth) {
136
+ return this.page.getByRole('textbox', {
137
+ name: `${cardinalToOrdinal(nth)} variable value`,
138
+ });
139
+ }
140
+ async addVariable(payload) {
141
+ const { name, value } = payload;
142
+ this.clickAddVariableButton();
143
+ await this.getNthVariableNameInput(1).fill(name);
144
+ await this.getNthVariableValueInput(1).fill(value);
145
+ }
146
+ async fillNumber(number) {
147
+ await this.numberInput.fill(number);
148
+ }
149
+ async clickIncrementButton() {
150
+ await this.incrementButton.click();
151
+ }
152
+ async clickDecrementButton() {
153
+ await this.decrementButton.click();
154
+ }
155
+ async fillDate(date) {
156
+ await this.dateInput.click();
157
+ await this.dateInput.fill(date);
158
+ await this.dateInput.press('Enter');
159
+ }
160
+ async enterTime(time) {
161
+ await this.timeInput.click();
162
+ await this.page.getByText(time).click();
163
+ }
164
+ async checkCheckbox() {
165
+ await this.checkbox.check();
166
+ }
167
+ async selectDropdownValue(value) {
168
+ await this.selectDropdown.click();
169
+ await this.page.getByText(value).click();
170
+ }
171
+ async clickRadioButton(radioBtnLabel) {
172
+ await this.page.getByText(radioBtnLabel).click();
173
+ }
174
+ async checkChecklistBox(label) {
175
+ await this.page.getByLabel(label).check();
176
+ }
177
+ async enterTwoValuesInTagList(value1, value2) {
178
+ await this.tagList.click();
179
+ await this.page.getByText(value1).click();
180
+ await this.page.getByText(value2, { exact: true }).click();
181
+ }
182
+ async clickTextInput() {
183
+ await this.textInput.click();
184
+ }
185
+ async fillTextInput(value) {
186
+ await this.textInput.fill(value);
187
+ }
188
+ async priorityAssertion(priority) {
189
+ let retryCount = 0;
190
+ const maxRetries = 2;
191
+ while (retryCount < maxRetries) {
192
+ try {
193
+ await (0, test_1.expect)(this.detailsPanel.getByText(priority)).toBeVisible({
194
+ timeout: 45000,
195
+ });
196
+ return; // Exit the function if the expectation is met
197
+ }
198
+ catch (error) {
199
+ retryCount++;
200
+ console.log(`Attempt ${retryCount} failed. Retrying...`);
201
+ await this.page.reload();
202
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
203
+ await sleep(10000);
204
+ }
205
+ }
206
+ throw new Error(`Priority not visible after ${maxRetries} attempts.`);
207
+ }
208
+ async taskAssertion(name) {
209
+ let retryCount = 0;
210
+ const maxRetries = 2;
211
+ while (retryCount < maxRetries) {
212
+ try {
213
+ await (0, test_1.expect)(this.detailsInfo.getByText(name)).toBeVisible({
214
+ timeout: 45000,
215
+ });
216
+ return; // Exit the function if the expectation is met
217
+ }
218
+ catch (error) {
219
+ retryCount++;
220
+ console.log(`Attempt ${retryCount} failed. Retrying...`);
221
+ await this.page.reload();
222
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
223
+ await sleep(10000);
224
+ }
225
+ }
226
+ throw new Error(`Task not visible after ${maxRetries} attempts.`);
227
+ }
228
+ async assertLoadedImage(documentName) {
229
+ await (0, test_1.expect)(this.page.locator(`img[alt="${documentName}"]`)).toBeVisible({
230
+ timeout: 60000,
231
+ });
232
+ }
233
+ async assertDocumentDownloadButton(documentName) {
234
+ await (0, test_1.expect)(this.page.locator(`button[aria-label="Download ${documentName}"]`)).toBeVisible({ timeout: 60000 });
235
+ }
236
+ async assertPdfPreviewViewerExists() {
237
+ const containers = this.page.locator('[class="fjs-documentPreview-single-document-container"]');
238
+ const firstPdfViewer = containers
239
+ .first()
240
+ .locator('.fjs-documentPreview-pdf-viewer');
241
+ const lastPdfViewer = containers
242
+ .last()
243
+ .locator('.fjs-documentPreview-pdf-viewer');
244
+ await (0, test_1.expect)(firstPdfViewer.or(lastPdfViewer)).toBeVisible();
245
+ }
246
+ async assertTextIsPresent(expectedText) {
247
+ const maxAttempts = 3;
248
+ let attempts = 0;
249
+ while (attempts < maxAttempts) {
250
+ try {
251
+ await (0, test_1.expect)(this.page.getByText(expectedText)).toBeVisible({
252
+ timeout: 60000,
253
+ });
254
+ return;
255
+ }
256
+ catch (error) {
257
+ attempts++;
258
+ if (attempts >= maxAttempts) {
259
+ throw error;
260
+ }
261
+ await this.page.reload();
262
+ }
263
+ }
264
+ }
265
+ }
266
+ exports.TaskDetailsPage = TaskDetailsPage;
@@ -0,0 +1,24 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class TaskPanelPage {
3
+ private page;
4
+ readonly availableTasks: Locator;
5
+ readonly filterOptions: Locator;
6
+ readonly tasklistBanner: Locator;
7
+ readonly collapseFilter: Locator;
8
+ readonly processesPageTab: Locator;
9
+ readonly tasksTab: Locator;
10
+ readonly assignToMeButton: Locator;
11
+ readonly unassignButton: Locator;
12
+ readonly licenseKeyTagNonProduction: Locator;
13
+ readonly licenseKeyTagProduction: Locator;
14
+ constructor(page: Page);
15
+ openTask(name: string, assignButton?: boolean): Promise<void>;
16
+ filterBy(option: 'All open' | 'Unassigned' | 'Assigned to me' | 'Completed'): Promise<void>;
17
+ scrollToLastTask(name: string): Promise<void>;
18
+ scrollToFirstTask(name: string): Promise<void>;
19
+ clickCollapseFilter(): Promise<void>;
20
+ clickProcessesTab(): Promise<void>;
21
+ taskCount(name: string): Promise<number>;
22
+ clickTasksTab(): Promise<void>;
23
+ }
24
+ export { TaskPanelPage };