@camunda/e2e-test-suite 0.0.1442 → 0.0.1444
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/c8_versions.json +1 -0
- package/README.md +2 -0
- package/dist/fixtures/SM-8.11.d.ts +77 -0
- package/dist/fixtures/SM-8.11.js +176 -0
- package/dist/pages/8.7/ModelerCreatePage.js +21 -0
- package/dist/pages/SM-8.11/Authorization.d.ts +39 -0
- package/dist/pages/SM-8.11/Authorization.js +349 -0
- package/dist/pages/SM-8.11/ClusterDetailsPage.d.ts +8 -0
- package/dist/pages/SM-8.11/ClusterDetailsPage.js +65 -0
- package/dist/pages/SM-8.11/ClusterPage.d.ts +11 -0
- package/dist/pages/SM-8.11/ClusterPage.js +37 -0
- package/dist/pages/SM-8.11/ConnectorMarketplacePage.d.ts +27 -0
- package/dist/pages/SM-8.11/ConnectorMarketplacePage.js +187 -0
- package/dist/pages/SM-8.11/ConnectorSettingsPage.d.ts +41 -0
- package/dist/pages/SM-8.11/ConnectorSettingsPage.js +153 -0
- package/dist/pages/SM-8.11/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/SM-8.11/ConnectorTemplatePage.js +34 -0
- package/dist/pages/SM-8.11/FormJsPage.d.ts +33 -0
- package/dist/pages/SM-8.11/FormJsPage.js +109 -0
- package/dist/pages/SM-8.11/HomePage.d.ts +20 -0
- package/dist/pages/SM-8.11/HomePage.js +49 -0
- package/dist/pages/SM-8.11/IdentityTenantPage.d.ts +53 -0
- package/dist/pages/SM-8.11/IdentityTenantPage.js +264 -0
- package/dist/pages/SM-8.11/IdentityUsersPage.d.ts +92 -0
- package/dist/pages/SM-8.11/IdentityUsersPage.js +485 -0
- package/dist/pages/SM-8.11/KeycloakAdminPage.d.ts +17 -0
- package/dist/pages/SM-8.11/KeycloakAdminPage.js +78 -0
- package/dist/pages/SM-8.11/KeycloakLoginPage.d.ts +12 -0
- package/dist/pages/SM-8.11/KeycloakLoginPage.js +32 -0
- package/dist/pages/SM-8.11/KeycloakUtils.d.ts +17 -0
- package/dist/pages/SM-8.11/KeycloakUtils.js +94 -0
- package/dist/pages/SM-8.11/LoginPage.d.ts +21 -0
- package/dist/pages/SM-8.11/LoginPage.js +112 -0
- package/dist/pages/SM-8.11/ManagementIdentityPage.d.ts +44 -0
- package/dist/pages/SM-8.11/ManagementIdentityPage.js +176 -0
- package/dist/pages/SM-8.11/ModelerCreatePage.d.ts +238 -0
- package/dist/pages/SM-8.11/ModelerCreatePage.js +1950 -0
- package/dist/pages/SM-8.11/ModelerHomePage.d.ts +97 -0
- package/dist/pages/SM-8.11/ModelerHomePage.js +956 -0
- package/dist/pages/SM-8.11/NavigationPage.d.ts +58 -0
- package/dist/pages/SM-8.11/NavigationPage.js +389 -0
- package/dist/pages/SM-8.11/OCIdentityAuthorizationsPage.d.ts +10 -0
- package/dist/pages/SM-8.11/OCIdentityAuthorizationsPage.js +22 -0
- package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.d.ts +22 -0
- package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.js +120 -0
- package/dist/pages/SM-8.11/OCIdentityGroupsPage.d.ts +39 -0
- package/dist/pages/SM-8.11/OCIdentityGroupsPage.js +154 -0
- package/dist/pages/SM-8.11/OCIdentityHomePage.d.ts +23 -0
- package/dist/pages/SM-8.11/OCIdentityHomePage.js +115 -0
- package/dist/pages/SM-8.11/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/SM-8.11/OCIdentityMappingRulesPage.js +116 -0
- package/dist/pages/SM-8.11/OCIdentityRolesPage.d.ts +61 -0
- package/dist/pages/SM-8.11/OCIdentityRolesPage.js +433 -0
- package/dist/pages/SM-8.11/OCTenantPage.d.ts +73 -0
- package/dist/pages/SM-8.11/OCTenantPage.js +399 -0
- package/dist/pages/SM-8.11/OperateHomePage.d.ts +26 -0
- package/dist/pages/SM-8.11/OperateHomePage.js +139 -0
- package/dist/pages/SM-8.11/OperateProcessInstancePage.d.ts +30 -0
- package/dist/pages/SM-8.11/OperateProcessInstancePage.js +276 -0
- package/dist/pages/SM-8.11/OperateProcessesPage.d.ts +38 -0
- package/dist/pages/SM-8.11/OperateProcessesPage.js +383 -0
- package/dist/pages/SM-8.11/OptimizeCollectionsPage.d.ts +17 -0
- package/dist/pages/SM-8.11/OptimizeCollectionsPage.js +62 -0
- package/dist/pages/SM-8.11/OptimizeDashboardPage.d.ts +14 -0
- package/dist/pages/SM-8.11/OptimizeDashboardPage.js +63 -0
- package/dist/pages/SM-8.11/OptimizeHomePage.d.ts +19 -0
- package/dist/pages/SM-8.11/OptimizeHomePage.js +76 -0
- package/dist/pages/SM-8.11/OptimizeReportPage.d.ts +50 -0
- package/dist/pages/SM-8.11/OptimizeReportPage.js +209 -0
- package/dist/pages/SM-8.11/PlayPage.d.ts +47 -0
- package/dist/pages/SM-8.11/PlayPage.js +389 -0
- package/dist/pages/SM-8.11/ProcessApplicationPage.d.ts +35 -0
- package/dist/pages/SM-8.11/ProcessApplicationPage.js +340 -0
- package/dist/pages/SM-8.11/SettingsPage.d.ts +12 -0
- package/dist/pages/SM-8.11/SettingsPage.js +34 -0
- package/dist/pages/SM-8.11/TaskDetailsPage.d.ts +70 -0
- package/dist/pages/SM-8.11/TaskDetailsPage.js +273 -0
- package/dist/pages/SM-8.11/TaskPanelPage.d.ts +29 -0
- package/dist/pages/SM-8.11/TaskPanelPage.js +320 -0
- package/dist/pages/SM-8.11/TaskProcessesPage.d.ts +15 -0
- package/dist/pages/SM-8.11/TaskProcessesPage.js +77 -0
- package/dist/pages/SM-8.11/UtilitiesPage.d.ts +38 -0
- package/dist/pages/SM-8.11/UtilitiesPage.js +573 -0
- package/dist/pages/SM-8.11/optimizeReportUtils.d.ts +6 -0
- package/dist/pages/SM-8.11/optimizeReportUtils.js +77 -0
- package/dist/tests/SM-8.11/cluster-management-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/cluster-management-user-flows.spec.js +48 -0
- package/dist/tests/SM-8.11/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/cluster-variables.spec.js +226 -0
- package/dist/tests/SM-8.11/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/connectors-user-flows.spec.js +307 -0
- package/dist/tests/SM-8.11/document-handling-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/document-handling-user-flows.spec.js +174 -0
- package/dist/tests/SM-8.11/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/hto-user-flows.spec.js +410 -0
- package/dist/tests/SM-8.11/hub-web-modeler-smoke.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/hub-web-modeler-smoke.spec.js +24 -0
- package/dist/tests/SM-8.11/identity-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/identity-user-flows.spec.js +220 -0
- package/dist/tests/SM-8.11/license-key-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/license-key-user-flows.spec.js +461 -0
- package/dist/tests/SM-8.11/login.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/login.spec.js +24 -0
- package/dist/tests/SM-8.11/migration-path-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/migration-path-user-flows.spec.js +263 -0
- package/dist/tests/SM-8.11/mt-enabled-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/mt-enabled-user-flows.spec.js +607 -0
- package/dist/tests/SM-8.11/optimize-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/optimize-user-flows.spec.js +505 -0
- package/dist/tests/SM-8.11/play.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/play.spec.js +144 -0
- package/dist/tests/SM-8.11/rba-enabled-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/rba-enabled-user-flows.spec.js +712 -0
- package/dist/tests/SM-8.11/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/smoke-tests.spec.js +167 -0
- package/dist/tests/SM-8.11/test-setup.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/test-setup.spec.js +24 -0
- package/dist/tests/SM-8.11/topology-orchestration-smoke.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/topology-orchestration-smoke.spec.js +58 -0
- package/dist/tests/SM-8.11/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/web-modeler-user-flows.spec.js +223 -0
- package/package.json +1 -1
- package/playwright.config.ts +21 -0
|
@@ -0,0 +1,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 };
|