Skip to content

Fix SonarQube test assertion specificity#162

Merged
igorsatsyuk merged 1 commit into
mainfrom
fix/sonarqube-test-assertions
Jul 7, 2026
Merged

Fix SonarQube test assertion specificity#162
igorsatsyuk merged 1 commit into
mainfrom
fix/sonarqube-test-assertions

Conversation

@igorsatsyuk

Copy link
Copy Markdown
Owner

What changed

  • replaced generic length-based expectations in frontend specs with more specific assertions over rendered ids and grouped keys
  • tightened the dashboard paging assertion to verify the exact ids returned to the view instead of only checking array length
  • kept the behavior of the tests the same while addressing SonarQube maintainability feedback

Why

SonarQube flagged several generic assertions in the Angular spec suite. These checks were valid but not very descriptive, so the tests now assert the expected structure and content more directly.

Impact

  • no production code changes
  • clearer and more intention-revealing frontend tests
  • SonarQube warnings for these assertions should be resolved

Validation

  • npm test -- --watch=false --browsers=ChromeHeadless

@igorsatsyuk igorsatsyuk self-assigned this Jul 7, 2026
@igorsatsyuk igorsatsyuk marked this pull request as ready for review July 7, 2026 15:30
@igorsatsyuk igorsatsyuk merged commit 609ac87 into main Jul 7, 2026
8 checks passed
@igorsatsyuk igorsatsyuk deleted the fix/sonarqube-test-assertions branch July 7, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant