@camunda/e2e-test-suite 0.0.665 → 0.0.666
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.
|
@@ -68,24 +68,46 @@ class IdentityHomePage {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
async assignPermissionToOperateAPI() {
|
|
71
|
+
// The Operate API now exposes its permission scopes as `read` / `write`
|
|
72
|
+
// (plus `read:users`) rather than the wildcard `read:*` / `write:*` the
|
|
73
|
+
// shared writePermissionCell/readPermissionCheckBox locators target — those
|
|
74
|
+
// wildcards still exist for the Tasklist API, so they stay untouched here.
|
|
75
|
+
// The dialog renders Carbon checkboxes labelled e.g. "write (Write
|
|
76
|
+
// permission)", and the assigned-permissions table renders the raw scope
|
|
77
|
+
// name (`read` / `write`) in a cell.
|
|
78
|
+
const operateWritePermissionCell = this.page.getByRole('cell', {
|
|
79
|
+
name: 'write',
|
|
80
|
+
exact: true,
|
|
81
|
+
});
|
|
82
|
+
const operateReadPermissionCell = this.page.getByRole('cell', {
|
|
83
|
+
name: 'read',
|
|
84
|
+
exact: true,
|
|
85
|
+
});
|
|
86
|
+
const operateWriteCheckBox = this.page.getByRole('checkbox', {
|
|
87
|
+
name: 'write (Write permission)',
|
|
88
|
+
});
|
|
89
|
+
const operateReadCheckBox = this.page.getByRole('checkbox', {
|
|
90
|
+
name: 'read (Read permission)',
|
|
91
|
+
exact: true,
|
|
92
|
+
});
|
|
71
93
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.operateCell);
|
|
72
94
|
await this.operateCell.click();
|
|
73
95
|
await this.accessToAPIsTab.click();
|
|
74
96
|
await (0, sleep_1.sleep)(2000);
|
|
75
|
-
if ((await
|
|
76
|
-
(await
|
|
97
|
+
if ((await operateWritePermissionCell.isVisible()) &&
|
|
98
|
+
(await operateReadPermissionCell.isVisible())) {
|
|
77
99
|
console.log('Permissions already assigned to Operate API');
|
|
78
100
|
}
|
|
79
101
|
else {
|
|
80
102
|
await this.assignPermissionsButton.click();
|
|
81
103
|
await this.selectOptionFromDropdown('Operate API');
|
|
82
104
|
await (0, test_1.expect)(this.dialog).toBeVisible();
|
|
83
|
-
await
|
|
84
|
-
await
|
|
85
|
-
await
|
|
105
|
+
await operateWriteCheckBox.waitFor({ state: 'visible' });
|
|
106
|
+
await operateWriteCheckBox.click();
|
|
107
|
+
await operateReadCheckBox.click();
|
|
86
108
|
await this.addButton.click();
|
|
87
|
-
await (0, test_1.expect)(
|
|
88
|
-
await (0, test_1.expect)(
|
|
109
|
+
await (0, test_1.expect)(operateWritePermissionCell).toBeVisible();
|
|
110
|
+
await (0, test_1.expect)(operateReadPermissionCell).toBeVisible();
|
|
89
111
|
await (0, sleep_1.sleep)(5000);
|
|
90
112
|
}
|
|
91
113
|
}
|