@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.
- package/.github/c8_versions.json +1 -0
- package/README.md +1 -0
- package/dist/fixtures/8.11.d.ts +83 -0
- package/dist/fixtures/8.11.js +203 -0
- package/dist/pages/8.11/AppsPage.d.ts +60 -0
- package/dist/pages/8.11/AppsPage.js +1060 -0
- package/dist/pages/8.11/AuditLogPage.d.ts +14 -0
- package/dist/pages/8.11/AuditLogPage.js +69 -0
- package/dist/pages/8.11/Authorization.d.ts +44 -0
- package/dist/pages/8.11/Authorization.js +409 -0
- package/dist/pages/8.11/ClientCredentialsDetailsPage.d.ts +12 -0
- package/dist/pages/8.11/ClientCredentialsDetailsPage.js +36 -0
- package/dist/pages/8.11/ClusterDetailsPage.d.ts +107 -0
- package/dist/pages/8.11/ClusterDetailsPage.js +892 -0
- package/dist/pages/8.11/ClusterPage.d.ts +96 -0
- package/dist/pages/8.11/ClusterPage.js +657 -0
- package/dist/pages/8.11/ClusterSecretsPage.d.ts +48 -0
- package/dist/pages/8.11/ClusterSecretsPage.js +406 -0
- package/dist/pages/8.11/ConnectorMarketplacePage.d.ts +29 -0
- package/dist/pages/8.11/ConnectorMarketplacePage.js +156 -0
- package/dist/pages/8.11/ConnectorSettingsPage.d.ts +39 -0
- package/dist/pages/8.11/ConnectorSettingsPage.js +150 -0
- package/dist/pages/8.11/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/8.11/ConnectorTemplatePage.js +34 -0
- package/dist/pages/8.11/ConsoleOrganizationPage.d.ts +77 -0
- package/dist/pages/8.11/ConsoleOrganizationPage.js +457 -0
- package/dist/pages/8.11/DataFiltersPage.d.ts +30 -0
- package/dist/pages/8.11/DataFiltersPage.js +135 -0
- package/dist/pages/8.11/FormJsPage.d.ts +38 -0
- package/dist/pages/8.11/FormJsPage.js +283 -0
- package/dist/pages/8.11/HomePage.d.ts +29 -0
- package/dist/pages/8.11/HomePage.js +176 -0
- package/dist/pages/8.11/IdpCreatePage.d.ts +118 -0
- package/dist/pages/8.11/IdpCreatePage.js +514 -0
- package/dist/pages/8.11/LoginPage.d.ts +45 -0
- package/dist/pages/8.11/LoginPage.js +214 -0
- package/dist/pages/8.11/ModelerCreatePage.d.ts +256 -0
- package/dist/pages/8.11/ModelerCreatePage.js +2272 -0
- package/dist/pages/8.11/ModelerHomePage.d.ts +100 -0
- package/dist/pages/8.11/ModelerHomePage.js +1168 -0
- package/dist/pages/8.11/ModelerUserInvitePage.d.ts +29 -0
- package/dist/pages/8.11/ModelerUserInvitePage.js +136 -0
- package/dist/pages/8.11/OCIdentityAuthorizationsPage.d.ts +11 -0
- package/dist/pages/8.11/OCIdentityAuthorizationsPage.js +25 -0
- package/dist/pages/8.11/OCIdentityClusterVariablesPage.d.ts +21 -0
- package/dist/pages/8.11/OCIdentityClusterVariablesPage.js +128 -0
- package/dist/pages/8.11/OCIdentityGroupsPage.d.ts +38 -0
- package/dist/pages/8.11/OCIdentityGroupsPage.js +176 -0
- package/dist/pages/8.11/OCIdentityHomePage.d.ts +21 -0
- package/dist/pages/8.11/OCIdentityHomePage.js +111 -0
- package/dist/pages/8.11/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/8.11/OCIdentityMappingRulesPage.js +124 -0
- package/dist/pages/8.11/OCIdentityRolesPage.d.ts +43 -0
- package/dist/pages/8.11/OCIdentityRolesPage.js +236 -0
- package/dist/pages/8.11/OperateHomePage.d.ts +28 -0
- package/dist/pages/8.11/OperateHomePage.js +150 -0
- package/dist/pages/8.11/OperateProcessInstancePage.d.ts +43 -0
- package/dist/pages/8.11/OperateProcessInstancePage.js +893 -0
- package/dist/pages/8.11/OperateProcessesPage.d.ts +28 -0
- package/dist/pages/8.11/OperateProcessesPage.js +153 -0
- package/dist/pages/8.11/OptimizeCollectionsPage.d.ts +30 -0
- package/dist/pages/8.11/OptimizeCollectionsPage.js +175 -0
- package/dist/pages/8.11/OptimizeDashboardPage.d.ts +11 -0
- package/dist/pages/8.11/OptimizeDashboardPage.js +71 -0
- package/dist/pages/8.11/OptimizeHomePage.d.ts +17 -0
- package/dist/pages/8.11/OptimizeHomePage.js +171 -0
- package/dist/pages/8.11/OptimizeReportPage.d.ts +49 -0
- package/dist/pages/8.11/OptimizeReportPage.js +184 -0
- package/dist/pages/8.11/OptimizeSharePage.d.ts +16 -0
- package/dist/pages/8.11/OptimizeSharePage.js +100 -0
- package/dist/pages/8.11/PlayPage.d.ts +17 -0
- package/dist/pages/8.11/PlayPage.js +157 -0
- package/dist/pages/8.11/ProcessApplicationPage.d.ts +32 -0
- package/dist/pages/8.11/ProcessApplicationPage.js +496 -0
- package/dist/pages/8.11/SettingsPage.d.ts +10 -0
- package/dist/pages/8.11/SettingsPage.js +53 -0
- package/dist/pages/8.11/SignUpPage.d.ts +42 -0
- package/dist/pages/8.11/SignUpPage.js +134 -0
- package/dist/pages/8.11/TaskDetailsPage.d.ts +77 -0
- package/dist/pages/8.11/TaskDetailsPage.js +324 -0
- package/dist/pages/8.11/TaskPanelPage.d.ts +26 -0
- package/dist/pages/8.11/TaskPanelPage.js +245 -0
- package/dist/pages/8.11/TaskProcessesPage.d.ts +18 -0
- package/dist/pages/8.11/TaskProcessesPage.js +134 -0
- package/dist/pages/8.11/UtilitiesPage.d.ts +56 -0
- package/dist/pages/8.11/UtilitiesPage.js +1024 -0
- package/dist/pages/8.11/WorkspaceMembersPage.d.ts +21 -0
- package/dist/pages/8.11/WorkspaceMembersPage.js +268 -0
- package/dist/tests/8.11/access-user-role-management.spec.d.ts +1 -0
- package/dist/tests/8.11/access-user-role-management.spec.js +487 -0
- package/dist/tests/8.11/agentic-ai-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/agentic-ai-user-flows.spec.js +209 -0
- package/dist/tests/8.11/aws-cluster-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/aws-cluster-user-flows.spec.js +188 -0
- package/dist/tests/8.11/aws-connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/aws-connectors-user-flows.spec.js +167 -0
- package/dist/tests/8.11/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/8.11/cluster-variables.spec.js +202 -0
- package/dist/tests/8.11/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/connectors-user-flows.spec.js +537 -0
- package/dist/tests/8.11/console-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/console-user-flows.spec.js +199 -0
- package/dist/tests/8.11/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/hto-user-flows.spec.js +358 -0
- package/dist/tests/8.11/idp-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/idp-user-flows.spec.js +316 -0
- package/dist/tests/8.11/login-negative-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/login-negative-tests.spec.js +29 -0
- package/dist/tests/8.11/login.spec.d.ts +1 -0
- package/dist/tests/8.11/login.spec.js +29 -0
- package/dist/tests/8.11/navigation.spec.d.ts +1 -0
- package/dist/tests/8.11/navigation.spec.js +59 -0
- package/dist/tests/8.11/operate-access-flow.spec.d.ts +1 -0
- package/dist/tests/8.11/operate-access-flow.spec.js +136 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +96 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +69 -0
- package/dist/tests/8.11/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-api-tests.spec.js +1194 -0
- package/dist/tests/8.11/optimize-collections-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-collections-api.spec.js +184 -0
- package/dist/tests/8.11/optimize-collections-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-collections-ui.spec.js +46 -0
- package/dist/tests/8.11/optimize-data-filters-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-data-filters-api.spec.js +195 -0
- package/dist/tests/8.11/optimize-data-filters-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-data-filters-ui.spec.js +306 -0
- package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.js +316 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.js +337 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.js +198 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.js +146 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.js +208 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.js +151 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.js +242 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +75 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.js +123 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +151 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.js +123 -0
- package/dist/tests/8.11/play.spec.d.ts +1 -0
- package/dist/tests/8.11/play.spec.js +93 -0
- package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.js +495 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +133 -0
- package/dist/tests/8.11/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/smoke-tests.spec.js +339 -0
- package/dist/tests/8.11/test-setup.spec.d.ts +1 -0
- package/dist/tests/8.11/test-setup.spec.js +256 -0
- package/dist/tests/8.11/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/web-modeler-user-flows.spec.js +523 -0
- package/dist/utils/clusterVersions.d.ts +2 -1
- package/dist/utils/clusterVersions.js +1 -0
- package/dist/utils/consoleApiHelpers.js +1 -0
- package/package.json +1 -1
- package/playwright.config.ts +10 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
type AuditLogCategory = 'Administration' | 'Deployed resources' | 'User tasks';
|
|
3
|
+
declare class AuditLogPage {
|
|
4
|
+
readonly auditLogTab: Locator;
|
|
5
|
+
readonly updateButton: Locator;
|
|
6
|
+
readonly clientOperationsSection: Locator;
|
|
7
|
+
readonly clientCategoryCheckbox: (category: AuditLogCategory) => Locator;
|
|
8
|
+
readonly clientCategoryLabel: (category: AuditLogCategory) => Locator;
|
|
9
|
+
constructor(page: Page);
|
|
10
|
+
clickAuditLogTab(): Promise<void>;
|
|
11
|
+
private ensureChecked;
|
|
12
|
+
enableClientOperationLogging(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export { AuditLogPage };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuditLogPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
class AuditLogPage {
|
|
6
|
+
auditLogTab;
|
|
7
|
+
updateButton;
|
|
8
|
+
clientOperationsSection;
|
|
9
|
+
clientCategoryCheckbox;
|
|
10
|
+
clientCategoryLabel;
|
|
11
|
+
constructor(page) {
|
|
12
|
+
this.auditLogTab = page.getByRole('tab', { name: 'Audit log' });
|
|
13
|
+
const auditLogPanel = page.getByRole('tabpanel', { name: 'Audit log' });
|
|
14
|
+
this.updateButton = auditLogPanel.getByRole('button', {
|
|
15
|
+
name: 'Update',
|
|
16
|
+
exact: true,
|
|
17
|
+
});
|
|
18
|
+
// Scope to the Client block: the category labels also exist under the User section.
|
|
19
|
+
this.clientOperationsSection = auditLogPanel
|
|
20
|
+
.getByText('Client operations to log', { exact: true })
|
|
21
|
+
.locator('..');
|
|
22
|
+
this.clientCategoryCheckbox = (category) => this.clientOperationsSection.getByRole('checkbox', { name: category });
|
|
23
|
+
// Carbon hides the real <input>; toggle via the visible label.
|
|
24
|
+
this.clientCategoryLabel = (category) => this.clientOperationsSection.locator('label').filter({ hasText: category });
|
|
25
|
+
}
|
|
26
|
+
async clickAuditLogTab() {
|
|
27
|
+
await (0, test_1.expect)(this.auditLogTab).toBeVisible({ timeout: 60000 });
|
|
28
|
+
await this.auditLogTab.click({ timeout: 60000 });
|
|
29
|
+
}
|
|
30
|
+
// Returns true when the category was newly checked (form made dirty).
|
|
31
|
+
async ensureChecked(category) {
|
|
32
|
+
const checkbox = this.clientCategoryCheckbox(category);
|
|
33
|
+
await (0, test_1.expect)(checkbox).toBeAttached({ timeout: 30000 });
|
|
34
|
+
if (await checkbox.isChecked()) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
await this.clientCategoryLabel(category).click({ timeout: 30000 });
|
|
38
|
+
await (0, test_1.expect)(checkbox).toBeChecked();
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
// Not used by cluster setup: Console re-seeds this panel's checkbox state
|
|
42
|
+
// from the cluster on every background refresh, so selections made before
|
|
43
|
+
// "Update" is pressed can be dropped and only some categories get saved. Use
|
|
44
|
+
// ensureClientAuditLoggingViaApi (utils/consoleApiHelpers) to configure a
|
|
45
|
+
// cluster; drive this only when the UI itself is what is under test.
|
|
46
|
+
async enableClientOperationLogging() {
|
|
47
|
+
const categories = [
|
|
48
|
+
'Administration',
|
|
49
|
+
'Deployed resources',
|
|
50
|
+
'User tasks',
|
|
51
|
+
];
|
|
52
|
+
let changed = false;
|
|
53
|
+
for (const category of categories) {
|
|
54
|
+
if (await this.ensureChecked(category)) {
|
|
55
|
+
changed = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Only persist when a toggle actually dirtied the form. Wait for the Update
|
|
59
|
+
// button to enable rather than probing its state at a single instant —
|
|
60
|
+
// Carbon enables it a tick after the last checkbox re-renders, so a bare
|
|
61
|
+
// isEnabled() probe could skip the save and leave audit logging off.
|
|
62
|
+
if (changed) {
|
|
63
|
+
await (0, test_1.expect)(this.updateButton).toBeEnabled({ timeout: 60000 });
|
|
64
|
+
await this.updateButton.click({ timeout: 60000 });
|
|
65
|
+
await (0, test_1.expect)(this.updateButton).toBeDisabled({ timeout: 60000 });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.AuditLogPage = AuditLogPage;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class Authorization {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
protected readonly selectResourceTypeTab: (name: string) => Locator;
|
|
5
|
+
protected readonly resourceTypeFilterCombobox: Locator;
|
|
6
|
+
protected readonly createAuthorizationModal: Locator;
|
|
7
|
+
protected readonly createAuthorizationButton: Locator;
|
|
8
|
+
protected readonly createAuthorizationOwnerTypeCombobox: Locator;
|
|
9
|
+
protected readonly createAuthorizationOwnerTypeOption: (name: string) => Locator;
|
|
10
|
+
protected readonly createAuthorizationOwnerComboBox: Locator;
|
|
11
|
+
protected readonly createAuthorizationOwnerSearchInput: Locator;
|
|
12
|
+
protected readonly createAuthorizationOwnerSearchOption: (name: string) => Locator;
|
|
13
|
+
protected readonly createAuthorizationOwnerCommandInput: Locator;
|
|
14
|
+
protected readonly createAuthorizationOwnerCommandOptions: Locator;
|
|
15
|
+
protected readonly createAuthorizationOwnerOption: (name: string) => Locator;
|
|
16
|
+
protected readonly createAuthorizationResourceTypeDropdown: Locator;
|
|
17
|
+
protected readonly createAuthorizationResourceTypeOption: (name: string) => Locator;
|
|
18
|
+
protected readonly createAuthorizationResourceIdField: Locator;
|
|
19
|
+
protected readonly createAuthorizationAccessPermission: (name: string) => Locator;
|
|
20
|
+
protected readonly createAuthorizationSubmitButton: Locator;
|
|
21
|
+
protected readonly authorizationsList: Locator;
|
|
22
|
+
protected readonly deleteAuthorizationButton: (name: string) => Locator;
|
|
23
|
+
protected readonly deleteAuthorizationModal: Locator;
|
|
24
|
+
protected readonly deleteAuthorizationModalDeleteButton: Locator;
|
|
25
|
+
protected readonly tableFilter: Locator;
|
|
26
|
+
constructor(page: Page);
|
|
27
|
+
protected selectResourceType(resourceType: string, timeout?: number): Promise<void>;
|
|
28
|
+
assertAuthorization(auth: string): Promise<void>;
|
|
29
|
+
private selectAuthorizationOwner;
|
|
30
|
+
createAuthorization(authorization: {
|
|
31
|
+
ownerType: string;
|
|
32
|
+
ownerId: string;
|
|
33
|
+
resourceType: string;
|
|
34
|
+
resourceId: string;
|
|
35
|
+
accessPermissions: string[];
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
selectResourceTypeFromDialog(resourceType: string): Promise<void>;
|
|
38
|
+
private checkAccessPermission;
|
|
39
|
+
private authorizationRow;
|
|
40
|
+
private expectAuthorizationListed;
|
|
41
|
+
private filterAuthorizationsByOwner;
|
|
42
|
+
deleteAuthorization(resourceId: string, resourceType: string): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export { Authorization };
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Authorization = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
|
|
6
|
+
const findLocatorWithPagination_1 = require("../../utils/assertionHelpers/findLocatorWithPagination");
|
|
7
|
+
const submitModalWithRetry_1 = require("../../utils/assertionHelpers/submitModalWithRetry");
|
|
8
|
+
class Authorization {
|
|
9
|
+
page;
|
|
10
|
+
selectResourceTypeTab;
|
|
11
|
+
resourceTypeFilterCombobox;
|
|
12
|
+
createAuthorizationModal;
|
|
13
|
+
createAuthorizationButton;
|
|
14
|
+
createAuthorizationOwnerTypeCombobox;
|
|
15
|
+
createAuthorizationOwnerTypeOption;
|
|
16
|
+
createAuthorizationOwnerComboBox;
|
|
17
|
+
createAuthorizationOwnerSearchInput;
|
|
18
|
+
createAuthorizationOwnerSearchOption;
|
|
19
|
+
createAuthorizationOwnerCommandInput;
|
|
20
|
+
createAuthorizationOwnerCommandOptions;
|
|
21
|
+
createAuthorizationOwnerOption;
|
|
22
|
+
createAuthorizationResourceTypeDropdown;
|
|
23
|
+
createAuthorizationResourceTypeOption;
|
|
24
|
+
createAuthorizationResourceIdField;
|
|
25
|
+
createAuthorizationAccessPermission;
|
|
26
|
+
createAuthorizationSubmitButton;
|
|
27
|
+
authorizationsList;
|
|
28
|
+
deleteAuthorizationButton;
|
|
29
|
+
deleteAuthorizationModal;
|
|
30
|
+
deleteAuthorizationModalDeleteButton;
|
|
31
|
+
tableFilter;
|
|
32
|
+
constructor(page) {
|
|
33
|
+
this.page = page;
|
|
34
|
+
this.selectResourceTypeTab = (resourceType) => page.getByRole('tab', { name: resourceType });
|
|
35
|
+
// The Admin's Authorizations page moved onto the new design-system shell,
|
|
36
|
+
// which replaces the per-resource-type Carbon tabs with a single filter
|
|
37
|
+
// combobox in a left "Filter" card (identity/client ListV2.tsx). The
|
|
38
|
+
// combobox's accessible name was renamed from "Authorization type" to
|
|
39
|
+
// "Resource type" in camunda/camunda commit 377b0e3; match either so both
|
|
40
|
+
// image versions resolve.
|
|
41
|
+
this.resourceTypeFilterCombobox = page
|
|
42
|
+
.getByRole('combobox', { name: 'Resource type' })
|
|
43
|
+
.or(page.getByRole('combobox', { name: 'Authorization type' }))
|
|
44
|
+
.first();
|
|
45
|
+
this.authorizationsList = page.getByRole('table');
|
|
46
|
+
this.createAuthorizationButton = page.getByRole('button', {
|
|
47
|
+
name: /create authorization/i,
|
|
48
|
+
});
|
|
49
|
+
this.createAuthorizationModal = page.getByRole('dialog', {
|
|
50
|
+
name: 'Create authorization',
|
|
51
|
+
});
|
|
52
|
+
this.createAuthorizationOwnerTypeCombobox =
|
|
53
|
+
this.createAuthorizationModal.getByRole('combobox', {
|
|
54
|
+
name: 'Owner type',
|
|
55
|
+
});
|
|
56
|
+
// The design-system Select portals its listbox to the end of <body>, so
|
|
57
|
+
// the options are siblings of the dialog rather than descendants, and
|
|
58
|
+
// while the listbox is open Radix marks everything outside it aria-hidden
|
|
59
|
+
// — which takes the dialog itself out of the accessibility tree. Query the
|
|
60
|
+
// options from the page root so both placements resolve.
|
|
61
|
+
this.createAuthorizationOwnerTypeOption = (name) => this.page
|
|
62
|
+
.getByRole('option', {
|
|
63
|
+
name,
|
|
64
|
+
exact: true,
|
|
65
|
+
})
|
|
66
|
+
.first();
|
|
67
|
+
// On the design-system build the closed Owner control is a combobox-role
|
|
68
|
+
// trigger rendered by EntitySearchSingleSelect. Its <Label htmlFor> does
|
|
69
|
+
// not always name the focusable trigger, so the product team's own suite
|
|
70
|
+
// identifies it by the placeholder it paints as static text instead
|
|
71
|
+
// (camunda/camunda qa/c8-orchestration-cluster-e2e-test-suite/pages/
|
|
72
|
+
// IdentityAuthorizationsPage.ts). Match either, and keep `exact` on the
|
|
73
|
+
// label form so it cannot collide with "Owner type".
|
|
74
|
+
this.createAuthorizationOwnerComboBox = this.createAuthorizationModal
|
|
75
|
+
.getByRole('combobox', {
|
|
76
|
+
name: 'Owner',
|
|
77
|
+
exact: true,
|
|
78
|
+
})
|
|
79
|
+
.or(this.createAuthorizationModal
|
|
80
|
+
.getByRole('combobox')
|
|
81
|
+
.filter({ hasText: 'Search by owner ID' }))
|
|
82
|
+
.first();
|
|
83
|
+
this.createAuthorizationOwnerOption = (name) => this.createAuthorizationModal.getByRole('option', {
|
|
84
|
+
name,
|
|
85
|
+
exact: true,
|
|
86
|
+
});
|
|
87
|
+
// Every owner type now renders a server-backed search dropdown instead of
|
|
88
|
+
// the combobox that listed all owners up front. On the entity-search build
|
|
89
|
+
// that dropdown is a Carbon Search inside a ListBox, so it has no combobox
|
|
90
|
+
// role and its results are list-box menu items. The design-system build
|
|
91
|
+
// renders the same field as a cmdk command palette whose results are
|
|
92
|
+
// role=option items in a popover portalled out of the dialog.
|
|
93
|
+
this.createAuthorizationOwnerSearchInput =
|
|
94
|
+
this.createAuthorizationModal.getByPlaceholder('Search by owner ID');
|
|
95
|
+
this.createAuthorizationOwnerSearchOption = (name) => this.page.getByRole('option').filter({ hasText: name }).first();
|
|
96
|
+
// In the design-system build the closed Owner control is a combobox-role
|
|
97
|
+
// trigger that paints "Search by owner ID" as static text (no placeholder
|
|
98
|
+
// attribute), and the cmdk search box plus its result listbox only mount
|
|
99
|
+
// in a popover once the trigger is opened. That popover is portalled out
|
|
100
|
+
// of the dialog, and while it is open Radix marks the dialog aria-hidden,
|
|
101
|
+
// so both must be queried from the page root.
|
|
102
|
+
this.createAuthorizationOwnerCommandInput = this.page
|
|
103
|
+
.locator('[data-slot="command-input"]')
|
|
104
|
+
.first();
|
|
105
|
+
this.createAuthorizationOwnerCommandOptions = this.page
|
|
106
|
+
.getByRole('listbox')
|
|
107
|
+
.getByRole('option');
|
|
108
|
+
this.createAuthorizationResourceTypeDropdown =
|
|
109
|
+
this.createAuthorizationModal.getByRole('combobox', {
|
|
110
|
+
name: 'Resource type',
|
|
111
|
+
});
|
|
112
|
+
this.createAuthorizationResourceTypeOption = (name) => this.page
|
|
113
|
+
.getByRole('option', {
|
|
114
|
+
name,
|
|
115
|
+
exact: true,
|
|
116
|
+
})
|
|
117
|
+
.first();
|
|
118
|
+
this.createAuthorizationResourceIdField =
|
|
119
|
+
this.createAuthorizationModal.getByRole('textbox', {
|
|
120
|
+
name: 'Resource ID',
|
|
121
|
+
});
|
|
122
|
+
// Carbon wired its checkbox input and label together the same way the
|
|
123
|
+
// design-system Checkbox does (`id={permission}` / `htmlFor={permission}`),
|
|
124
|
+
// and on both builds the input itself is not the click target — the label
|
|
125
|
+
// is.
|
|
126
|
+
this.createAuthorizationAccessPermission = (name) => this.createAuthorizationModal.locator(`label[for="${name}"]`);
|
|
127
|
+
this.createAuthorizationSubmitButton =
|
|
128
|
+
this.createAuthorizationModal.getByRole('button', {
|
|
129
|
+
name: 'Create authorization',
|
|
130
|
+
});
|
|
131
|
+
this.deleteAuthorizationButton = (name) => this.authorizationsList
|
|
132
|
+
.getByRole('row', { name })
|
|
133
|
+
.getByRole('button', { name: /^delete/i });
|
|
134
|
+
this.deleteAuthorizationModal = page.getByRole('dialog', {
|
|
135
|
+
name: /delete authorization/i,
|
|
136
|
+
});
|
|
137
|
+
this.deleteAuthorizationModalDeleteButton =
|
|
138
|
+
this.deleteAuthorizationModal.getByRole('button', {
|
|
139
|
+
name: /delete authorization/i,
|
|
140
|
+
});
|
|
141
|
+
// Carbon labelled the table toolbar search "Filter table"; the
|
|
142
|
+
// design-system EntityList exposes the placeholder as the accessible name
|
|
143
|
+
// instead. Match either.
|
|
144
|
+
this.tableFilter = page
|
|
145
|
+
.getByRole('searchbox', { name: 'Filter table' })
|
|
146
|
+
.or(page.getByRole('searchbox', { name: 'Search by owner ID' }))
|
|
147
|
+
.first();
|
|
148
|
+
}
|
|
149
|
+
// Select the resource type through whichever control this build renders:
|
|
150
|
+
// click the Carbon tab, or open the design-system filter combobox and pick
|
|
151
|
+
// the option.
|
|
152
|
+
async selectResourceType(resourceType, timeout = 60000) {
|
|
153
|
+
const tab = this.selectResourceTypeTab(resourceType);
|
|
154
|
+
await (0, test_1.expect)(tab.or(this.resourceTypeFilterCombobox)).toBeVisible({
|
|
155
|
+
timeout,
|
|
156
|
+
});
|
|
157
|
+
if (await tab.isVisible()) {
|
|
158
|
+
await tab.click();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
await this.resourceTypeFilterCombobox.click();
|
|
162
|
+
await this.page
|
|
163
|
+
.getByRole('option', { name: resourceType, exact: true })
|
|
164
|
+
.click({ timeout: Math.min(timeout, 30000) });
|
|
165
|
+
}
|
|
166
|
+
// The authorizations table paginates, and the RBA clusters these flows run
|
|
167
|
+
// against are long-lived: every night's run leaves more process-definition
|
|
168
|
+
// authorizations behind, so the row being asserted is regularly not on the
|
|
169
|
+
// page currently displayed. Scoping the assertion to the rendered rows then
|
|
170
|
+
// reports a row that exists as missing. Walk the pages -- the assertion is
|
|
171
|
+
// unchanged, it is only no longer limited to the first page, and the helper
|
|
172
|
+
// reloads between attempts so a row the product has not finished
|
|
173
|
+
// provisioning yet is still given time to appear.
|
|
174
|
+
async assertAuthorization(auth) {
|
|
175
|
+
await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, this.authorizationsList.getByRole('row').filter({ hasText: auth }).first());
|
|
176
|
+
}
|
|
177
|
+
// Released 8.10 alpha images still render the Carbon combobox that lists
|
|
178
|
+
// every owner, so accept whichever of the three owner fields this build
|
|
179
|
+
// shows: the Carbon search dropdown, the Carbon combobox that lists every
|
|
180
|
+
// owner inline, or the design-system combobox whose cmdk popover only loads
|
|
181
|
+
// results once the owner ID is typed.
|
|
182
|
+
async selectAuthorizationOwner(ownerId) {
|
|
183
|
+
await (0, test_1.expect)(this.createAuthorizationOwnerSearchInput.or(this.createAuthorizationOwnerComboBox)).toBeVisible({ timeout: 60000 });
|
|
184
|
+
if (await this.createAuthorizationOwnerSearchInput.isVisible()) {
|
|
185
|
+
await this.createAuthorizationOwnerSearchInput.fill(ownerId);
|
|
186
|
+
const ownerOption = this.createAuthorizationOwnerSearchOption(ownerId);
|
|
187
|
+
// The search is debounced and served by the API, so a just-created
|
|
188
|
+
// owner can take a while to surface.
|
|
189
|
+
await (0, test_1.expect)(ownerOption).toBeVisible({ timeout: 60000 });
|
|
190
|
+
await ownerOption.click({ timeout: 30000 });
|
|
191
|
+
// Picking an owner replaces the search input with a tag holding the
|
|
192
|
+
// selection, which is how we know the choice was committed.
|
|
193
|
+
await (0, test_1.expect)(this.createAuthorizationOwnerSearchInput).toBeHidden({
|
|
194
|
+
timeout: 30000,
|
|
195
|
+
});
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
await this.createAuthorizationOwnerComboBox.click();
|
|
199
|
+
const commandInput = this.createAuthorizationOwnerCommandInput;
|
|
200
|
+
const inlineOwnerOption = this.createAuthorizationOwnerOption(ownerId);
|
|
201
|
+
await (0, test_1.expect)(commandInput.or(inlineOwnerOption).first()).toBeVisible({
|
|
202
|
+
timeout: 30000,
|
|
203
|
+
});
|
|
204
|
+
if (await commandInput.isVisible()) {
|
|
205
|
+
await commandInput.fill(ownerId);
|
|
206
|
+
// The result list is served by the API and debounced, and each option is
|
|
207
|
+
// labelled "<owner id> — <name>" rather than the bare ID
|
|
208
|
+
// (identity/client RoleSelection.tsx `itemLabel`), so narrow the search
|
|
209
|
+
// to the single row this unique owner ID resolves to instead of matching
|
|
210
|
+
// on the label text.
|
|
211
|
+
const ownerOptions = this.createAuthorizationOwnerCommandOptions;
|
|
212
|
+
await (0, test_1.expect)(ownerOptions).toHaveCount(1, { timeout: 60000 });
|
|
213
|
+
await ownerOptions.first().click({ timeout: 30000, force: true });
|
|
214
|
+
// Committing the choice closes the popover, which is what hands the
|
|
215
|
+
// dialog back to the accessibility tree for the fields that follow.
|
|
216
|
+
await (0, test_1.expect)(commandInput).toBeHidden({ timeout: 30000 });
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
await (0, test_1.expect)(inlineOwnerOption).toBeVisible({ timeout: 30000 });
|
|
220
|
+
await inlineOwnerOption.click({ timeout: 30000 });
|
|
221
|
+
}
|
|
222
|
+
async createAuthorization(authorization) {
|
|
223
|
+
await this.createAuthorizationButton.click();
|
|
224
|
+
await (0, test_1.expect)(this.createAuthorizationModal).toBeVisible();
|
|
225
|
+
await this.createAuthorizationOwnerTypeCombobox.click();
|
|
226
|
+
await this.createAuthorizationOwnerTypeOption(authorization.ownerType).click();
|
|
227
|
+
await this.selectAuthorizationOwner(authorization.ownerId);
|
|
228
|
+
await this.selectResourceTypeFromDialog(authorization.resourceType);
|
|
229
|
+
await this.createAuthorizationResourceIdField.fill(authorization.resourceId);
|
|
230
|
+
for (const permission of authorization.accessPermissions) {
|
|
231
|
+
await this.checkAccessPermission(permission);
|
|
232
|
+
}
|
|
233
|
+
await (0, submitModalWithRetry_1.submitModalWithRetry)(this.createAuthorizationSubmitButton, this.createAuthorizationModal);
|
|
234
|
+
await this.selectResourceType(authorization.resourceType);
|
|
235
|
+
await this.expectAuthorizationListed(authorization, this.authorizationRow(authorization));
|
|
236
|
+
}
|
|
237
|
+
// The Resource type field is pre-selected from the list's current resource
|
|
238
|
+
// type and rendered `disabled` on the design-system build
|
|
239
|
+
// (identity/client/src/pages/authorizations/modalsV2/add-modal/AddModal.tsx
|
|
240
|
+
// passes a literal `disabled`), so there is nothing to pick. Only open the
|
|
241
|
+
// dropdown when the field is still editable.
|
|
242
|
+
async selectResourceTypeFromDialog(resourceType) {
|
|
243
|
+
await (0, test_1.expect)(this.createAuthorizationResourceTypeDropdown).toBeVisible({
|
|
244
|
+
timeout: 30000,
|
|
245
|
+
});
|
|
246
|
+
if (!(await this.createAuthorizationResourceTypeDropdown.isEnabled())) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
await this.createAuthorizationResourceTypeDropdown.click();
|
|
250
|
+
await this.createAuthorizationResourceTypeOption(resourceType).click({
|
|
251
|
+
timeout: 30000,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
// The permission control is a label + hidden input pair on both builds, so
|
|
255
|
+
// the label is the click target while the input carries the checked state.
|
|
256
|
+
// The design-system Checkbox re-renders on every toggle, which can swallow a
|
|
257
|
+
// click that lands mid-render, so confirm the state and re-click if needed.
|
|
258
|
+
async checkAccessPermission(permission) {
|
|
259
|
+
const permissionLabel = this.createAuthorizationAccessPermission(permission);
|
|
260
|
+
const permissionInput = this.createAuthorizationModal.locator(`input[id="${permission}"], [role="checkbox"][id="${permission}"]`);
|
|
261
|
+
await (0, test_1.expect)(permissionLabel).toBeVisible({ timeout: 30000 });
|
|
262
|
+
await permissionLabel.scrollIntoViewIfNeeded();
|
|
263
|
+
const maxAttempts = 3;
|
|
264
|
+
for (let attempt = 1; attempt < maxAttempts; attempt++) {
|
|
265
|
+
if (await permissionInput.isChecked()) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
await permissionLabel.click({ force: true });
|
|
269
|
+
try {
|
|
270
|
+
await (0, test_1.expect)(permissionInput).toBeChecked({ timeout: 5000 });
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
catch {
|
|
274
|
+
// A click that landed mid-rerender is dropped: try again. The
|
|
275
|
+
// assertion after the loop is the one that reports a permission that
|
|
276
|
+
// never took.
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (!(await permissionInput.isChecked())) {
|
|
280
|
+
await permissionLabel.click({ force: true });
|
|
281
|
+
}
|
|
282
|
+
await (0, test_1.expect)(permissionInput).toBeChecked({ timeout: 10000 });
|
|
283
|
+
}
|
|
284
|
+
// The authorizations list caps every cell at 25 characters
|
|
285
|
+
// (`maxDisplayCellLength={25}` in camunda/camunda
|
|
286
|
+
// identity/client/src/pages/authorizations/AuthorizationsListV2.tsx), and on
|
|
287
|
+
// the design-system build `truncateCell` renders an over-long value as
|
|
288
|
+
// `<button aria-label="<full value>">{first 25 chars}…</button>` with the
|
|
289
|
+
// tooltip carrying the rest portalled out of the row. An owner ID longer
|
|
290
|
+
// than 25 characters - the RBA specs' 33-character
|
|
291
|
+
// `rbaSelectedProcessesPermission<xxx>` roles - is therefore absent from the
|
|
292
|
+
// row's text, so filtering rows on `<ownerId><resourceId>` cannot match it
|
|
293
|
+
// however long we wait. The full value survives in the cell's accessible
|
|
294
|
+
// name, so also accept a row that HAS a cell named exactly the owner ID.
|
|
295
|
+
// Carbon truncates at 25 as well, but renders its tooltip inline, which
|
|
296
|
+
// keeps the full value in the row's text - the `hasText` branch covers that
|
|
297
|
+
// build, and short owner IDs resolve on both.
|
|
298
|
+
authorizationRow(authorization) {
|
|
299
|
+
const rows = this.page.getByRole('row');
|
|
300
|
+
return rows
|
|
301
|
+
.filter({ hasText: `${authorization.ownerId}${authorization.resourceId}` })
|
|
302
|
+
.or(rows
|
|
303
|
+
.filter({
|
|
304
|
+
has: this.page.getByRole('cell', {
|
|
305
|
+
name: authorization.ownerId,
|
|
306
|
+
exact: true,
|
|
307
|
+
}),
|
|
308
|
+
})
|
|
309
|
+
.filter({ hasText: authorization.resourceId }))
|
|
310
|
+
.first();
|
|
311
|
+
}
|
|
312
|
+
// The toolbar search filters by owner ID, so filling it with the resource
|
|
313
|
+
// type narrows nothing, and the retry helper it fed reloads before it
|
|
314
|
+
// asserts, which dropped the filter entirely. That left the new row to be
|
|
315
|
+
// found on page 1 of the unfiltered table - and the authorizations table
|
|
316
|
+
// paginates, so with the RBA specs creating owners in parallel it is
|
|
317
|
+
// regularly on a later page. Filter by owner, then page through what is
|
|
318
|
+
// left; fall back to the unfiltered table for builds whose search has not
|
|
319
|
+
// caught up with a just-created owner yet.
|
|
320
|
+
async expectAuthorizationListed(authorization, item) {
|
|
321
|
+
const deadline = Date.now() + 180000;
|
|
322
|
+
const budget = (max) => Math.max(5000, Math.min(max, deadline - Date.now()));
|
|
323
|
+
const maxAttempts = 5;
|
|
324
|
+
let lastError;
|
|
325
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
326
|
+
if (attempt > 0 && Date.now() >= deadline) {
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
try {
|
|
330
|
+
await this.selectResourceType(authorization.resourceType, budget(30000));
|
|
331
|
+
for (const filterValue of [authorization.ownerId, '']) {
|
|
332
|
+
await this.filterAuthorizationsByOwner(filterValue);
|
|
333
|
+
const found = await (0, findLocatorWithPagination_1.findLocatorWithPagination)(this.page, item, {
|
|
334
|
+
timeout: budget(filterValue === '' ? 45000 : 15000),
|
|
335
|
+
});
|
|
336
|
+
if (found) {
|
|
337
|
+
await (0, test_1.expect)(item).toBeVisible({ timeout: 5000 });
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
throw new Error(`No row for owner "${authorization.ownerId}" and resource ` +
|
|
342
|
+
`"${authorization.resourceId}" in the ` +
|
|
343
|
+
`${authorization.resourceType} table`);
|
|
344
|
+
}
|
|
345
|
+
catch (error) {
|
|
346
|
+
lastError = error;
|
|
347
|
+
if (attempt < maxAttempts - 1) {
|
|
348
|
+
console.warn(`Attempt ${attempt + 1} did not list the ` +
|
|
349
|
+
`${authorization.resourceType} authorization for ` +
|
|
350
|
+
`"${authorization.ownerId}". Retrying...`);
|
|
351
|
+
await this.page.reload();
|
|
352
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
throw new Error(`Authorization for "${authorization.ownerId}" on ` +
|
|
357
|
+
`"${authorization.resourceId}" was not listed: ${String(lastError)}`);
|
|
358
|
+
}
|
|
359
|
+
async filterAuthorizationsByOwner(ownerId) {
|
|
360
|
+
const hasFilter = await this.tableFilter
|
|
361
|
+
.isVisible({ timeout: 5000 })
|
|
362
|
+
.catch(() => false);
|
|
363
|
+
if (!hasFilter) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
await this.tableFilter.fill(ownerId);
|
|
367
|
+
// The search is debounced and served by the API; the paginated lookup this
|
|
368
|
+
// feeds waits for the row itself, so there is nothing to wait on here
|
|
369
|
+
// beyond the value having landed in the box.
|
|
370
|
+
await (0, test_1.expect)(this.tableFilter).toHaveValue(ownerId);
|
|
371
|
+
}
|
|
372
|
+
async deleteAuthorization(resourceId, resourceType) {
|
|
373
|
+
// Same paginated table as createAuthorization: the row being deleted is
|
|
374
|
+
// not necessarily on page 1, and the toolbar search cannot narrow by
|
|
375
|
+
// resource ID.
|
|
376
|
+
const found = await (0, findLocatorWithPagination_1.findLocatorWithPagination)(this.page, this.deleteAuthorizationButton(resourceId), { timeout: 60000 });
|
|
377
|
+
if (!found) {
|
|
378
|
+
throw new Error(`No ${resourceType} authorization row for resource "${resourceId}"`);
|
|
379
|
+
}
|
|
380
|
+
await this.deleteAuthorizationButton(resourceId).click();
|
|
381
|
+
await (0, test_1.expect)(this.deleteAuthorizationModal).toBeVisible();
|
|
382
|
+
await this.deleteAuthorizationModalDeleteButton.click();
|
|
383
|
+
await (0, test_1.expect)(this.deleteAuthorizationModal).not.toBeVisible();
|
|
384
|
+
// Re-selecting the resource type takes two interactions on the
|
|
385
|
+
// design-system build, so this cannot go through the shared
|
|
386
|
+
// reload-click-assert helper, which only accepts a single click locator.
|
|
387
|
+
const deletedCell = this.authorizationsList
|
|
388
|
+
.getByRole('cell', { name: resourceId })
|
|
389
|
+
.first();
|
|
390
|
+
let lastError;
|
|
391
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
392
|
+
await this.page.reload();
|
|
393
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
394
|
+
await this.selectResourceType(resourceType);
|
|
395
|
+
try {
|
|
396
|
+
await (0, test_1.expect)(deletedCell).not.toBeVisible({ timeout: 5000 });
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
catch (error) {
|
|
400
|
+
lastError = error;
|
|
401
|
+
console.warn(`Attempt ${attempt + 1} still listed the ${resourceType} ` +
|
|
402
|
+
`authorization for "${resourceId}". Retrying...`);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
throw new Error(`Authorization for resource "${resourceId}" is still listed: ` +
|
|
406
|
+
String(lastError));
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
exports.Authorization = Authorization;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
declare class ClientCredentialsDetailsPage {
|
|
3
|
+
private page;
|
|
4
|
+
readonly operateUrlRow: Locator;
|
|
5
|
+
readonly operateUrlValue: Locator;
|
|
6
|
+
readonly clientNameHeading: (clientName: string) => Locator;
|
|
7
|
+
constructor(page: Page);
|
|
8
|
+
isOpen(clientName: string): Promise<void>;
|
|
9
|
+
getOperateUrl(): Promise<string>;
|
|
10
|
+
goBack(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export { ClientCredentialsDetailsPage };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientCredentialsDetailsPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
5
|
+
class ClientCredentialsDetailsPage {
|
|
6
|
+
page;
|
|
7
|
+
operateUrlRow;
|
|
8
|
+
operateUrlValue;
|
|
9
|
+
clientNameHeading;
|
|
10
|
+
constructor(page) {
|
|
11
|
+
this.page = page;
|
|
12
|
+
this.operateUrlRow = page.getByRole('cell', { name: 'Operate URL' });
|
|
13
|
+
this.operateUrlValue = this.operateUrlRow.getByRole('textbox');
|
|
14
|
+
this.clientNameHeading = (clientName) => page.getByRole('heading', { name: clientName });
|
|
15
|
+
}
|
|
16
|
+
async isOpen(clientName) {
|
|
17
|
+
await (0, test_1.expect)(this.clientNameHeading(clientName)).toBeVisible({
|
|
18
|
+
timeout: 60000,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async getOperateUrl() {
|
|
22
|
+
if (await this.operateUrlValue.isVisible({ timeout: 10000 }).catch(() => false)) {
|
|
23
|
+
return await this.operateUrlValue.inputValue();
|
|
24
|
+
}
|
|
25
|
+
const text = await this.page.innerText('body');
|
|
26
|
+
const match = text.match(/Operate URL\s*([\w:/.-]+\/?)/i);
|
|
27
|
+
if (!match || !match[1]) {
|
|
28
|
+
throw new Error('Operate URL not found in client credentials page');
|
|
29
|
+
}
|
|
30
|
+
return match[1];
|
|
31
|
+
}
|
|
32
|
+
async goBack() {
|
|
33
|
+
await this.page.goBack();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ClientCredentialsDetailsPage = ClientCredentialsDetailsPage;
|