Implement cohesive Storybook for staff + community UI portal application package Fixes #266#283
Open
rohit-r-kumar wants to merge 292 commits into
Open
Implement cohesive Storybook for staff + community UI portal application package Fixes #266#283rohit-r-kumar wants to merge 292 commits into
rohit-r-kumar wants to merge 292 commits into
Conversation
Remove antd and react-dom from dependencies where unused, and storybook from devDependencies across all ui-staff-route-* packages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…zation Covers all 4 Entra app-role × 4 route combinations (20 access tests) plus 3 nav-link visibility tests = 23 tests total. Strategy: inject a fake OIDC session into sessionStorage via page.addInitScript() before the app loads. oidc-client-ts restores stored users without re-validating the JWT signature, so each test can control the user's roles independently without restarting the mock auth server. Test matrix: - Staff.TechAdmin: /tech ✓, /finance ✗, /community ✗, /users ✗ - Staff.Finance: /finance ✓, /tech ✗, /community ✗, /users ✗ - Staff.CaseManager: /community ✓, /users ✓, /finance ✗, /tech ✗ - Staff.ServiceLineOwner:/community ✓, /users ✓, /finance ✗, /tech ✗ - No roles: all 4 routes ✗ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…enityJS feat: add new test commands for end-to-end and acceptance tests in turbo.json style: format vitest.config.ts for consistency in quotes and indentation
…sion-based routing - Add StaffRoleSectionPermissions domain value object with 4 permission flags: canManageCommunities, canManageUser, canManageFinance, canManageTechAdmin - Wire sectionPermissions into StaffRolePermissions domain model and persistence adapter - Add Mongoose schema subdocument for StaffRoleSectionPermissions - Create idempotent createDefaultRoles app service (4 roles mapped to AAD app roles) - Create createIfNotExists and queryByExternalId StaffUser app services - Add StaffUser readonly read-repository with role population - Wire StaffPortal passport lookup via StaffUserReadRepo.getByExternalId - Add currentStaffUserAndCreateIfNotExists GraphQL query with full type definitions - Refactor RequireRole to check backend permissions (permKey) with JWT role fallback - Refactor StaffRouteShell nav filtering to use permKey for permission-aware links - Add useStaffPermissions Apollo hook; refactor App.tsx to build StaffAuth from backend - Add BDD tests for StaffRoleSectionPermissions (12 scenarios, all permission flags) - Add sectionPermissions scenario to staff-role-permissions BDD test suite - Fix ReadonlyDataSource index test to include StaffUser mock model and assertions - Exclude e2e directory from Vitest coverage to fix pre-existing Playwright conflict - Mock useStaffPermissions in App.test.tsx so unit tests use JWT role fallback path Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… into rohit-r-kumar/issue214
- Changed to in GraphQL queries and components. - Updated permission checks in and to reflect new permission structure. - Renamed to in admin permissions. - Introduced new finance and tech admin permission features with corresponding tests. - Added user permissions management with appropriate validation and tests. - Created Storybook stories for various permission scenarios in .
… into rohit-r-kumar/issue214
…aff users - Implemented GraphQL resolvers for querying and creating staff user entities. - Added feature tests for staff user resolvers, covering scenarios for JWT verification and AAD roles. - Created a read repository for staff users with tests for model presence and document retrieval. - Enhanced staff role domain adapter with additional permission scenarios and tests.
…nity and user management
…cross multiple files
…cross multiple files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #266
Summary by Sourcery
Add a cohesive Storybook setup for the staff UI portal and align shared component stories to the new structure.
New Features:
Bug Fixes:
Enhancements:
Build: