# Test Coverage Matrix: User Profile Dashboard Filter

## Validation Snapshot

- **Date (UTC)**: 2026-03-05
- **Feature**: `024-user-dashboard-filter`

## Executed Automated Test Runs

### 1) Backend profile + dashboards contracts

```bash
cd backend && .venv/bin/python3 -m pytest src/api/routes/__tests__/test_profile_api.py src/api/routes/__tests__/test_dashboards.py
```

- **Result**: `27 passed`

### 2) Frontend profile + dashboards integration scenarios

```bash
cd frontend && npm run test -- src/routes/profile/__tests__/profile-preferences.integration.test.js src/routes/profile/__tests__/profile-settings-state.integration.test.js src/routes/dashboards/__tests__/dashboard-profile-override.integration.test.js
```

- **Result**: `3 files passed`, `6 tests passed`

## Coverage by User Story

| User Story | Scope | Evidence | Status |
|---|---|---|---|
| US1 | Profile binding + default dashboard filtering | `test_profile_api.py`, `test_dashboards.py`, `profile-preferences.integration.test.js` | ✅ |
| US2 | Preload/cancel/saved-state management + self-scope guard | `test_profile_api.py`, `profile-settings-state.integration.test.js` | ✅ |
| US3 | Temporary show-all override + restore-on-return | `test_dashboards.py`, `dashboard-profile-override.integration.test.js` | ✅ |

## Contract Edge Evidence

| Contract Edge | Verification Test | Status |
|---|---|---|
| `enable_without_username` | `test_patch_profile_preferences_validation_error` | ✅ |
| `cross_user_mutation` | `test_patch_profile_preferences_cross_user_denied` | ✅ |
| `lookup_env_not_found` | `test_lookup_superset_accounts_env_not_found` | ✅ |
| `owners OR modified_by` (trim + case-insensitive) | `test_get_dashboards_profile_filter_contract_owners_or_modified_by` | ✅ |
| `override_show_all` metadata semantics | `test_get_dashboards_override_show_all_contract` | ✅ |
| `no_match_results` with active profile filter | `test_get_dashboards_profile_filter_no_match_results_contract` | ✅ |
| restore-on-return behavior (page-scoped override) | `dashboard-profile-override.integration.test.js` | ✅ |

## Notes

- Feature scenarios required by quickstart and story contracts are covered by automated tests above.
- Frontend run reports Svelte deprecation/a11y warnings in dashboards UI; these are non-blocking for current feature behavior and do not fail tests.