Skip to content

[dev] Audit what matched forbidden regex in admin RBAC e2e test (PR #327) on /admin/users #329

Description

@bg-playground

In PR #327 we replaced a brittle regex assertion (/403|forbidden|access denied/i) in the e2e RBAC tests with a testid-anchored selector (getByTestId('admin-route-forbidden')). This finally stabilized the admin access test, but it’s unclear what specifically on /admin/users (when loaded as admin) matched the forbidden regex. It’s possible there is a toast, error banner, or unintentional text being rendered for admins.

Acceptance criteria:

  • Confirm, by deliberate test logging (or inserting a temporary assertion/console.log in the Playwright test), what page.getByText(/403|forbidden|access denied/i) matches on /admin/users for admins during e2e CI runs.
  • If it’s a legitimate error (e.g. failed user fetch, toast, API error state), identify and file a follow-up.
  • If it’s a harmless coincidence or expected elsewhere on-page, document and close as not a product bug.

References:

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions