Repository navigation
test: cover the not assessed numbers in the assessment HTML reports - #47
Merged
Merged
Conversation
Adds a behavioural test that runs Invoke-InforcerAssessment single-tenant with -OutputPath and checks the rendered filter counts, score, and the category percentage and badge. Adds presence checks for the single-report 'na' filter branch and the matrix "?" cell and passed/assessed header. Mutations now caught that previously survived: - single-tenant HTML given Failed = TotalChecks - Passed - category percentage computed over all checks - single-report 'na' filter line removed - matrix st-u "?" cell branch removed - matrix header reverted to t.total Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only changes cover the stated regression gaps without identified blocking issues; tests were not executed during this review.
No open issues 🎉
What changed in this PR
This test-only follow-up to #46 strengthens regression coverage for assessment reports, checking that unassessed checks remain separate from failures and are excluded from scoring.
Changes:
- Adds a single-tenant HTML test for assessment counts, overall score, and category percentage and badge.
- Adds source-presence assertions for the Not Assessed filter, matrix
?cell, and assessed-only matrix denominator.
| File | Description |
|---|---|
| Tests/Consistency.Tests.ps1 | Adds report-output and JavaScript source assertions for not-assessed handling. |
Review effort: Balanced
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.
Summary of changes
Test-only. Closes the gaps a mutation run found in the #46 coverage: five mutations to the assessment report code passed the suite.
Invoke-InforcerAssessment not assessed checks: runs the cmdlet single-tenant with-OutputPathand checks the rendered HTML forPassed (2),Failed (2),Not Assessed (2), score50%, and the Entra category's50%and2/4badge.nafilter line, the matrix?cell (st st-u) and the(t.passed+t.failed)header. These confirm the code is there, not how it behaves in a browser.All 8 mutations in the run are now caught, including the five that got through before:
Failed = TotalChecks - Passednafilter line removed?cell branch removedt.totalNo module code changes, no version bump, no CHANGELOG entry.
Related issue
None. Follow-up to #46.
Checklist
Invoke-Pester ./Tests: 476 passed, 0 failed, 2 skipped)🤖 Generated with Claude Code