Skip to content

e2e(FR-2504): add E2E tests for RBAC role management#6531

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management
Apr 22, 2026
Merged

e2e(FR-2504): add E2E tests for RBAC role management#6531
graphite-app[bot] merged 1 commit intomainfrom
04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented Apr 9, 2026

Resolves #6530 (FR-2504)

Summary

  • Add E2E tests for RBAC role CRUD lifecycle (create, edit, rename, deactivate, delete)
  • Add E2E tests for RBAC role list view (table rendering, filtering, sorting, pagination)
  • Add E2E tests for RBAC role detail drawer (permissions management, user assignments, edge cases)

Test plan

  • Run npx playwright test e2e/rbac/ against a Backend.AI cluster with RBAC enabled
  • Verify all 3 spec files pass: rbac-role-crud, rbac-role-list, rbac-role-detail

@github-actions github-actions Bot added the size:XL 500~ LoC label Apr 9, 2026
Copy link
Copy Markdown
Contributor Author

ironAiken2 commented Apr 9, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ironAiken2 ironAiken2 marked this pull request as ready for review April 9, 2026 07:39
Copilot AI review requested due to automatic review settings April 9, 2026 07:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Playwright E2E coverage for the RBAC Role Management UI (/rbac) in Backend.AI WebUI, focusing on role list interactions, role lifecycle operations, and role detail drawer actions.

Changes:

  • Added role list-view E2E tests (table render, status toggling, search, sort, refresh).
  • Added role CRUD E2E tests (create, edit, deactivate/activate, purge; with a WIP duplicate-name case).
  • Added role detail-drawer E2E tests (open/close, permissions management, user assignments).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
e2e/rbac/rbac-role-list.spec.ts Covers /rbac list view behaviors: rendering, filters/search, sorting, refresh.
e2e/rbac/rbac-role-crud.spec.ts Covers role CRUD lifecycle flows end-to-end against the UI.
e2e/rbac/rbac-role-detail.spec.ts Covers role detail drawer interactions, permission creation/deletion, and user assignment/revocation.

Comment thread e2e/rbac/rbac-role-list.spec.ts
Comment thread e2e/rbac/rbac-role-detail.spec.ts Outdated
Comment thread e2e/rbac/rbac-role-detail.spec.ts Outdated
Comment thread e2e/rbac/rbac-role-detail.spec.ts Outdated
Comment thread e2e/rbac/rbac-role-detail.spec.ts Outdated
Comment thread e2e/rbac/rbac-role-crud.spec.ts Outdated
@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from 36c1d43 to 56ea373 Compare April 9, 2026 08:24
@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch 2 times, most recently from b3a7cdc to 6d11050 Compare April 9, 2026 08:41
@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from 6d11050 to 9dd2988 Compare April 13, 2026 02:18
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tested it, I failed

RBAC Role Permissions Management

tests due to permission selection failing.

@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from 9dd2988 to a1d4ca9 Compare April 13, 2026 05:17
@ironAiken2 ironAiken2 requested a review from agatha197 April 13, 2026 05:18
Copy link
Copy Markdown
Contributor Author

When I tested it, I failed

RBAC Role Permissions Management

tests due to permission selection failing.

​Just fixed :)

@ironAiken2 ironAiken2 changed the title test(FR-2504): add E2E tests for RBAC role management e2e(FR-2504): add E2E tests for RBAC role management Apr 14, 2026
@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from a1d4ca9 to 1d8f21f Compare April 16, 2026 01:24
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 4 failed
    [chromium] › e2e/rbac/rbac-role-crud.spec.ts:56:9 › RBAC Role CRUD › Superadmin can create a new custom role with name and description @rbac @critical @functional 
    [chromium] › e2e/rbac/rbac-role-detail.spec.ts:158:9 › RBAC Role Detail Drawer › Drawer shows "Role Assignments" and "Permissions" tabs @rbac @critical @functional 
    [chromium] › e2e/rbac/rbac-role-detail.spec.ts:262:9 › RBAC Role Permissions Management › Superadmin can add a permission to a role @rbac @critical @functional 
    [chromium] › e2e/rbac/rbac-role-detail.spec.ts:559:9 › RBAC Role Assignments Management › Superadmin can assign a user to a role @rbac @critical @functional 

