@camunda/e2e-test-suite 0.0.1328 → 0.0.1330

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 (167) hide show
  1. package/.github/c8_versions.json +1 -0
  2. package/README.md +1 -0
  3. package/dist/fixtures/8.11.d.ts +83 -0
  4. package/dist/fixtures/8.11.js +203 -0
  5. package/dist/pages/8.11/AppsPage.d.ts +60 -0
  6. package/dist/pages/8.11/AppsPage.js +1060 -0
  7. package/dist/pages/8.11/AuditLogPage.d.ts +14 -0
  8. package/dist/pages/8.11/AuditLogPage.js +69 -0
  9. package/dist/pages/8.11/Authorization.d.ts +44 -0
  10. package/dist/pages/8.11/Authorization.js +409 -0
  11. package/dist/pages/8.11/ClientCredentialsDetailsPage.d.ts +12 -0
  12. package/dist/pages/8.11/ClientCredentialsDetailsPage.js +36 -0
  13. package/dist/pages/8.11/ClusterDetailsPage.d.ts +107 -0
  14. package/dist/pages/8.11/ClusterDetailsPage.js +892 -0
  15. package/dist/pages/8.11/ClusterPage.d.ts +96 -0
  16. package/dist/pages/8.11/ClusterPage.js +657 -0
  17. package/dist/pages/8.11/ClusterSecretsPage.d.ts +48 -0
  18. package/dist/pages/8.11/ClusterSecretsPage.js +406 -0
  19. package/dist/pages/8.11/ConnectorMarketplacePage.d.ts +29 -0
  20. package/dist/pages/8.11/ConnectorMarketplacePage.js +156 -0
  21. package/dist/pages/8.11/ConnectorSettingsPage.d.ts +39 -0
  22. package/dist/pages/8.11/ConnectorSettingsPage.js +150 -0
  23. package/dist/pages/8.11/ConnectorTemplatePage.d.ts +11 -0
  24. package/dist/pages/8.11/ConnectorTemplatePage.js +34 -0
  25. package/dist/pages/8.11/ConsoleOrganizationPage.d.ts +77 -0
  26. package/dist/pages/8.11/ConsoleOrganizationPage.js +457 -0
  27. package/dist/pages/8.11/DataFiltersPage.d.ts +30 -0
  28. package/dist/pages/8.11/DataFiltersPage.js +135 -0
  29. package/dist/pages/8.11/FormJsPage.d.ts +38 -0
  30. package/dist/pages/8.11/FormJsPage.js +283 -0
  31. package/dist/pages/8.11/HomePage.d.ts +29 -0
  32. package/dist/pages/8.11/HomePage.js +176 -0
  33. package/dist/pages/8.11/IdpCreatePage.d.ts +118 -0
  34. package/dist/pages/8.11/IdpCreatePage.js +514 -0
  35. package/dist/pages/8.11/LoginPage.d.ts +45 -0
  36. package/dist/pages/8.11/LoginPage.js +214 -0
  37. package/dist/pages/8.11/ModelerCreatePage.d.ts +256 -0
  38. package/dist/pages/8.11/ModelerCreatePage.js +2272 -0
  39. package/dist/pages/8.11/ModelerHomePage.d.ts +100 -0
  40. package/dist/pages/8.11/ModelerHomePage.js +1168 -0
  41. package/dist/pages/8.11/ModelerUserInvitePage.d.ts +29 -0
  42. package/dist/pages/8.11/ModelerUserInvitePage.js +136 -0
  43. package/dist/pages/8.11/OCIdentityAuthorizationsPage.d.ts +11 -0
  44. package/dist/pages/8.11/OCIdentityAuthorizationsPage.js +25 -0
  45. package/dist/pages/8.11/OCIdentityClusterVariablesPage.d.ts +21 -0
  46. package/dist/pages/8.11/OCIdentityClusterVariablesPage.js +128 -0
  47. package/dist/pages/8.11/OCIdentityGroupsPage.d.ts +38 -0
  48. package/dist/pages/8.11/OCIdentityGroupsPage.js +176 -0
  49. package/dist/pages/8.11/OCIdentityHomePage.d.ts +21 -0
  50. package/dist/pages/8.11/OCIdentityHomePage.js +111 -0
  51. package/dist/pages/8.11/OCIdentityMappingRulesPage.d.ts +23 -0
  52. package/dist/pages/8.11/OCIdentityMappingRulesPage.js +124 -0
  53. package/dist/pages/8.11/OCIdentityRolesPage.d.ts +43 -0
  54. package/dist/pages/8.11/OCIdentityRolesPage.js +236 -0
  55. package/dist/pages/8.11/OperateHomePage.d.ts +28 -0
  56. package/dist/pages/8.11/OperateHomePage.js +150 -0
  57. package/dist/pages/8.11/OperateProcessInstancePage.d.ts +43 -0
  58. package/dist/pages/8.11/OperateProcessInstancePage.js +893 -0
  59. package/dist/pages/8.11/OperateProcessesPage.d.ts +28 -0
  60. package/dist/pages/8.11/OperateProcessesPage.js +153 -0
  61. package/dist/pages/8.11/OptimizeCollectionsPage.d.ts +30 -0
  62. package/dist/pages/8.11/OptimizeCollectionsPage.js +175 -0
  63. package/dist/pages/8.11/OptimizeDashboardPage.d.ts +11 -0
  64. package/dist/pages/8.11/OptimizeDashboardPage.js +71 -0
  65. package/dist/pages/8.11/OptimizeHomePage.d.ts +17 -0
  66. package/dist/pages/8.11/OptimizeHomePage.js +171 -0
  67. package/dist/pages/8.11/OptimizeReportPage.d.ts +49 -0
  68. package/dist/pages/8.11/OptimizeReportPage.js +184 -0
  69. package/dist/pages/8.11/OptimizeSharePage.d.ts +16 -0
  70. package/dist/pages/8.11/OptimizeSharePage.js +100 -0
  71. package/dist/pages/8.11/PlayPage.d.ts +17 -0
  72. package/dist/pages/8.11/PlayPage.js +157 -0
  73. package/dist/pages/8.11/ProcessApplicationPage.d.ts +32 -0
  74. package/dist/pages/8.11/ProcessApplicationPage.js +496 -0
  75. package/dist/pages/8.11/SettingsPage.d.ts +10 -0
  76. package/dist/pages/8.11/SettingsPage.js +53 -0
  77. package/dist/pages/8.11/SignUpPage.d.ts +42 -0
  78. package/dist/pages/8.11/SignUpPage.js +134 -0
  79. package/dist/pages/8.11/TaskDetailsPage.d.ts +77 -0
  80. package/dist/pages/8.11/TaskDetailsPage.js +324 -0
  81. package/dist/pages/8.11/TaskPanelPage.d.ts +26 -0
  82. package/dist/pages/8.11/TaskPanelPage.js +245 -0
  83. package/dist/pages/8.11/TaskProcessesPage.d.ts +18 -0
  84. package/dist/pages/8.11/TaskProcessesPage.js +134 -0
  85. package/dist/pages/8.11/UtilitiesPage.d.ts +56 -0
  86. package/dist/pages/8.11/UtilitiesPage.js +1024 -0
  87. package/dist/pages/8.11/WorkspaceMembersPage.d.ts +21 -0
  88. package/dist/pages/8.11/WorkspaceMembersPage.js +268 -0
  89. package/dist/tests/8.11/access-user-role-management.spec.d.ts +1 -0
  90. package/dist/tests/8.11/access-user-role-management.spec.js +487 -0
  91. package/dist/tests/8.11/agentic-ai-user-flows.spec.d.ts +1 -0
  92. package/dist/tests/8.11/agentic-ai-user-flows.spec.js +209 -0
  93. package/dist/tests/8.11/aws-cluster-user-flows.spec.d.ts +1 -0
  94. package/dist/tests/8.11/aws-cluster-user-flows.spec.js +188 -0
  95. package/dist/tests/8.11/aws-connectors-user-flows.spec.d.ts +1 -0
  96. package/dist/tests/8.11/aws-connectors-user-flows.spec.js +167 -0
  97. package/dist/tests/8.11/cluster-variables.spec.d.ts +1 -0
  98. package/dist/tests/8.11/cluster-variables.spec.js +202 -0
  99. package/dist/tests/8.11/connectors-user-flows.spec.d.ts +1 -0
  100. package/dist/tests/8.11/connectors-user-flows.spec.js +537 -0
  101. package/dist/tests/8.11/console-user-flows.spec.d.ts +1 -0
  102. package/dist/tests/8.11/console-user-flows.spec.js +199 -0
  103. package/dist/tests/8.11/hto-user-flows.spec.d.ts +1 -0
  104. package/dist/tests/8.11/hto-user-flows.spec.js +358 -0
  105. package/dist/tests/8.11/idp-user-flows.spec.d.ts +1 -0
  106. package/dist/tests/8.11/idp-user-flows.spec.js +316 -0
  107. package/dist/tests/8.11/login-negative-tests.spec.d.ts +1 -0
  108. package/dist/tests/8.11/login-negative-tests.spec.js +29 -0
  109. package/dist/tests/8.11/login.spec.d.ts +1 -0
  110. package/dist/tests/8.11/login.spec.js +29 -0
  111. package/dist/tests/8.11/navigation.spec.d.ts +1 -0
  112. package/dist/tests/8.11/navigation.spec.js +59 -0
  113. package/dist/tests/8.11/operate-access-flow.spec.d.ts +1 -0
  114. package/dist/tests/8.11/operate-access-flow.spec.js +136 -0
  115. package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.d.ts +1 -0
  116. package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +96 -0
  117. package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
  118. package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +69 -0
  119. package/dist/tests/8.11/optimize-api-tests.spec.d.ts +1 -0
  120. package/dist/tests/8.11/optimize-api-tests.spec.js +1194 -0
  121. package/dist/tests/8.11/optimize-collections-api.spec.d.ts +1 -0
  122. package/dist/tests/8.11/optimize-collections-api.spec.js +184 -0
  123. package/dist/tests/8.11/optimize-collections-ui.spec.d.ts +1 -0
  124. package/dist/tests/8.11/optimize-collections-ui.spec.js +46 -0
  125. package/dist/tests/8.11/optimize-data-filters-api.spec.d.ts +1 -0
  126. package/dist/tests/8.11/optimize-data-filters-api.spec.js +195 -0
  127. package/dist/tests/8.11/optimize-data-filters-ui.spec.d.ts +1 -0
  128. package/dist/tests/8.11/optimize-data-filters-ui.spec.js +306 -0
  129. package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.d.ts +1 -0
  130. package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.js +316 -0
  131. package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.d.ts +1 -0
  132. package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.js +337 -0
  133. package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.d.ts +1 -0
  134. package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.js +198 -0
  135. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.d.ts +1 -0
  136. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.js +146 -0
  137. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.d.ts +1 -0
  138. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.js +208 -0
  139. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.d.ts +1 -0
  140. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.js +151 -0
  141. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.d.ts +1 -0
  142. package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.js +242 -0
  143. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
  144. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +75 -0
  145. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.d.ts +1 -0
  146. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.js +123 -0
  147. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
  148. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +151 -0
  149. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.d.ts +1 -0
  150. package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.js +123 -0
  151. package/dist/tests/8.11/play.spec.d.ts +1 -0
  152. package/dist/tests/8.11/play.spec.js +93 -0
  153. package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.d.ts +1 -0
  154. package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.js +495 -0
  155. package/dist/tests/8.11/saas-migration-path-user-flows.spec.d.ts +1 -0
  156. package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +133 -0
  157. package/dist/tests/8.11/smoke-tests.spec.d.ts +1 -0
  158. package/dist/tests/8.11/smoke-tests.spec.js +339 -0
  159. package/dist/tests/8.11/test-setup.spec.d.ts +1 -0
  160. package/dist/tests/8.11/test-setup.spec.js +256 -0
  161. package/dist/tests/8.11/web-modeler-user-flows.spec.d.ts +1 -0
  162. package/dist/tests/8.11/web-modeler-user-flows.spec.js +523 -0
  163. package/dist/utils/clusterVersions.d.ts +2 -1
  164. package/dist/utils/clusterVersions.js +1 -0
  165. package/dist/utils/consoleApiHelpers.js +1 -0
  166. package/package.json +1 -1
  167. package/playwright.config.ts +10 -0
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignUpPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class SignUpPage {
6
+ page;
7
+ firstNameInput;
8
+ lastNameInput;
9
+ passwordInput;
10
+ passwordInputInvitedUser;
11
+ signupButton;
12
+ emailInput;
13
+ companyInput;
14
+ createAccountButton;
15
+ backgroundDrodownList;
16
+ whatDoYouDoDropdownList;
17
+ APIClientDropdownList;
18
+ levelOfExperienceDropdownList;
19
+ nextButton;
20
+ runProcessRadioButton;
21
+ whyAreYouEvaluatingCamunda;
22
+ confirmSaaSTrial;
23
+ loginToCamundaButton;
24
+ backgroundPageHeading;
25
+ useCasePageHeading;
26
+ goalPageHeading;
27
+ camundaPlansPageHeading;
28
+ setPasswordPageHeading;
29
+ signUpCompletedPageHeading;
30
+ verifyEmailText;
31
+ constructor(page) {
32
+ this.page = page;
33
+ this.firstNameInput = page.getByLabel('First Name');
34
+ this.lastNameInput = page.getByLabel('Last Name');
35
+ this.passwordInput = page.locator('[id="password"]');
36
+ this.passwordInputInvitedUser = page.getByLabel('Password (min 12 characters)');
37
+ this.signupButton = page.getByRole('button', { name: 'Sign up' });
38
+ this.emailInput = page.getByLabel('Email');
39
+ this.companyInput = page.getByLabel('Company*');
40
+ this.createAccountButton = page.getByRole('button', {
41
+ name: 'Create account',
42
+ });
43
+ this.backgroundDrodownList = page.getByLabel('Background*');
44
+ this.whatDoYouDoDropdownList = page.getByLabel('What do you do?*');
45
+ this.APIClientDropdownList = page.getByRole('combobox', {
46
+ name: 'what is your preferred api client?',
47
+ });
48
+ this.levelOfExperienceDropdownList = page.getByLabel('what is your level of experience with process design?*');
49
+ this.nextButton = page.getByRole('button', { name: 'Next' });
50
+ this.runProcessRadioButton = page.getByRole('radio');
51
+ this.whyAreYouEvaluatingCamunda = page.getByLabel('Why are you evaluating');
52
+ this.confirmSaaSTrial = page.getByRole('button', {
53
+ name: 'Confirm SaaS Trial',
54
+ });
55
+ this.loginToCamundaButton = page.getByRole('button', {
56
+ name: 'log in to camunda',
57
+ });
58
+ this.backgroundPageHeading = page.getByRole('heading', {
59
+ name: 'great! to customize your account, tell us a little about yourself',
60
+ });
61
+ this.useCasePageHeading = page.getByRole('heading', {
62
+ name: 'thank you! how will you use camunda',
63
+ });
64
+ this.goalPageHeading = page.getByRole('heading', {
65
+ name: 'finally, what is your goal with camunda?',
66
+ });
67
+ this.camundaPlansPageHeading = page.getByRole('heading', {
68
+ name: 'Here is your custom recommendation, please confirm your Camunda account below:',
69
+ });
70
+ this.setPasswordPageHeading = page.getByRole('heading', {
71
+ name: 'Finish',
72
+ });
73
+ this.signUpCompletedPageHeading = page.getByRole('heading', {
74
+ name: 'thank you for signing up for camunda',
75
+ });
76
+ this.runProcessRadioButton = page.getByRole('radio', { name: 'yes' });
77
+ this.verifyEmailText = page.getByText('Verify your email');
78
+ }
79
+ async signupToC8(emailAddress) {
80
+ await this.page.goto('https://accounts.ultrawombat.com/signup');
81
+ await this.clickFirstNameInput();
82
+ await this.fillFirstNameInput('QA');
83
+ await this.clickLastNameInput();
84
+ await this.fillLastNameInput('Camunda');
85
+ await this.clickEmailInput();
86
+ await this.fillEmailInput(emailAddress);
87
+ await this.clickPasswordInput();
88
+ await this.fillPasswordInput(process.env.C8_PASSWORD);
89
+ await this.clickSignupButton();
90
+ await (0, test_1.expect)(this.verifyEmailText.first()).toBeVisible({
91
+ timeout: 40000,
92
+ });
93
+ }
94
+ async clickFirstNameInput() {
95
+ await (0, test_1.expect)(this.firstNameInput).toBeVisible({ timeout: 30000 });
96
+ await this.firstNameInput.click();
97
+ }
98
+ async fillFirstNameInput(firstName) {
99
+ await this.firstNameInput.fill(firstName);
100
+ }
101
+ async clickLastNameInput() {
102
+ await (0, test_1.expect)(this.lastNameInput).toBeVisible({ timeout: 30000 });
103
+ await this.lastNameInput.click();
104
+ }
105
+ async fillLastNameInput(lastName) {
106
+ await this.lastNameInput.fill(lastName);
107
+ }
108
+ async clickPasswordInput() {
109
+ await (0, test_1.expect)(this.passwordInput).toBeVisible({ timeout: 30000 });
110
+ await this.passwordInput.click({ timeout: 30000 });
111
+ }
112
+ async fillPasswordInput(password) {
113
+ await this.passwordInput.fill(password);
114
+ }
115
+ async clickPasswordInputInvitedUser() {
116
+ await (0, test_1.expect)(this.passwordInputInvitedUser).toBeVisible({ timeout: 30000 });
117
+ await this.passwordInputInvitedUser.click({ timeout: 30000 });
118
+ }
119
+ async fillPasswordInputInvitedUser(password) {
120
+ await this.passwordInputInvitedUser.fill(password);
121
+ }
122
+ async clickSignupButton() {
123
+ await (0, test_1.expect)(this.signupButton).toBeVisible({ timeout: 30000 });
124
+ await this.signupButton.click();
125
+ }
126
+ async clickEmailInput() {
127
+ await (0, test_1.expect)(this.emailInput).toBeVisible({ timeout: 30000 });
128
+ await this.emailInput.click();
129
+ }
130
+ async fillEmailInput(email) {
131
+ await this.emailInput.fill(email);
132
+ }
133
+ }
134
+ exports.SignUpPage = SignUpPage;
@@ -0,0 +1,77 @@
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 timeSubfield: Locator;
28
+ readonly checkbox: Locator;
29
+ readonly selectDropdown: Locator;
30
+ readonly tagList: Locator;
31
+ readonly detailsInfo: Locator;
32
+ readonly textInput: Locator;
33
+ readonly assignedToMeText: Locator;
34
+ readonly textBox: Locator;
35
+ readonly noPreviewContainer: Locator;
36
+ readonly previewContainer: Locator;
37
+ readonly aiResponseField: Locator;
38
+ readonly publicFormsNotSupportedHeading: Locator;
39
+ readonly submitButton: Locator;
40
+ constructor(page: Page);
41
+ clickAssignToMeButton(): Promise<void>;
42
+ clickUnassignButton(): Promise<void>;
43
+ clickCompleteTaskButton(): Promise<void>;
44
+ clickAddVariableButton(): Promise<void>;
45
+ replaceExistingVariableValue(values: {
46
+ name: string;
47
+ value: string;
48
+ }): Promise<void>;
49
+ getNthVariableNameInput(nth: number): Locator;
50
+ getNthVariableValueInput(nth: number): Locator;
51
+ addVariable(payload: {
52
+ name: string;
53
+ value: string;
54
+ }): Promise<void>;
55
+ fillNumber(number: string): Promise<void>;
56
+ clickIncrementButton(): Promise<void>;
57
+ clickDecrementButton(): Promise<void>;
58
+ fillDate(date: string): Promise<void>;
59
+ private fillTimeSubfield;
60
+ enterTime(time: string): Promise<void>;
61
+ checkCheckbox(): Promise<void>;
62
+ selectDropdownValue(value: string): Promise<void>;
63
+ clickRadioButton(radioBtnLabel: string): Promise<void>;
64
+ checkChecklistBox(label: string): Promise<void>;
65
+ enterTwoValuesInTagList(value1: string, value2: string): Promise<void>;
66
+ clickTextInput(): Promise<void>;
67
+ fillTextInput(value: string): Promise<void>;
68
+ fillTextBox(text: string): Promise<void>;
69
+ fillName(nameInput: string): Promise<void>;
70
+ assertDocumentDownloadButton(documentName: string): Promise<void>;
71
+ assertLoadedImage(documentName: string): Promise<void>;
72
+ assertPdfPreviewViewerExists(): Promise<void>;
73
+ assertAIResponse(expected: RegExp): Promise<void>;
74
+ clickSubmitButton(): Promise<void>;
75
+ assertTextIsPresent(expectedText: string): Promise<void>;
76
+ }
77
+ export { TaskDetailsPage };
@@ -0,0 +1,324 @@
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
+ timeSubfield;
48
+ checkbox;
49
+ selectDropdown;
50
+ tagList;
51
+ detailsInfo;
52
+ textInput;
53
+ assignedToMeText;
54
+ textBox;
55
+ noPreviewContainer;
56
+ previewContainer;
57
+ aiResponseField;
58
+ publicFormsNotSupportedHeading;
59
+ submitButton;
60
+ constructor(page) {
61
+ this.page = page;
62
+ this.assignToMeButton = page.getByRole('button', { name: 'Assign to me' });
63
+ this.completeButton = page.getByRole('button', { name: 'Complete' });
64
+ this.unassignButton = page.getByRole('button', { name: 'Unassign' });
65
+ this.assignee = page.getByTestId('assignee');
66
+ this.completeTaskButton = page.getByRole('button', { name: 'Complete Task' });
67
+ this.addVariableButton = page.getByRole('button', { name: 'Add Variable' });
68
+ this.detailsPanel = this.page.getByRole('complementary', {
69
+ name: 'Task details right panel',
70
+ });
71
+ this.detailsHeader = page.getByTitle('Task details header');
72
+ this.pendingTaskDescription = page.getByText('Pending task');
73
+ this.pickATaskHeader = page.getByRole('heading', {
74
+ name: 'Pick a task to work on',
75
+ });
76
+ this.emptyTaskMessage = page.getByRole('heading', {
77
+ name: /task has no variables/i,
78
+ });
79
+ this.nameInput = page.getByLabel('Full Name');
80
+ this.addressInput = page.getByLabel('Address*');
81
+ this.ageInput = page.getByLabel('Age');
82
+ this.variablesTable = page.getByTestId('variables-table');
83
+ this.nameColumnHeader = this.variablesTable.getByRole('columnheader', {
84
+ name: 'Name',
85
+ });
86
+ this.valueColumnHeader = this.variablesTable.getByRole('columnheader', {
87
+ name: 'Value',
88
+ });
89
+ this.form = page.getByTestId('embedded-form');
90
+ this.numberInput = this.form.getByLabel('Count');
91
+ this.incrementButton = page.getByRole('button', { name: 'Increment' });
92
+ this.decrementButton = page.getByRole('button', { name: 'Decrement' });
93
+ this.dateInput = page.getByLabel('Date of Birth');
94
+ this.timeInput = page.getByPlaceholder('hh:mm ?m');
95
+ this.timeSubfield = this.form.locator('.fjs-timepicker input').first();
96
+ this.checkbox = this.form.getByLabel('Agree');
97
+ this.selectDropdown = this.form.getByText('Select').last();
98
+ this.tagList = page.getByPlaceholder('Search');
99
+ this.detailsInfo = page.getByTestId('details-info');
100
+ this.textInput = page.locator('[class="fjs-input"]');
101
+ this.assignedToMeText = this.page
102
+ .getByTestId('assignee')
103
+ .getByText('Assigned to me');
104
+ this.textBox = this.page.getByLabel('Text Box');
105
+ this.noPreviewContainer = this.page.locator('[class = "fjs-documentPreview-non-preview-item fjs-documentPreview-single-document-container"]');
106
+ this.previewContainer = this.page.locator('[class = "fjs-documentPreview-single-document-container"]');
107
+ this.aiResponseField = this.page.getByLabel('AI Response');
108
+ this.publicFormsNotSupportedHeading = page.getByRole('heading', {
109
+ name: 'Public forms not supported',
110
+ });
111
+ this.submitButton = page.getByRole('button', {
112
+ name: 'Submit',
113
+ exact: true,
114
+ });
115
+ }
116
+ async clickAssignToMeButton() {
117
+ await this.assignToMeButton.click({ timeout: 60000 });
118
+ await (0, test_1.expect)(this.page.getByText('Assigning...')).not.toBeVisible({
119
+ timeout: 180000,
120
+ });
121
+ await (0, UtilitiesPage_1.assertPageTextWithRetry)(this.page, 'Assigned to me', false, 30000);
122
+ }
123
+ async clickUnassignButton() {
124
+ await this.unassignButton.click();
125
+ }
126
+ // The "Task completed" toast is a transient confirmation: the v2 webapp's
127
+ // notification store auto-removes it after 5s, and it is never rendered at
128
+ // all when the refreshed task list deselects the completed task before the
129
+ // completion state machine reaches CompletionSucceeded (which is what the
130
+ // nightly trace showed - the task was completed, but no toast ever entered
131
+ // the DOM). Accept the task's own completed state as well: the details panel
132
+ // only renders "Completion date" once the task has one, so this confirms the
133
+ // completion rather than weakening the check.
134
+ async clickCompleteTaskButton() {
135
+ await this.completeTaskButton.click({ timeout: 60000 });
136
+ await (0, test_1.expect)(this.page
137
+ .getByText('Task completed')
138
+ .or(this.detailsPanel.getByText('Completion date'))
139
+ .first()).toBeVisible({ timeout: 60000 });
140
+ await this.page.reload();
141
+ }
142
+ async clickAddVariableButton() {
143
+ await this.addVariableButton.click();
144
+ }
145
+ async replaceExistingVariableValue(values) {
146
+ const { name, value } = values;
147
+ await this.page.getByTitle(name).clear();
148
+ await this.page.getByTitle(name).fill(value);
149
+ }
150
+ getNthVariableNameInput(nth) {
151
+ return this.page.getByRole('textbox', {
152
+ name: `${cardinalToOrdinal(nth)} variable name`,
153
+ });
154
+ }
155
+ getNthVariableValueInput(nth) {
156
+ return this.page.getByRole('textbox', {
157
+ name: `${cardinalToOrdinal(nth)} variable value`,
158
+ });
159
+ }
160
+ async addVariable(payload) {
161
+ const { name, value } = payload;
162
+ this.clickAddVariableButton();
163
+ await this.getNthVariableNameInput(1).fill(name);
164
+ await this.getNthVariableValueInput(1).fill(value);
165
+ }
166
+ async fillNumber(number) {
167
+ await this.numberInput.fill(number);
168
+ }
169
+ async clickIncrementButton() {
170
+ await this.incrementButton.click();
171
+ }
172
+ async clickDecrementButton() {
173
+ await this.decrementButton.click();
174
+ }
175
+ async fillDate(date) {
176
+ await this.dateInput.click();
177
+ await this.dateInput.fill(date);
178
+ await this.dateInput.press('Enter');
179
+ await this.fillTimeSubfield();
180
+ }
181
+ // The AI form generator is non-deterministic about how it renders the
182
+ // requested "Date of birth" input: it sometimes emits a form-js datetime
183
+ // component in its "date and time" subtype, which renders a second - and
184
+ // equally required - time subfield next to the date input. The nightly
185
+ // trace shows form validation rejecting the completion on exactly that
186
+ // empty subfield ("Field is required." / "Please review 1 field"), so the
187
+ // task was never completed and no completion confirmation could appear.
188
+ // Fill the time subfield whenever the rendered form has one; the fixed,
189
+ // date-only forms every other spec deploys have no timepicker and skip this.
190
+ async fillTimeSubfield() {
191
+ const hasTimeSubfield = await this.timeSubfield
192
+ .waitFor({ state: 'visible', timeout: 5000 })
193
+ .then(() => true)
194
+ .catch(() => false);
195
+ if (!hasTimeSubfield) {
196
+ return;
197
+ }
198
+ // Whether the component is configured for 12h or 24h notation is up to the
199
+ // generator, so prefer picking one of the times the timepicker itself
200
+ // offers over typing a notation that may not parse.
201
+ await this.timeSubfield.click({ timeout: 30000 });
202
+ const offeredTime = this.page.locator('.fjs-dropdownlist-item').first();
203
+ const timeIsOffered = await offeredTime
204
+ .waitFor({ state: 'visible', timeout: 10000 })
205
+ .then(() => true)
206
+ .catch(() => false);
207
+ if (timeIsOffered) {
208
+ await offeredTime.click({ timeout: 30000 });
209
+ }
210
+ if ((await this.timeSubfield.inputValue()) !== '') {
211
+ return;
212
+ }
213
+ // No dropdown, or it committed nothing: type instead. form-js discards a
214
+ // value it cannot parse on blur, so the input keeping the value is what
215
+ // tells us the notation was accepted.
216
+ for (const time of ['09:00 AM', '09:00']) {
217
+ await this.timeSubfield.fill(time);
218
+ await this.timeSubfield.press('Tab');
219
+ if ((await this.timeSubfield.inputValue()) !== '') {
220
+ return;
221
+ }
222
+ }
223
+ }
224
+ async enterTime(time) {
225
+ await this.timeInput.click();
226
+ await this.page.getByText(time).click();
227
+ }
228
+ async checkCheckbox() {
229
+ await this.checkbox.check();
230
+ }
231
+ async selectDropdownValue(value) {
232
+ await this.selectDropdown.click();
233
+ await this.page.getByText(value).click();
234
+ }
235
+ async clickRadioButton(radioBtnLabel) {
236
+ await this.page.getByText(radioBtnLabel).click();
237
+ }
238
+ async checkChecklistBox(label) {
239
+ await this.page.getByLabel(label).check();
240
+ }
241
+ async enterTwoValuesInTagList(value1, value2) {
242
+ await this.tagList.click();
243
+ await this.page.getByText(value1).click();
244
+ await this.page.getByText(value2, { exact: true }).click();
245
+ }
246
+ async clickTextInput() {
247
+ const maxRetries = 10;
248
+ let attempts = 0;
249
+ while (attempts < maxRetries) {
250
+ try {
251
+ await this.textInput.click({ timeout: 90000 });
252
+ break;
253
+ }
254
+ catch (error) {
255
+ attempts += 1;
256
+ if (attempts < maxRetries) {
257
+ console.warn(`Attempt ${attempts} failed. Reloading page and retrying...`);
258
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
259
+ await sleep(10000);
260
+ await this.page.reload();
261
+ }
262
+ else {
263
+ throw new Error(`Failed to click text input after ${maxRetries} attempts`);
264
+ }
265
+ }
266
+ }
267
+ }
268
+ async fillTextInput(value) {
269
+ await this.textInput.fill(value, { timeout: 90000 });
270
+ }
271
+ async fillTextBox(text) {
272
+ await this.textBox.fill(text);
273
+ }
274
+ async fillName(nameInput) {
275
+ await this.nameInput.fill(nameInput);
276
+ }
277
+ async assertDocumentDownloadButton(documentName) {
278
+ await (0, test_1.expect)(this.page.locator(`button[aria-label="Download ${documentName}"]`)).toBeVisible({ timeout: 60000 });
279
+ }
280
+ async assertLoadedImage(documentName) {
281
+ await (0, test_1.expect)(this.page.locator(`img[alt="${documentName}"]`)).toBeVisible({
282
+ timeout: 60000,
283
+ });
284
+ }
285
+ async assertPdfPreviewViewerExists() {
286
+ const containers = this.page.locator('[class="fjs-documentPreview-single-document-container"]');
287
+ const firstPdfViewer = containers
288
+ .first()
289
+ .locator('.fjs-documentPreview-pdf-viewer');
290
+ const lastPdfViewer = containers
291
+ .last()
292
+ .locator('.fjs-documentPreview-pdf-viewer');
293
+ await (0, test_1.expect)(firstPdfViewer.or(lastPdfViewer)).toBeVisible();
294
+ }
295
+ async assertAIResponse(expected) {
296
+ await (0, test_1.expect)(this.aiResponseField).toBeVisible();
297
+ await (0, test_1.expect)(this.aiResponseField).toHaveText(expected, {
298
+ timeout: 180000,
299
+ });
300
+ }
301
+ async clickSubmitButton() {
302
+ await this.submitButton.click();
303
+ }
304
+ async assertTextIsPresent(expectedText) {
305
+ const maxAttempts = 3;
306
+ let attempts = 0;
307
+ while (attempts < maxAttempts) {
308
+ try {
309
+ await (0, test_1.expect)(this.page.getByText(expectedText).first()).toBeVisible({
310
+ timeout: 60000,
311
+ });
312
+ return;
313
+ }
314
+ catch (error) {
315
+ attempts++;
316
+ if (attempts >= maxAttempts) {
317
+ throw error;
318
+ }
319
+ await this.page.reload();
320
+ }
321
+ }
322
+ }
323
+ }
324
+ exports.TaskDetailsPage = TaskDetailsPage;
@@ -0,0 +1,26 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class TaskPanelPage {
3
+ private page;
4
+ readonly availableTasks: Locator;
5
+ readonly filterPanelExpandButton: Locator;
6
+ readonly filterPanelCollapseButton: Locator;
7
+ readonly filterSelectButton: Locator;
8
+ readonly taskListPageBanner: Locator;
9
+ readonly processesPageTab: Locator;
10
+ readonly tasksTab: Locator;
11
+ readonly noPermissionsMessage: Locator;
12
+ readonly processesInfoText: Locator;
13
+ constructor(page: Page);
14
+ taskInList(name: string): Locator;
15
+ openTask(name: string, totalTimeout?: number): Promise<void>;
16
+ filterBy(option: 'All open tasks' | 'Unassigned' | 'Assigned to me' | 'Completed'): Promise<void>;
17
+ private openFilterControls;
18
+ private collapseFilterPanel;
19
+ private static appliedFilter;
20
+ taskCount(name: string, expectedCount?: number): Promise<number>;
21
+ clickTasksTab(): Promise<void>;
22
+ scrollToLastTask(name: string): Promise<void>;
23
+ scrollToFirstTask(name: string): Promise<void>;
24
+ clickProcessesTab(): Promise<void>;
25
+ }
26
+ export { TaskPanelPage };