Test/reputation 15 reputationprofile branches#665
Closed
Thosine-01 wants to merge 5 commits into
Closed
Conversation
Contributor
Author
|
I'm not sure what happend to the first PR but i was assigned the issue by you i guess i made a mistake with closing the issue. please let me know your thought thank you |
Contributor
|
thanks for pitching in @Thosine-01! this one's not assigned to you — apply for it first, and once you're the assignee reopen the PR. 🙂 |
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
Extends
ReputationProfile.test.tsxto cover all rendering branches (no-reputation, score of 0, partial, full-history) and verifies the component's accessibility wiring,What's covered
scoreundefined renders "No reputation yet" / "Pending", no partial banner.ReputationEventrenders as its own list item; pill reads "Visible"; verified violation-free withjest-axe.aria-labelledbyassociations between the score/level values and their labels resolve to the correct label elements, and thesr-onlyprofile heading is present and correctly associated via the section'saria-labelledby.No source changes were needed —
ReputationProfile.tsx's existinghasReputationcheck (typeof score === 'number' && score >= 0) already correctly handlesscore === 0; this PR adds a regression test to make sure it stays that way.Reused the existing exported
ReputationEvent/ReputationProfilePropstypes rather than duplicating them.Added a short section to
docs/components/Accessibility.mddocumenting the guarantees now covered by these tests.#close(#476)
Test output
PASS src/components/tests/StatusBadge.test.tsx
PASS src/contexts/tests/WalletContext.test.tsx
PASS src/components/tests/EmptyState.test.tsx (5.131 s)
PASS src/lib/tests/preferences.test.tsx (5.292 s)
PASS src/components/tests/ActionPanel.test.tsx (5.644 s)
PASS src/components/tests/RouteAnnouncer.test.tsx
PASS src/components/settings/tests/SettingsPanel.test.tsx (6.784 s)
PASS src/components/tests/WalletConnectButton.test.tsx
PASS src/components/FormValidation.test.tsx
PASS src/components/toast/toast-provider.test.tsx
PASS src/components/SafeBoundary.test.tsx
PASS src/components/tests/ContractSummary.test.tsx
PASS src/components/tests/MilestonesList.test.tsx
PASS src/app/error.test.tsx
PASS src/app/page.test.tsx
PASS src/components/tests/a11y.test.tsx (8.383 s)
PASS src/app/milestones/tests/page.test.tsx
PASS src/lib/tests/truncateAddress.test.ts
PASS src/app/reputation/tests/page.test.tsx
PASS src/app/contracts/tests/page.test.tsx
PASS src/components/ReputationProfile.test.tsx
PASS src/app/contracts/[id]/tests/page.test.tsx
PASS src/app/not-found.test.tsx
Test Suites: 23 passed, 23 total
Tests: 172 passed, 172 total
Snapshots: 7 passed, 7 total
Time: 12.507 s