almost done! can you check again?

@ironAiken2 ironAiken2 changed the base branch from main to graphite-base/6531 April 22, 2026 05:44
@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from 1d8f21f to 71dbe79 Compare April 22, 2026 05:44
@ironAiken2 ironAiken2 changed the base branch from graphite-base/6531 to 04-22-fix_fr-2646_align_roledetaildrawer_queries_with_updated_schema April 22, 2026 05:44
@ironAiken2 ironAiken2 force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from 71dbe79 to d8fa2b1 Compare April 22, 2026 06:57
@ironAiken2 ironAiken2 force-pushed the 04-22-fix_fr-2646_align_roledetaildrawer_queries_with_updated_schema branch from e4675bb to 26990f9 Compare April 22, 2026 06:57
@ironAiken2
Copy link
Copy Markdown
Contributor Author

@agatha197 Addressed the 4 failing tests via the stacked PR #6882 + test updates on this branch:

Schema alignment (PR #6882, parent in the stack)

  • Updated RoleAssignmentFilter.roleId usages to the new UUIDFilter shape ({ equals: ... }).
  • Refreshed data/schema.graphql to match the current backend schema.
  • Removed a redundant scopeRole: adminRole alias so the drawer query resolves the role once.

Test updates on this PR

  • rbac-role-crud.spec.ts — Superadmin can create a new custom role: fills the newly required Scope Type / Target fields, and validates creation via the success notification only (no paginated-row assumption).
  • rbac-role-detail.spec.ts — Drawer tabs: updated to assert the three tabs (Scopes, Permissions, Role Assignments) that the drawer now exposes.
  • rbac-role-detail.spec.ts — Add permission / Assign user: replaced waitForTimeout sequencing with explicit toBeEnabled + dropdown-option visibility waits to remove the flakiness you were hitting on permission selection.

Could you re-run the failing specs once more? Thanks!

@ironAiken2 ironAiken2 requested a review from agatha197 April 22, 2026 07:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 8.6% 1757/20437
🔴 Branches 7.89% 1131/14338
🔴 Functions 5.14% 285/5545
🔴 Lines 8.32% 1649/19831

Test suite run success

856 tests passing in 39 suites.

Report generated by 🧪jest coverage report action from 17f951c

@graphite-app graphite-app Bot changed the base branch from 04-22-fix_fr-2646_align_roledetaildrawer_queries_with_updated_schema to graphite-base/6531 April 22, 2026 07:01
@graphite-app graphite-app Bot force-pushed the graphite-base/6531 branch from 26990f9 to db84a8e Compare April 22, 2026 07:02
@graphite-app graphite-app Bot force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from d8fa2b1 to c8db424 Compare April 22, 2026 07:02
@graphite-app graphite-app Bot changed the base branch from graphite-base/6531 to main April 22, 2026 07:03
@graphite-app graphite-app Bot force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from c8db424 to af02bfd Compare April 22, 2026 07:03
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agatha197 agatha197 removed the request for review from nowgnuesLee April 22, 2026 07:10
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 22, 2026

Merge activity

Resolves #6530 ([FR-2504](https://lablup.atlassian.net/browse/FR-2504))

## Summary
- Add E2E tests for RBAC role CRUD lifecycle (create, edit, rename, deactivate, delete)
- Add E2E tests for RBAC role list view (table rendering, filtering, sorting, pagination)
- Add E2E tests for RBAC role detail drawer (permissions management, user assignments, edge cases)

## Test plan
- [ ] Run `npx playwright test e2e/rbac/` against a Backend.AI cluster with RBAC enabled
- [ ] Verify all 3 spec files pass: `rbac-role-crud`, `rbac-role-list`, `rbac-role-detail`

[FR-2504]: https://lablup.atlassian.net/browse/FR-2504?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch from af02bfd to 17f951c Compare April 22, 2026 07:11
@graphite-app graphite-app Bot merged commit 17f951c into main Apr 22, 2026
11 checks passed
@graphite-app graphite-app Bot deleted the 04-09-test_fr-2504_add_e2e_tests_for_rbac_role_management branch April 22, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add E2E tests for RBAC role management

3 participants