Verification Matrix — User Authentication
Implements: User Authentication
Scenarios (at a glance)
| ID | Title | Type |
|---|---|---|
| TC-AUTH-001 (1.1) | Login page displays correctly | Positive |
| TC-AUTH-002 (1.1) | Mock auth page shows available users | Positive |
| TC-AUTH-003 (1.1) | RPO authentication success and home redirect | Positive |
| TC-AUTH-004 (1.1) | Site Protector authentication success and home redirect | Positive |
| TC-AUTH-005 (1.1) | Admin authentication success and redirect | Positive |
| TC-AUTH-010 (1.1) | Viewer authentication success and redirect | Positive |
| TC-AUTH-006 (1.1) | Authentication failure handling | Negative |
| TC-AUTH-007 (1.2) | User logout success | Positive |
| TC-AUTH-008 (1.2) | Protected routes inaccessible after logout | Defensive |
| TC-AUTH-009 | Authenticated users bypass login page | Defensive |
Scenario details
TC-AUTH-001: Login page displays correctly
Covers: Login page UI elements
- Arrange
- The user is not authenticated
- Act
- The user navigates to the login page
- Assert
- The login page displays all required elements (logo, sign-in button, etc.)
- The page is accessible and properly formatted
TC-AUTH-002: Mock auth page shows available users
Covers: Development authentication flow
- Arrange
- The user is on the login page
- Act
- The user clicks the "Sign In" button
- Assert
- The mock authentication page is displayed
- Available test users are shown for selection
TC-AUTH-003: RPO authentication success and home redirect
Covers: Successful authentication for RPO users
- Arrange
- The user selects an RPO user from the mock auth page
- Act
- The user completes the authentication process
- Assert
- Authentication succeeds and user is signed in
- User is redirected to appropriate home page
- User's name is displayed in the interface
- Online status is indicated
- "Your Project" tab is selected (if user has project assignments)
TC-AUTH-004: Site Protector authentication success and home redirect
Covers: Successful authentication for Site Protector users
- Arrange
- The user selects a Site Protector user from the mock auth page
- Act
- The user completes the authentication process
- Assert
- Authentication succeeds and user is signed in
- User is redirected to appropriate home page
- User's name is displayed in the interface
- Online status is indicated
- "Your Project" tab is selected (if user has site assignments)
TC-AUTH-005: Admin authentication success and redirect
Covers: Successful authentication for Admin users
- Arrange
- The user selects an Admin user from the mock auth page
- Act
- The user completes the authentication process
- Assert
- Authentication succeeds and user is signed in
- User is redirected to "All Projects" page (default for admin users)
- User's name is displayed in the interface
- Online status is indicated
TC-AUTH-006: Authentication failure handling
Covers: System response to failed authentication attempts
- Arrange
- The authentication provider returns an error response
- Act
- The user attempts to authenticate
- Assert
- The system displays an appropriate error message
- The user remains on the login/authentication page
- No authenticated session is established
Note: Currently skipped in test suite - implementation needed
TC-AUTH-010: Viewer authentication success and redirect
Covers: Successful authentication for Viewer users
- Arrange
- The user selects a Viewer user from the mock auth page
- Act
- The user completes the authentication process
- Assert
- Authentication succeeds and user is signed in
- User is redirected to "All Projects" page (read-only access)
- User's name is displayed in the interface
- Online status is indicated
- No modification actions are available
TC-AUTH-007: User logout success
Covers: Successful logout process
- Arrange
- The user is authenticated and logged in
- Act
- The user initiates logout through the UI
- Assert
- The user session is terminated
- The user is redirected to the login page
- Login page elements are displayed correctly
TC-AUTH-008: Protected routes inaccessible after logout
Covers: Route protection after session termination
- Arrange
- The user has logged out successfully
- Act
- The user attempts to access protected routes directly
- Assert
- Protected routes are not accessible
- The user is redirected to login for protected route access
TC-AUTH-009: Authenticated users bypass login page
Covers: Automatic redirect for authenticated users
- Arrange
- The user has a valid authenticated session
- Act
- The user navigates to the login page
- Assert
- The user is automatically redirected to the appropriate home page
- The login page is not displayed
Test Implementation Status
| Scenario | E2E Test File | Test Case ID | Status |
|---|---|---|---|
| TC-AUTH-001 | 1.1-Login.spec.ts | TC-1.1.1 | ✅ Implemented |
| TC-AUTH-002 | 1.1-Login.spec.ts | TC-1.1.2 | ✅ Implemented |
| TC-AUTH-003 | 1.1-Login.spec.ts | TC-1.1.3 | ✅ Implemented |
| TC-AUTH-004 | 1.1-Login.spec.ts | TC-1.1.4 | ✅ Implemented |
| TC-AUTH-005 | 1.1-Login.spec.ts | TC-1.1.5 | ✅ Implemented |
| TC-AUTH-006 | 1.1-Login.spec.ts | TC-1.1.6 | ❌ Skipped |
| TC-AUTH-010 | - | - | ❌ Not Implemented |
| TC-AUTH-007 | 1.2-Logout.spec.ts | TC-1.2.1 | ✅ Implemented |
| TC-AUTH-008 | 1.2-Logout.spec.ts | TC-1.2.1 | ✅ Implemented |
| TC-AUTH-009 | login.tsx | beforeLoad | ✅ Implemented |
Implementation Gaps
Missing E2E Tests
- TC-AUTH-006: Authentication failure handling is currently skipped in the test suite
- TC-AUTH-010: Viewer user authentication flow not yet implemented in test suite
Additional Test Coverage Needed
- Viewer role authentication and access patterns
- Error handling for authentication failures