@camunda/e2e-test-suite 0.0.1443 → 0.0.1445

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 (122) hide show
  1. package/.github/c8_versions.json +1 -0
  2. package/README.md +2 -0
  3. package/dist/fixtures/SM-8.11.d.ts +77 -0
  4. package/dist/fixtures/SM-8.11.js +176 -0
  5. package/dist/pages/SM-8.11/Authorization.d.ts +39 -0
  6. package/dist/pages/SM-8.11/Authorization.js +349 -0
  7. package/dist/pages/SM-8.11/ClusterDetailsPage.d.ts +8 -0
  8. package/dist/pages/SM-8.11/ClusterDetailsPage.js +65 -0
  9. package/dist/pages/SM-8.11/ClusterPage.d.ts +11 -0
  10. package/dist/pages/SM-8.11/ClusterPage.js +37 -0
  11. package/dist/pages/SM-8.11/ConnectorMarketplacePage.d.ts +27 -0
  12. package/dist/pages/SM-8.11/ConnectorMarketplacePage.js +187 -0
  13. package/dist/pages/SM-8.11/ConnectorSettingsPage.d.ts +41 -0
  14. package/dist/pages/SM-8.11/ConnectorSettingsPage.js +153 -0
  15. package/dist/pages/SM-8.11/ConnectorTemplatePage.d.ts +11 -0
  16. package/dist/pages/SM-8.11/ConnectorTemplatePage.js +34 -0
  17. package/dist/pages/SM-8.11/FormJsPage.d.ts +33 -0
  18. package/dist/pages/SM-8.11/FormJsPage.js +109 -0
  19. package/dist/pages/SM-8.11/HomePage.d.ts +20 -0
  20. package/dist/pages/SM-8.11/HomePage.js +49 -0
  21. package/dist/pages/SM-8.11/IdentityTenantPage.d.ts +53 -0
  22. package/dist/pages/SM-8.11/IdentityTenantPage.js +264 -0
  23. package/dist/pages/SM-8.11/IdentityUsersPage.d.ts +92 -0
  24. package/dist/pages/SM-8.11/IdentityUsersPage.js +485 -0
  25. package/dist/pages/SM-8.11/KeycloakAdminPage.d.ts +17 -0
  26. package/dist/pages/SM-8.11/KeycloakAdminPage.js +78 -0
  27. package/dist/pages/SM-8.11/KeycloakLoginPage.d.ts +12 -0
  28. package/dist/pages/SM-8.11/KeycloakLoginPage.js +32 -0
  29. package/dist/pages/SM-8.11/KeycloakUtils.d.ts +17 -0
  30. package/dist/pages/SM-8.11/KeycloakUtils.js +94 -0
  31. package/dist/pages/SM-8.11/LoginPage.d.ts +21 -0
  32. package/dist/pages/SM-8.11/LoginPage.js +112 -0
  33. package/dist/pages/SM-8.11/ManagementIdentityPage.d.ts +44 -0
  34. package/dist/pages/SM-8.11/ManagementIdentityPage.js +176 -0
  35. package/dist/pages/SM-8.11/ModelerCreatePage.d.ts +238 -0
  36. package/dist/pages/SM-8.11/ModelerCreatePage.js +1950 -0
  37. package/dist/pages/SM-8.11/ModelerHomePage.d.ts +97 -0
  38. package/dist/pages/SM-8.11/ModelerHomePage.js +956 -0
  39. package/dist/pages/SM-8.11/NavigationPage.d.ts +58 -0
  40. package/dist/pages/SM-8.11/NavigationPage.js +389 -0
  41. package/dist/pages/SM-8.11/OCIdentityAuthorizationsPage.d.ts +10 -0
  42. package/dist/pages/SM-8.11/OCIdentityAuthorizationsPage.js +22 -0
  43. package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.d.ts +22 -0
  44. package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.js +120 -0
  45. package/dist/pages/SM-8.11/OCIdentityGroupsPage.d.ts +39 -0
  46. package/dist/pages/SM-8.11/OCIdentityGroupsPage.js +154 -0
  47. package/dist/pages/SM-8.11/OCIdentityHomePage.d.ts +23 -0
  48. package/dist/pages/SM-8.11/OCIdentityHomePage.js +115 -0
  49. package/dist/pages/SM-8.11/OCIdentityMappingRulesPage.d.ts +23 -0
  50. package/dist/pages/SM-8.11/OCIdentityMappingRulesPage.js +116 -0
  51. package/dist/pages/SM-8.11/OCIdentityRolesPage.d.ts +61 -0
  52. package/dist/pages/SM-8.11/OCIdentityRolesPage.js +433 -0
  53. package/dist/pages/SM-8.11/OCTenantPage.d.ts +73 -0
  54. package/dist/pages/SM-8.11/OCTenantPage.js +399 -0
  55. package/dist/pages/SM-8.11/OperateHomePage.d.ts +26 -0
  56. package/dist/pages/SM-8.11/OperateHomePage.js +139 -0
  57. package/dist/pages/SM-8.11/OperateProcessInstancePage.d.ts +30 -0
  58. package/dist/pages/SM-8.11/OperateProcessInstancePage.js +276 -0
  59. package/dist/pages/SM-8.11/OperateProcessesPage.d.ts +38 -0
  60. package/dist/pages/SM-8.11/OperateProcessesPage.js +383 -0
  61. package/dist/pages/SM-8.11/OptimizeCollectionsPage.d.ts +17 -0
  62. package/dist/pages/SM-8.11/OptimizeCollectionsPage.js +62 -0
  63. package/dist/pages/SM-8.11/OptimizeDashboardPage.d.ts +14 -0
  64. package/dist/pages/SM-8.11/OptimizeDashboardPage.js +63 -0
  65. package/dist/pages/SM-8.11/OptimizeHomePage.d.ts +19 -0
  66. package/dist/pages/SM-8.11/OptimizeHomePage.js +76 -0
  67. package/dist/pages/SM-8.11/OptimizeReportPage.d.ts +50 -0
  68. package/dist/pages/SM-8.11/OptimizeReportPage.js +209 -0
  69. package/dist/pages/SM-8.11/PlayPage.d.ts +47 -0
  70. package/dist/pages/SM-8.11/PlayPage.js +389 -0
  71. package/dist/pages/SM-8.11/ProcessApplicationPage.d.ts +35 -0
  72. package/dist/pages/SM-8.11/ProcessApplicationPage.js +340 -0
  73. package/dist/pages/SM-8.11/SettingsPage.d.ts +12 -0
  74. package/dist/pages/SM-8.11/SettingsPage.js +34 -0
  75. package/dist/pages/SM-8.11/TaskDetailsPage.d.ts +70 -0
  76. package/dist/pages/SM-8.11/TaskDetailsPage.js +273 -0
  77. package/dist/pages/SM-8.11/TaskPanelPage.d.ts +29 -0
  78. package/dist/pages/SM-8.11/TaskPanelPage.js +320 -0
  79. package/dist/pages/SM-8.11/TaskProcessesPage.d.ts +15 -0
  80. package/dist/pages/SM-8.11/TaskProcessesPage.js +77 -0
  81. package/dist/pages/SM-8.11/UtilitiesPage.d.ts +38 -0
  82. package/dist/pages/SM-8.11/UtilitiesPage.js +573 -0
  83. package/dist/pages/SM-8.11/optimizeReportUtils.d.ts +6 -0
  84. package/dist/pages/SM-8.11/optimizeReportUtils.js +77 -0
  85. package/dist/tests/SM-8.11/cluster-management-user-flows.spec.d.ts +1 -0
  86. package/dist/tests/SM-8.11/cluster-management-user-flows.spec.js +48 -0
  87. package/dist/tests/SM-8.11/cluster-variables.spec.d.ts +1 -0
  88. package/dist/tests/SM-8.11/cluster-variables.spec.js +226 -0
  89. package/dist/tests/SM-8.11/connectors-user-flows.spec.d.ts +1 -0
  90. package/dist/tests/SM-8.11/connectors-user-flows.spec.js +307 -0
  91. package/dist/tests/SM-8.11/document-handling-user-flows.spec.d.ts +1 -0
  92. package/dist/tests/SM-8.11/document-handling-user-flows.spec.js +174 -0
  93. package/dist/tests/SM-8.11/hto-user-flows.spec.d.ts +1 -0
  94. package/dist/tests/SM-8.11/hto-user-flows.spec.js +410 -0
  95. package/dist/tests/SM-8.11/hub-web-modeler-smoke.spec.d.ts +1 -0
  96. package/dist/tests/SM-8.11/hub-web-modeler-smoke.spec.js +24 -0
  97. package/dist/tests/SM-8.11/identity-user-flows.spec.d.ts +1 -0
  98. package/dist/tests/SM-8.11/identity-user-flows.spec.js +220 -0
  99. package/dist/tests/SM-8.11/license-key-user-flows.spec.d.ts +1 -0
  100. package/dist/tests/SM-8.11/license-key-user-flows.spec.js +461 -0
  101. package/dist/tests/SM-8.11/login.spec.d.ts +1 -0
  102. package/dist/tests/SM-8.11/login.spec.js +24 -0
  103. package/dist/tests/SM-8.11/migration-path-user-flows.spec.d.ts +1 -0
  104. package/dist/tests/SM-8.11/migration-path-user-flows.spec.js +263 -0
  105. package/dist/tests/SM-8.11/mt-enabled-user-flows.spec.d.ts +1 -0
  106. package/dist/tests/SM-8.11/mt-enabled-user-flows.spec.js +607 -0
  107. package/dist/tests/SM-8.11/optimize-user-flows.spec.d.ts +1 -0
  108. package/dist/tests/SM-8.11/optimize-user-flows.spec.js +505 -0
  109. package/dist/tests/SM-8.11/play.spec.d.ts +1 -0
  110. package/dist/tests/SM-8.11/play.spec.js +144 -0
  111. package/dist/tests/SM-8.11/rba-enabled-user-flows.spec.d.ts +1 -0
  112. package/dist/tests/SM-8.11/rba-enabled-user-flows.spec.js +712 -0
  113. package/dist/tests/SM-8.11/smoke-tests.spec.d.ts +1 -0
  114. package/dist/tests/SM-8.11/smoke-tests.spec.js +167 -0
  115. package/dist/tests/SM-8.11/test-setup.spec.d.ts +1 -0
  116. package/dist/tests/SM-8.11/test-setup.spec.js +24 -0
  117. package/dist/tests/SM-8.11/topology-orchestration-smoke.spec.d.ts +1 -0
  118. package/dist/tests/SM-8.11/topology-orchestration-smoke.spec.js +58 -0
  119. package/dist/tests/SM-8.11/web-modeler-user-flows.spec.d.ts +1 -0
  120. package/dist/tests/SM-8.11/web-modeler-user-flows.spec.js +223 -0
  121. package/package.json +1 -1
  122. package/playwright.config.ts +21 -0
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormJsPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const modelerCluster_1 = require("../../utils/modelerCluster");
6
+ const hubDeployDialog_1 = require("../../utils/hubDeployDialog");
7
+ class FormJsPage {
8
+ page;
9
+ aiFormGeneratorButton;
10
+ formRequestInput;
11
+ generateFormButton;
12
+ formEditor;
13
+ filePicker;
14
+ generalPanel;
15
+ keyInput;
16
+ uploadMultipleFilesToggle;
17
+ documentReferenceInput;
18
+ documentPreview;
19
+ deployDialog;
20
+ deployFormButton;
21
+ deployModalSubmitButton;
22
+ deploySuccessNotification;
23
+ constructor(page) {
24
+ this.page = page;
25
+ this.aiFormGeneratorButton = page.getByRole('button', {
26
+ name: 'AI Form Generator',
27
+ });
28
+ this.formRequestInput = page.getByPlaceholder('A form for an american standard loan request');
29
+ this.generateFormButton = page.getByRole('button', { name: 'Generate form' });
30
+ this.formEditor = page.getByLabel('Form Definition');
31
+ this.filePicker = page.locator('button[data-field-type="filepicker"]');
32
+ this.generalPanel = page.locator('[data-group-id="group-general"]').first();
33
+ this.keyInput = page.getByRole('textbox', { name: 'key' });
34
+ this.uploadMultipleFilesToggle = page.locator('div[data-entry-id="multiple"] .bio-properties-panel-toggle-switch__switcher');
35
+ this.documentReferenceInput = page.getByRole('textbox', {
36
+ name: 'document reference',
37
+ });
38
+ this.documentPreview = page.locator('button[data-field-type="documentPreview"]');
39
+ this.deployDialog = page.getByRole('dialog');
40
+ // The Design System shell renders none of Carbon's cds-- classes, so the
41
+ // editor's Deploy button, the dialog's submit and the success toast are all
42
+ // matched by role and text instead -- which resolves on both shells.
43
+ // .first(): once the deploy dialog is open its submit carries the same
44
+ // accessible name; the editor's button is the earlier one in the DOM.
45
+ this.deployFormButton = page
46
+ .getByRole('button', { name: 'Deploy', exact: true })
47
+ .first();
48
+ this.deployModalSubmitButton = this.deployDialog
49
+ .getByRole('button', { name: 'Deploy', exact: true })
50
+ .or(page.locator('button[data-modal-primary-focus="true"][type="submit"]'))
51
+ .first();
52
+ this.deploySuccessNotification = page.getByText('Form deployed!').first();
53
+ }
54
+ async clickAIFormGeneratorButton() {
55
+ await this.aiFormGeneratorButton.click();
56
+ }
57
+ async clickFormRequestInput() {
58
+ await this.formRequestInput.click();
59
+ }
60
+ async fillFormRequestInput(formRequest) {
61
+ await this.formRequestInput.fill(formRequest);
62
+ }
63
+ async clickGenerateFormButton() {
64
+ await this.generateFormButton.click();
65
+ }
66
+ async dragAndDrop(source, target) {
67
+ await source.waitFor();
68
+ await target.waitFor();
69
+ await source.dragTo(target);
70
+ }
71
+ async clickGeneralPropertiesPanel() {
72
+ await this.generalPanel.click({ timeout: 60000 });
73
+ }
74
+ async fillKeyInput(key) {
75
+ await this.keyInput.fill(key, { timeout: 60000 });
76
+ }
77
+ async enableUploadMultipleFiles() {
78
+ await this.uploadMultipleFilesToggle.click({ timeout: 60000 });
79
+ }
80
+ async filldocumentReferenceInput(key) {
81
+ await this.documentReferenceInput.fill(key, { timeout: 60000 });
82
+ }
83
+ async clickDeployFormButton() {
84
+ await this.deployFormButton.click({ timeout: 60000 });
85
+ }
86
+ async clickDeployModalSubmitButton() {
87
+ await this.deployModalSubmitButton.click({ timeout: 60000 });
88
+ }
89
+ // Since camunda/camunda-hub#25831 a form lives inside a process application,
90
+ // and Hub scopes Deploy to that application unless the scope is narrowed --
91
+ // deployProcessApplication, not deployFile, so the "Form deployed!" toast
92
+ // never fires. Narrowing the scope keeps this a form-deploy test instead of
93
+ // silently turning it into a process-application deploy. Since
94
+ // camunda/camunda-hub#29791 Hub preselects "Only this resource" when
95
+ // deploying from a file, so the shared helper's already-selected guard is
96
+ // what keeps this from reopening the preselected scope select and failing.
97
+ async selectOnlyThisResource() {
98
+ await (0, hubDeployDialog_1.selectOnlyThisResourceInDialog)(this.page, this.deployDialog);
99
+ }
100
+ async deployForm() {
101
+ await this.clickDeployFormButton();
102
+ await (0, test_1.expect)(this.deployDialog).toBeVisible({ timeout: 30000 });
103
+ await (0, modelerCluster_1.selectModelerCluster)(this.deployDialog);
104
+ await this.selectOnlyThisResource();
105
+ await this.clickDeployModalSubmitButton();
106
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
107
+ }
108
+ }
109
+ exports.FormJsPage = FormJsPage;
@@ -0,0 +1,20 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class HomePage {
3
+ private page;
4
+ readonly dashboardTab: Locator;
5
+ readonly clusterTab: Locator;
6
+ readonly organizationTab: Locator;
7
+ readonly organizationViewTitle: Locator;
8
+ readonly welcomeMessage: Locator;
9
+ readonly informationDialog: Locator;
10
+ readonly camundaAppsButton: Locator;
11
+ readonly camundaComponentsButton: Locator;
12
+ constructor(page: Page);
13
+ clickClusters(): Promise<void>;
14
+ clickDashboard(): Promise<void>;
15
+ clickOrganization(): Promise<void>;
16
+ closeInformationDialog(): Promise<void>;
17
+ clickCamundaComponents(): Promise<void>;
18
+ clickCamundaApps(): Promise<void>;
19
+ }
20
+ export { HomePage };
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HomePage = void 0;
4
+ class HomePage {
5
+ page;
6
+ dashboardTab;
7
+ clusterTab;
8
+ organizationTab;
9
+ organizationViewTitle;
10
+ welcomeMessage;
11
+ informationDialog;
12
+ camundaAppsButton;
13
+ camundaComponentsButton;
14
+ constructor(page) {
15
+ this.page = page;
16
+ this.dashboardTab = page.getByRole('link', { name: 'Dashboard' });
17
+ this.clusterTab = page.getByRole('link', { name: 'Clusters' });
18
+ this.organizationTab = page.getByRole('link', { name: 'Organization' });
19
+ this.organizationViewTitle = page.getByText('Organization Management');
20
+ this.welcomeMessage = page.getByText('Welcome, demo').first();
21
+ this.informationDialog = page.getByRole('button', {
22
+ name: 'Close this dialog',
23
+ });
24
+ this.camundaComponentsButton = page.getByLabel('Camunda components');
25
+ this.camundaAppsButton = page.getByLabel('Camunda apps');
26
+ }
27
+ async clickClusters() {
28
+ await this.clusterTab.click({ timeout: 90000 });
29
+ }
30
+ async clickDashboard() {
31
+ await this.dashboardTab.click({ timeout: 90000 });
32
+ }
33
+ async clickOrganization() {
34
+ await this.organizationTab.click({ timeout: 90000 });
35
+ }
36
+ async closeInformationDialog() {
37
+ const isLocalTest = process.env.LOCAL_TEST;
38
+ if (isLocalTest) {
39
+ await this.informationDialog.click();
40
+ }
41
+ }
42
+ async clickCamundaComponents() {
43
+ await this.camundaComponentsButton.click({ timeout: 90000 });
44
+ }
45
+ async clickCamundaApps() {
46
+ await this.camundaAppsButton.click({ timeout: 90000 });
47
+ }
48
+ }
49
+ exports.HomePage = HomePage;
@@ -0,0 +1,53 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class IdentityTenantPage {
3
+ private page;
4
+ readonly createTenantMainButton: Locator;
5
+ readonly enterTenantNameInput: Locator;
6
+ readonly enterTenantIdInput: Locator;
7
+ readonly createTenantSubButton: Locator;
8
+ readonly assignedUsersTab: Locator;
9
+ readonly assignUsersButton: Locator;
10
+ readonly searchUsersInput: Locator;
11
+ readonly assignUserFinalButton: Locator;
12
+ readonly removeUserButton: Locator;
13
+ readonly removeButton: Locator;
14
+ readonly openSidebarButton: Locator;
15
+ readonly logoutButton: Locator;
16
+ readonly assignedApplicationsTab: Locator;
17
+ readonly searchApplicationsInput: Locator;
18
+ readonly assignApplicationsButtonFinal: Locator;
19
+ readonly assignApplicationsButton: Locator;
20
+ readonly modalCloseButton: Locator;
21
+ readonly cancelButton: Locator;
22
+ readonly dialog: Locator;
23
+ readonly row: (name: string) => Locator;
24
+ readonly usersTab: Locator;
25
+ constructor(page: Page);
26
+ clickCreateTenantMainButton(): Promise<void>;
27
+ clickCreateTenantSubButton(): Promise<void>;
28
+ clickEnterTenantNameInput(): Promise<void>;
29
+ fillEnterTenantNameInput(tenantName: string): Promise<void>;
30
+ clickEnterTenantIdInput(): Promise<void>;
31
+ fillEnterTenantIdInput(tenantId: string): Promise<void>;
32
+ clickAssignedUsersTab(): Promise<void>;
33
+ clickAssignUsersButton(): Promise<void>;
34
+ clickSearchUsersInput(): Promise<void>;
35
+ fillSearchUsersInput(user: string): Promise<void>;
36
+ clickAssignUserFinalButton(): Promise<void>;
37
+ clickRemoveUserButton(): Promise<void>;
38
+ clickRemoveButton(): Promise<void>;
39
+ createTenant(tenantName: string): Promise<void>;
40
+ clickTenant(tenantName: string): Promise<void>;
41
+ private isRowVisible;
42
+ assignUserToTenant(tenantName: string, user: string, userEmail: string): Promise<void>;
43
+ removeUserFromTenant(tenantName: string): Promise<void>;
44
+ clickOpenSidebarButton(): Promise<void>;
45
+ clickLogoutButton(): Promise<void>;
46
+ assignClientToTenant(clientName: string): Promise<void>;
47
+ clickAssignedApplicationsTab(): Promise<void>;
48
+ clickSearchApplicationsInput(): Promise<void>;
49
+ fillSearchApplicationsInput(clientName: string): Promise<void>;
50
+ clickAssignApplicationsFinalButton(): Promise<void>;
51
+ clickAssignApplicationsButton(): Promise<void>;
52
+ }
53
+ export { IdentityTenantPage };
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentityTenantPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ const sleep_1 = require("../../utils/sleep");
6
+ const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
7
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
8
+ class IdentityTenantPage {
9
+ page;
10
+ createTenantMainButton;
11
+ enterTenantNameInput;
12
+ enterTenantIdInput;
13
+ createTenantSubButton;
14
+ assignedUsersTab;
15
+ assignUsersButton;
16
+ searchUsersInput;
17
+ assignUserFinalButton;
18
+ removeUserButton;
19
+ removeButton;
20
+ openSidebarButton;
21
+ logoutButton;
22
+ assignedApplicationsTab;
23
+ searchApplicationsInput;
24
+ assignApplicationsButtonFinal;
25
+ assignApplicationsButton;
26
+ modalCloseButton;
27
+ cancelButton;
28
+ dialog;
29
+ row;
30
+ usersTab;
31
+ constructor(page) {
32
+ this.page = page;
33
+ this.createTenantMainButton = page.getByRole('button', {
34
+ name: 'Create Tenant',
35
+ });
36
+ this.usersTab = page.getByRole('tab', { name: 'Users' });
37
+ this.enterTenantNameInput = page.getByPlaceholder('Enter tenant name');
38
+ this.enterTenantIdInput = page.getByPlaceholder('Enter tenant ID');
39
+ this.createTenantSubButton = page.getByRole('button', {
40
+ name: 'Create tenant',
41
+ exact: true,
42
+ });
43
+ this.assignedUsersTab = page.getByRole('tab', { name: 'Assigned users' });
44
+ this.assignUsersButton = page.getByRole('button', { name: 'Assign users' });
45
+ this.searchUsersInput = page.getByPlaceholder('Search users');
46
+ this.assignUserFinalButton = page
47
+ .getByRole('dialog', { name: 'Assign users' })
48
+ .getByRole('button', { name: 'Assign users' });
49
+ this.removeUserButton = page.getByLabel('Remove user');
50
+ this.removeButton = page.getByRole('button', { name: 'danger Remove' });
51
+ this.openSidebarButton = page.getByLabel('Open User Sidebar');
52
+ this.logoutButton = page.getByRole('button', { name: 'Log out' });
53
+ this.assignedApplicationsTab = page.getByRole('tab', {
54
+ name: 'Assigned applications',
55
+ });
56
+ this.searchApplicationsInput = page.getByPlaceholder('Search applications');
57
+ this.assignApplicationsButtonFinal = page
58
+ .getByLabel('Assign applications')
59
+ .getByRole('button', { name: 'Assign applications' });
60
+ this.assignApplicationsButton = page.getByRole('button', {
61
+ name: 'Assign applications',
62
+ });
63
+ this.modalCloseButton = page
64
+ .getByRole('dialog')
65
+ .getByRole('button', { name: 'Close' });
66
+ this.cancelButton = page
67
+ .getByRole('dialog')
68
+ .getByRole('button', { name: 'Cancel' });
69
+ this.dialog = page.getByRole('dialog');
70
+ this.row = (name) => this.page.getByRole('row').filter({ hasText: name }).first();
71
+ }
72
+ async clickCreateTenantMainButton() {
73
+ await (0, test_1.expect)(this.createTenantMainButton).toBeVisible({ timeout: 60000 });
74
+ await this.createTenantMainButton.click({ timeout: 60000 });
75
+ }
76
+ async clickCreateTenantSubButton() {
77
+ await (0, test_1.expect)(this.createTenantSubButton).toBeVisible({ timeout: 60000 });
78
+ await this.createTenantSubButton.click({ timeout: 60000 });
79
+ }
80
+ async clickEnterTenantNameInput() {
81
+ await (0, test_1.expect)(this.enterTenantNameInput).toBeVisible({ timeout: 60000 });
82
+ await this.enterTenantNameInput.click();
83
+ }
84
+ async fillEnterTenantNameInput(tenantName) {
85
+ await this.enterTenantNameInput.fill(tenantName);
86
+ }
87
+ async clickEnterTenantIdInput() {
88
+ await (0, test_1.expect)(this.enterTenantIdInput).toBeVisible({ timeout: 60000 });
89
+ await this.enterTenantIdInput.click();
90
+ }
91
+ async fillEnterTenantIdInput(tenantId) {
92
+ await this.enterTenantIdInput.fill(tenantId);
93
+ }
94
+ async clickAssignedUsersTab() {
95
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.assignedUsersTab, {
96
+ postAction: async () => {
97
+ await this.page.reload();
98
+ },
99
+ });
100
+ }
101
+ async clickAssignUsersButton() {
102
+ await (0, test_1.expect)(this.assignUsersButton).toBeVisible({ timeout: 60000 });
103
+ await this.assignUsersButton.click();
104
+ }
105
+ async clickSearchUsersInput() {
106
+ await this.searchUsersInput.click();
107
+ }
108
+ async fillSearchUsersInput(user) {
109
+ await this.searchUsersInput.fill(user);
110
+ }
111
+ async clickAssignUserFinalButton() {
112
+ await (0, test_1.expect)(this.assignUserFinalButton).toBeVisible({ timeout: 60000 });
113
+ await this.assignUserFinalButton.click();
114
+ const successToast = this.page.getByText('Users assigned', { exact: true });
115
+ const errorToast = this.page.getByText('An error occurred');
116
+ const alreadyExists = this.page.getByText('ALREADY_EXISTS');
117
+ await (0, test_1.expect)(successToast.or(errorToast).or(alreadyExists)).toBeVisible({
118
+ timeout: 30000,
119
+ });
120
+ if (await alreadyExists.isVisible()) {
121
+ console.log('User already assigned to tenant');
122
+ await this.cancelButton.click();
123
+ await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 15000 });
124
+ return;
125
+ }
126
+ if (await errorToast.isVisible()) {
127
+ await this.cancelButton.click().catch(() => { });
128
+ await (0, test_1.expect)(this.dialog)
129
+ .not.toBeVisible({ timeout: 15000 })
130
+ .catch(() => { });
131
+ throw new Error('Identity API returned "An error occurred" when assigning user to tenant');
132
+ }
133
+ // success: "Users assigned" toast visible
134
+ }
135
+ async clickRemoveUserButton() {
136
+ await this.removeUserButton.click();
137
+ }
138
+ async clickRemoveButton() {
139
+ await this.removeButton.click();
140
+ }
141
+ async createTenant(tenantName) {
142
+ if (await this.isRowVisible(tenantName)) {
143
+ return;
144
+ }
145
+ await this.clickCreateTenantMainButton();
146
+ await this.clickEnterTenantNameInput();
147
+ await this.fillEnterTenantNameInput(tenantName);
148
+ await this.clickEnterTenantIdInput();
149
+ await this.fillEnterTenantIdInput(tenantName);
150
+ await this.clickCreateTenantSubButton();
151
+ await (0, test_1.expect)(this.page.getByText('Tenant created')).toBeVisible({
152
+ timeout: 60000,
153
+ });
154
+ await (0, sleep_1.sleep)(30000);
155
+ }
156
+ async clickTenant(tenantName) {
157
+ const maxRetries = 5;
158
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
159
+ try {
160
+ await this.page.waitForLoadState('domcontentloaded').catch(() => { });
161
+ const tenantRow = this.row(tenantName);
162
+ await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, tenantRow);
163
+ await tenantRow.locator('td').first().click({ timeout: 30000 });
164
+ await this.usersTab.waitFor({ state: 'visible', timeout: 30000 });
165
+ return;
166
+ }
167
+ catch (error) {
168
+ console.warn(`Attempt ${attempt} to click tenant '${tenantName}' failed. Retrying...`, error);
169
+ if (attempt === maxRetries) {
170
+ throw new Error(`Failed to click tenant '${tenantName}' after ${maxRetries} attempts.`);
171
+ }
172
+ await this.page.reload({ timeout: 30000 }).catch(() => { });
173
+ await (0, sleep_1.sleep)(3000);
174
+ }
175
+ }
176
+ }
177
+ async isRowVisible(name) {
178
+ await (0, sleep_1.sleep)(1000);
179
+ if (await this.row(name).isVisible()) {
180
+ console.log(`Row ${name} already exists.`);
181
+ return true;
182
+ }
183
+ return false;
184
+ }
185
+ async assignUserToTenant(tenantName, user, userEmail) {
186
+ const MAX_ATTEMPTS = 3;
187
+ for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) {
188
+ await (0, sleep_1.sleep)(attempt === 1 ? 1000 : 10000);
189
+ await this.clickTenant(tenantName);
190
+ await this.clickAssignedUsersTab();
191
+ if (await this.isRowVisible(userEmail)) {
192
+ return;
193
+ }
194
+ try {
195
+ await this.clickAssignUsersButton();
196
+ await this.clickSearchUsersInput();
197
+ await this.fillSearchUsersInput(user);
198
+ await (0, test_1.expect)(this.page.getByText(userEmail)).toBeVisible({
199
+ timeout: 30000,
200
+ });
201
+ await this.page.getByText(userEmail).click({ timeout: 30000 });
202
+ await this.clickAssignUserFinalButton();
203
+ return;
204
+ }
205
+ catch (e) {
206
+ console.log(`Attempt ${attempt} to assign user '${user}' to tenant '${tenantName}' failed: ${e}.`);
207
+ if (attempt >= MAX_ATTEMPTS) {
208
+ throw new Error(`Failed to assign user '${user}' to tenant '${tenantName}' after ${MAX_ATTEMPTS} attempts: ${e}`);
209
+ }
210
+ await this.page.reload({ timeout: 30000 }).catch(() => { });
211
+ await (0, sleep_1.sleep)(5000);
212
+ }
213
+ }
214
+ }
215
+ async removeUserFromTenant(tenantName) {
216
+ await this.page.getByText(tenantName).first().click();
217
+ await this.clickAssignedUsersTab();
218
+ await this.clickRemoveUserButton();
219
+ await this.clickRemoveButton();
220
+ await (0, test_1.expect)(this.page.getByText('users.Entity removed')).toBeVisible({
221
+ timeout: 60000,
222
+ });
223
+ }
224
+ async clickOpenSidebarButton() {
225
+ await this.openSidebarButton.click({ timeout: 60000 });
226
+ }
227
+ async clickLogoutButton() {
228
+ await this.logoutButton.click({ timeout: 60000 });
229
+ }
230
+ async assignClientToTenant(clientName) {
231
+ await this.clickAssignedApplicationsTab();
232
+ await (0, sleep_1.sleep)(3000);
233
+ if (await this.isRowVisible(clientName)) {
234
+ return;
235
+ }
236
+ await this.clickAssignApplicationsButton();
237
+ await this.clickSearchApplicationsInput();
238
+ await this.fillSearchApplicationsInput(clientName);
239
+ await (0, test_1.expect)(this.page.getByText(clientName, { exact: true })).toBeVisible({
240
+ timeout: 15000,
241
+ });
242
+ await this.page.getByText(clientName, { exact: true }).click();
243
+ await this.clickAssignApplicationsFinalButton();
244
+ await (0, test_1.expect)(this.page.getByText('Applications assigned').first()).toBeVisible({
245
+ timeout: 60000,
246
+ });
247
+ }
248
+ async clickAssignedApplicationsTab() {
249
+ await this.assignedApplicationsTab.click({ timeout: 60000 });
250
+ }
251
+ async clickSearchApplicationsInput() {
252
+ await this.searchApplicationsInput.click({ timeout: 60000 });
253
+ }
254
+ async fillSearchApplicationsInput(clientName) {
255
+ await this.searchApplicationsInput.fill(clientName);
256
+ }
257
+ async clickAssignApplicationsFinalButton() {
258
+ await this.assignApplicationsButtonFinal.click({ timeout: 60000 });
259
+ }
260
+ async clickAssignApplicationsButton() {
261
+ await this.assignApplicationsButton.click({ timeout: 60000 });
262
+ }
263
+ }
264
+ exports.IdentityTenantPage = IdentityTenantPage;
@@ -0,0 +1,92 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ declare class IdentityUsersPage {
3
+ private page;
4
+ readonly usersTab: Locator;
5
+ readonly optionsButton: Locator;
6
+ readonly editUserMenuItem: Locator;
7
+ readonly operationsEngineerCheckbox: Locator;
8
+ readonly developerCheckbox: Locator;
9
+ readonly analystCheckbox: Locator;
10
+ readonly confirmButton: Locator;
11
+ readonly settingsTab: Locator;
12
+ readonly optInButton: Locator;
13
+ readonly optInCheckbox: Locator;
14
+ readonly newContextPadButton: Locator;
15
+ readonly newContextPadButtonText: Locator;
16
+ readonly mainUser: Locator;
17
+ readonly authorizations: Locator;
18
+ readonly noAuthorizedResourceMessage: Locator;
19
+ readonly dialog: Locator;
20
+ readonly deleteAuthorisedResourceButton: Locator;
21
+ readonly deleteAuthorisedResourceSubButton: Locator;
22
+ readonly createResourceAuthorizationButton: Locator;
23
+ readonly createResourceAuthorizationDialog: Locator;
24
+ readonly nextButton: Locator;
25
+ readonly createButton: Locator;
26
+ readonly idComboBox: Locator;
27
+ readonly readPermissionCheckbox: Locator;
28
+ readonly startProcessIPermissionCheckbox: Locator;
29
+ readonly optInAICheckbox: Locator;
30
+ readonly rows: Locator;
31
+ readonly groupsTab: Locator;
32
+ readonly createGroupButton: Locator;
33
+ readonly createGroupSubButton: Locator;
34
+ readonly groupNameInput: Locator;
35
+ readonly noGroupsHeading: Locator;
36
+ readonly createFirstGroupButton: Locator;
37
+ readonly createGroupDialoge: Locator;
38
+ readonly assignMembersButton: Locator;
39
+ readonly assignMembersSubButton: Locator;
40
+ readonly assignMembersSearchbox: Locator;
41
+ readonly assignMembersSearchResult: Locator;
42
+ readonly organizationManagementLink: Locator;
43
+ readonly deleteSubButton: Locator;
44
+ readonly deleteButton: Locator;
45
+ readonly filterTableSearchbox: Locator;
46
+ readonly assignAuthorizationButton: Locator;
47
+ readonly assignedRolesTab: Locator;
48
+ constructor(page: Page);
49
+ clickCreateAuthorizedResourceButton(): Promise<void>;
50
+ processIdResourceAssertion(processId: string): Promise<void>;
51
+ clickCreateResourceAuthorizationButton(): Promise<void>;
52
+ clickNextButton(): Promise<void>;
53
+ clickProcessIdInput(): Promise<void>;
54
+ fillProcessIdInput(processId: string): Promise<void>;
55
+ checkReadPermissionCheckbox(): Promise<void>;
56
+ checkStartInstancePermissionCheckbox(): Promise<void>;
57
+ clickUsersTab(): Promise<void>;
58
+ clickOptionsButton(): Promise<void>;
59
+ clickEditUserMenuItem(): Promise<void>;
60
+ clickOperationsEngineerCheckbox(): Promise<void>;
61
+ checkDeveloperCheckbox(): Promise<void>;
62
+ uncheckDeveloperCheckbox(): Promise<void>;
63
+ checkAnalystCheckbox(): Promise<void>;
64
+ uncheckAnalystCheckbox(): Promise<void>;
65
+ clickConfirmButton(): Promise<void>;
66
+ clickSettingsTab(): Promise<void>;
67
+ clickOptInButton(): Promise<void>;
68
+ enableAlphaFeature(name: string): Promise<void>;
69
+ scrollToOptInCheckbox(): Promise<void>;
70
+ checkOptInCheckbox(): Promise<void>;
71
+ clickMainUser(): Promise<void>;
72
+ clickAuthorizations(): Promise<void>;
73
+ authorizedResourceAssertion(processId: string, maxRetries?: number, timeout?: number): Promise<void>;
74
+ clickNewContextPadButton(): Promise<void>;
75
+ optInToAlphaFeatures(): Promise<void>;
76
+ clickGroupsTab(): Promise<void>;
77
+ clickCreateGroupButton(): Promise<void>;
78
+ fillGroupNameInput(name: string): Promise<void>;
79
+ clickCreateGroupSubButton(): Promise<void>;
80
+ clickUserGroup(name: string): Promise<void>;
81
+ clickAssignMembers(): Promise<void>;
82
+ fillAssignMembers(names: string[]): Promise<void>;
83
+ filterTable(names: string[]): Promise<void>;
84
+ clickAssignSubButton(): Promise<void>;
85
+ clickOrganizationManagementLink(): Promise<void>;
86
+ deleteAllGroups(): Promise<void>;
87
+ createResourceAuthorization(processId: string): Promise<void>;
88
+ clickAssignAuthorizationButton(): Promise<void>;
89
+ clickAssignedRolesTab(): Promise<void>;
90
+ assertUserIsAssignedCorrectRole(username: string, roles: (string | string[])[]): Promise<void>;
91
+ }
92
+ export { IdentityUsersPage };