Skip to content

Commit d8fa2b1

Browse files
committed
test(FR-2504): add E2E tests for RBAC role management
1 parent 26990f9 commit d8fa2b1

5 files changed

Lines changed: 1710 additions & 3 deletions

File tree

e2e/E2E_COVERAGE_REPORT.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
**Scope:** Coverage metrics apply only to the routes listed below and do **not** include all entries from `react/src/routes.tsx`. Routes such as `/admin-dashboard` (not yet exposed in menu) and `/ai-agent` (experimental) are currently out of scope.
1414

15-
**Overall (in-scope routes): 240 / 386 features covered (62%)**
15+
**Overall (in-scope routes): 261 / 408 features covered (64%)**
1616

1717
| Page | Route | Features | Covered | Status |
1818
|------|-------|:--------:|:-------:|:------:|
@@ -46,7 +46,8 @@
4646
| App Launcher | (modal) | 18 | 10 | 🔶 56% |
4747
| Chat | `/chat/:id?` | 6 | 6 | ✅ 100% |
4848
| Plugin System | (config-based) | 12 | 12 | ✅ 100% |
49-
| **Total** | | **386** | **240** | **62%** |
49+
| RBAC Management | `/rbac` | 22 | 21 | 🔶 95% |
50+
| **Total** | | **408** | **261** | **64%** |
5051

5152
---
5253

@@ -963,6 +964,39 @@
963964

964965
---
965966

967+
### 28. RBAC Management (`/rbac`)
968+
969+
**Test files:** [`e2e/rbac/rbac-role-list.spec.ts`](rbac/rbac-role-list.spec.ts), [`e2e/rbac/rbac-role-crud.spec.ts`](rbac/rbac-role-crud.spec.ts), [`e2e/rbac/rbac-role-detail.spec.ts`](rbac/rbac-role-detail.spec.ts)
970+
971+
| Feature | Status | Test |
972+
|---------|--------|------|
973+
| Display RBAC management page with role list table || `Superadmin can view the RBAC management page with role list table` |
974+
| Switch between Active/Inactive role filters || `Superadmin can switch to Inactive roles filter and back to Active` |
975+
| Search for a role by name using property filter || `Superadmin can search for a role by name using the property filter` |
976+
| Filter roles by Source (SYSTEM or CUSTOM) | 🚧 | `Superadmin can filter roles by Source (SYSTEM or CUSTOM)` |
977+
| Empty state when no roles match search || `Superadmin sees empty state message when no roles match the search` |
978+
| Sort role list by Role Name column || `Superadmin can sort role list by Role Name column` |
979+
| Refresh role list using refresh button || `Superadmin can refresh the role list using the refresh button` |
980+
| Create a new custom role with name and description || `Superadmin can create a new custom role with name and description` |
981+
| Edit a custom role name and description via drawer || `Superadmin can edit a custom role name and description via drawer` |
982+
| System role edit button absent || `Superadmin cannot edit a system role name or description (edit button absent)` |
983+
| Deactivate (soft-delete) an active custom role || `Superadmin can delete (soft-delete) an active custom role` |
984+
| Activate (restore) a soft-deleted role || `Superadmin can activate (restore) a soft-deleted role` |
985+
| Purge (hard-delete) a soft-deleted role || `Superadmin can purge (hard-delete) a soft-deleted role` |
986+
| Open role detail drawer by clicking role name || `Superadmin can open the role detail drawer by clicking a role name` |
987+
| Drawer shows Role Assignments and Permissions tabs || `Drawer shows "Role Assignments" and "Permissions" tabs` |
988+
| Close role detail drawer || `Superadmin can close the role detail drawer` |
989+
| Add a permission to a role || `Superadmin can add a permission to a role` |
990+
| Delete a permission from a role || `Superadmin can delete a permission from a role` |
991+
| Empty state in Permissions tab || `Superadmin sees empty state in Permissions tab when role has no permissions` |
992+
| Assign a user to a role || `Superadmin can assign a user to a role` |
993+
| Revoke a user from a role || `Superadmin can revoke a single user from a role` |
994+
| Empty state in Role Assignments tab || `Superadmin sees empty state in Role Assignments tab when role has no users` |
995+
996+
**Coverage: 🔶 21/22 features**
997+
998+
---
999+
9661000
## Visual Regression Tests
9671001

9681002
Visual regression tests exist for most pages but only capture screenshots, not functional behavior.

0 commit comments

Comments
 (0)