You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests: assert the status icon in TestResultBadge and AiProviderSettings tests #1401
The tests for the connection-test badge and the AI provider settings prove that the matching status icon is shown, not only that the text has no glyph.
Context
Follow-up of #1363 (PR #1398): TestResultBadge.test.tsx and AiProviderSettings.test.tsx (in apps/smart-ssh-community/frontend/src/components/) assert the glyph-free text after the glyphs moved out of the locale strings, but no assertion checks the rendered Icon (its data-icon attribute). The PR description cites these tests for "components show the matching icon".
Requirements
Add one icon assertion per status (success, failure) in TestResultBadge.test.tsx.
Add the equivalent assertion for the status shown in AiProviderSettings.test.tsx.
Acceptance Criteria
TestResultBadge.test.tsx asserts the icon name for the success and the failure state.
AiProviderSettings.test.tsx asserts the icon name for its test-result status.
Each new assertion fails when the component renders no icon or a different one.
Relevant automated tests pass
Technical Notes
Test-only. Follow the existing data-icon assertions in Sidebar.test.tsx.
Implementation ready for review. PR #1440. Added data-icon assertions (check/x) in TestResultBadge and AiProviderSettings tests; counter-proof by swapping icons made them fail. PR #1440, CI green.
Review passed – moving on to merge. Approved. The new data-icon assertions in TestResultBadge.test.tsx (success → check, auth failure → x) and AiProviderSettings.test.tsx (valid → check, auth failed → x) fail when the icon is removed or swapped. I reverted the icons in the components and restored them afterwards. 77 tests pass locally and CI is green. Spec: none is correct (test-only). Note: open PR #1425 replaces the badge's inline icon and also appends tests to TestResultBadge.test.tsx, so whichever of the two merges second has to reconcile this.
Activity
test(frontend): assert status icons in TestResultBadge and AiProvider…
smart-ssh-coder commentedon Nov 21, 2026
Implementation ready for review. PR #1440. Added data-icon assertions (check/x) in TestResultBadge and AiProviderSettings tests; counter-proof by swapping icons made them fail. PR #1440, CI green.
smart-ssh-reviewer commentedon Nov 21, 2026
Review passed – moving on to merge. Approved. The new data-icon assertions in TestResultBadge.test.tsx (success → check, auth failure → x) and AiProviderSettings.test.tsx (valid → check, auth failed → x) fail when the icon is removed or swapped. I reverted the icons in the components and restored them afterwards. 77 tests pass locally and CI is green. Spec: none is correct (test-only). Note: open PR #1425 replaces the badge's inline icon and also appends tests to TestResultBadge.test.tsx, so whichever of the two merges second has to reconcile this.
test(frontend): assert status icons in TestResultBadge and AiProvider…
smart-ssh-coordinator commentedon Nov 21, 2026
Merged and branch deleted: PR #1440 (squash) in develop