docs(08-06): complete unit tests for simplified permissions plan
- SUMMARY.md with 17 tests added across 3 test files - STATE.md updated: Phase 08 complete (6/6 plans) - ROADMAP.md updated: Phase 08 marked complete Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
- [x] **Phase 6: Global Site Selection** — Toolbar-level multi-site picker that all feature tabs consume as their default target (completed 2026-04-07)
|
||||
- [x] **Phase 7: User Access Audit** — New feature tab: export every SharePoint/Teams access a specific user holds across selected sites (completed 2026-04-07)
|
||||
- [ ] **Phase 8: Simplified Permissions** — Plain-language labels, summary counts, color coding, and detail-level toggle on the permissions report
|
||||
- [x] **Phase 8: Simplified Permissions** — Plain-language labels, summary counts, color coding, and detail-level toggle on the permissions report (completed 2026-04-07)
|
||||
- [ ] **Phase 9: Storage Visualization** — Charting dependency + pie/donut and bar chart views of storage by file type in the Storage Metrics tab
|
||||
|
||||
## Phase Details
|
||||
@@ -75,7 +75,7 @@ Plans:
|
||||
2. The report shows summary counts per permission level with color indicators distinguishing high, medium, and low access levels
|
||||
3. A detail-level selector (simple / detailed) controls whether individual item-level rows are shown or collapsed into summary rows
|
||||
4. Toggling modes and detail level does not require re-running the scan — it re-renders from the already-fetched data
|
||||
**Plans:** 5/6 plans executed
|
||||
**Plans:** 6/6 plans complete
|
||||
Plans:
|
||||
- [ ] 08-01-PLAN.md — RiskLevel enum, PermissionLevelMapping, SimplifiedPermissionEntry, PermissionSummary (Wave 1)
|
||||
- [ ] 08-02-PLAN.md — PermissionsViewModel simplified mode, detail toggle, summary computation (Wave 2)
|
||||
@@ -106,5 +106,5 @@ Plans:
|
||||
| 5. Distribution and Hardening | v1.0 | 3/3 | Complete | 2026-04-03 |
|
||||
| 6. Global Site Selection | 5/5 | Complete | 2026-04-07 | - |
|
||||
| 7. User Access Audit | 10/10 | Complete | 2026-04-07 | - |
|
||||
| 8. Simplified Permissions | 5/6 | In Progress| | - |
|
||||
| 8. Simplified Permissions | 6/6 | Complete | 2026-04-07 | - |
|
||||
| 9. Storage Visualization | v1.1 | 0/? | Not started | - |
|
||||
|
||||
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
||||
milestone: v1.0
|
||||
milestone_name: milestone
|
||||
status: completed
|
||||
stopped_at: Completed 08-05-PLAN.md
|
||||
stopped_at: Completed 08-06-PLAN.md
|
||||
last_updated: "2026-04-07T12:18:26.872Z"
|
||||
last_activity: 2026-04-07 — Completed 08-05 (Localization Keys and Export Wiring)
|
||||
last_activity: 2026-04-07 — Completed 08-06 (Unit Tests for Simplified Permissions)
|
||||
progress:
|
||||
total_phases: 4
|
||||
completed_phases: 2
|
||||
total_plans: 21
|
||||
completed_plans: 20
|
||||
completed_plans: 21
|
||||
---
|
||||
|
||||
# Project State
|
||||
@@ -25,13 +25,13 @@ See: .planning/PROJECT.md (updated 2026-04-07)
|
||||
## Current Position
|
||||
|
||||
Phase: 8 — Simplified Permissions
|
||||
Plan: 5 of 6
|
||||
Status: Plan 08-05 complete, advancing to 08-06
|
||||
Last activity: 2026-04-07 — Completed 08-05 (Localization Keys and Export Wiring)
|
||||
Plan: 6 of 6
|
||||
Status: Phase 08 complete — all plans done
|
||||
Last activity: 2026-04-07 — Completed 08-06 (Unit Tests for Simplified Permissions)
|
||||
|
||||
```
|
||||
v1.1 Progress: [██████████] 95%
|
||||
Phase 6 [x] → Phase 7 [x] → Phase 8 [..] → Phase 9 [ ]
|
||||
v1.1 Progress: [██████████] 100%
|
||||
Phase 6 [x] → Phase 7 [x] → Phase 8 [x] → Phase 9 [ ]
|
||||
```
|
||||
|
||||
## Performance Metrics
|
||||
@@ -61,6 +61,7 @@ Phase 6 [x] → Phase 7 [x] → Phase 8 [..] → Phase 9 [ ]
|
||||
| Phase 08 P03 | 77 | 1 tasks | 2 files |
|
||||
| Phase 08 P04 | 2 | 2 tasks | 2 files |
|
||||
| Phase 08 P05 | 2 | 2 tasks | 4 files |
|
||||
| Phase 08 P06 | 2 | 2 tasks | 3 files |
|
||||
|
||||
## Accumulated Context
|
||||
|
||||
@@ -117,5 +118,5 @@ None.
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2026-04-07T12:18:26.870Z
|
||||
Stopped at: Completed 08-05-PLAN.md
|
||||
Stopped at: Completed 08-06-PLAN.md
|
||||
Resume file: None
|
||||
|
||||
77
.planning/phases/08-simplified-permissions/08-06-SUMMARY.md
Normal file
77
.planning/phases/08-simplified-permissions/08-06-SUMMARY.md
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
phase: 08-simplified-permissions
|
||||
plan: 06
|
||||
title: Unit Tests for Simplified Permissions
|
||||
subsystem: tests
|
||||
tags: [testing, permissions, simplified-mode, xunit]
|
||||
dependency_graph:
|
||||
requires: [08-01, 08-02, 08-03, 08-04, 08-05]
|
||||
provides: [test-coverage-simplified-permissions]
|
||||
affects: [SharepointToolbox.Tests]
|
||||
tech_stack:
|
||||
added: []
|
||||
patterns: [Theory-InlineData-parametric, WeakReferenceMessenger-Reset-isolation, helper-factory-method]
|
||||
key_files:
|
||||
created:
|
||||
- SharepointToolbox.Tests/Helpers/PermissionLevelMappingTests.cs
|
||||
- SharepointToolbox.Tests/Models/PermissionSummaryBuilderTests.cs
|
||||
modified:
|
||||
- SharepointToolbox.Tests/ViewModels/PermissionsViewModelTests.cs
|
||||
decisions:
|
||||
- Used CreateViewModelWithResults helper to avoid duplicating mock setup across 4 new ViewModel tests
|
||||
metrics:
|
||||
duration: 104s
|
||||
completed: 2026-04-07T12:21:13Z
|
||||
tasks_completed: 2
|
||||
tasks_total: 2
|
||||
tests_added: 17
|
||||
tests_total_pass: 203
|
||||
tests_total_skip: 22
|
||||
requirements:
|
||||
- SIMP-01
|
||||
- SIMP-02
|
||||
- SIMP-03
|
||||
---
|
||||
|
||||
# Phase 08 Plan 06: Unit Tests for Simplified Permissions Summary
|
||||
|
||||
Unit tests for PermissionLevelMapping (11 known roles + unknown fallback + case insensitivity), PermissionSummaryBuilder (4 risk-level groups + distinct users), and PermissionsViewModel toggle behavior (simplified mode rebuild, detail toggle no-op, summary risk breakdown).
|
||||
|
||||
## Task Completion
|
||||
|
||||
| Task | Name | Commit | Files |
|
||||
|------|------|--------|-------|
|
||||
| 1 | Create PermissionLevelMapping and PermissionSummaryBuilder tests | 0f25fd6 | PermissionLevelMappingTests.cs, PermissionSummaryBuilderTests.cs |
|
||||
| 2 | Add simplified mode tests to PermissionsViewModelTests | 22a51c0 | PermissionsViewModelTests.cs |
|
||||
|
||||
## Test Coverage Added
|
||||
|
||||
### PermissionLevelMappingTests (9 methods, 22 test cases with Theory)
|
||||
- **GetMapping_KnownRoles_ReturnsCorrectRiskLevel** (11 InlineData): All built-in SharePoint roles mapped correctly
|
||||
- **GetMapping_UnknownRole_ReturnsMediumRiskWithRawName**: Custom roles fall back to Medium with raw name
|
||||
- **GetMapping_CaseInsensitive**: Mapping works regardless of casing
|
||||
- **GetMappings_SemicolonDelimited_SplitsAndMaps**: Semicolon-delimited input correctly split
|
||||
- **GetMappings_EmptyString_ReturnsEmpty**: Empty input handled gracefully
|
||||
- **GetHighestRisk_MultipleLevels_ReturnsHighest**: High wins over Low
|
||||
- **GetHighestRisk_SingleReadOnly_ReturnsReadOnly**: Single ReadOnly preserved
|
||||
- **GetSimplifiedLabels_JoinsLabels**: Labels joined with semicolons
|
||||
|
||||
### PermissionSummaryBuilderTests (4 methods)
|
||||
- **Build_ReturnsAllFourRiskLevels**: Always returns 4 groups even with 1 entry per level
|
||||
- **Build_EmptyCollection_ReturnsZeroCounts**: Empty input returns 4 groups with count 0
|
||||
- **Build_CountsDistinctUsers**: 3 entries with 2 distinct users counted correctly
|
||||
- **SimplifiedPermissionEntry_WrapAll_PreservesInner**: Inner reference preserved, passthrough properties correct
|
||||
|
||||
### PermissionsViewModelTests (4 new methods, 5 total)
|
||||
- **IsSimplifiedMode_Default_IsFalse**: Default state verification
|
||||
- **IsSimplifiedMode_WhenToggled_RebuildsSimplifiedResults**: Toggle populates SimplifiedResults and Summaries
|
||||
- **IsDetailView_Toggle_DoesNotChangeCounts**: Detail toggle does not re-compute data
|
||||
- **Summaries_ContainsCorrectRiskBreakdown**: Risk counts match input entries
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None - plan executed exactly as written.
|
||||
|
||||
## Verification
|
||||
|
||||
Full test suite: 203 passed, 22 skipped, 0 failed.
|
||||
Reference in New Issue
Block a user