-
Notifications
You must be signed in to change notification settings - Fork 4
Profile page identity rep combined #1954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fa8face
wip
ragnep 3ce7ef2
Merge branch 'main' into profile-page-identity-rep-combined
ragnep dc699aa
wip
ragnep f72dc75
wip
ragnep 58c1589
wip
ragnep 73be4ba
wip
ragnep 5769896
Merge branch 'main' into profile-page-identity-rep-combined
ragnep 1ba1063
wip
ragnep ccefc4e
wip
ragnep 035e42c
wip
ragnep 47e3277
wip
ragnep fa5b299
Merge branch 'main' into profile-page-identity-rep-combined
ragnep f64a4b1
wip
ragnep 4754d35
wip
ragnep ee6e224
wip
ragnep 6b71f3b
wip
ragnep db793ca
Merge branch 'main' into profile-page-identity-rep-combined
ragnep ef1f9a2
Merge branch 'main' into profile-page-identity-rep-combined
ragnep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
33 changes: 0 additions & 33 deletions
33
__tests__/components/user/identity/UserPageIdentity.test.tsx
This file was deleted.
Oops, something went wrong.
71 changes: 0 additions & 71 deletions
71
__tests__/components/user/identity/UserPageIdentityWrapper.test.tsx
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
__tests__/components/user/identity/activity/UserPageIdentityActivityLog.test.tsx
This file was deleted.
Oops, something went wrong.
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
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
21 changes: 0 additions & 21 deletions
21
__tests__/components/user/rep/UserPageRepActivityLog.test.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 11 additions & 5 deletions
16
__tests__/components/user/rep/header/UserPageRepHeader.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,25 @@ | ||
| import { render, screen } from '@testing-library/react'; | ||
| import UserPageRepHeader from '@/components/user/rep/header/UserPageRepHeader'; | ||
|
|
||
| const mockProfile = { | ||
| handle: 'testuser', | ||
| display: 'Test User', | ||
| query: 'testuser', | ||
| } as any; | ||
|
|
||
| describe('UserPageRepHeader', () => { | ||
| it('shows rep totals when provided', () => { | ||
| const repRates = { | ||
| total_rep_rating: 1500, | ||
| number_of_raters: 25, | ||
| rating_stats: [], | ||
| } as any; | ||
| render(<UserPageRepHeader repRates={repRates} />); | ||
| render(<UserPageRepHeader repRates={repRates} profile={mockProfile} />); | ||
| expect(screen.getByText('1,500')).toBeInTheDocument(); | ||
| expect(screen.getByText('25')).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('renders empty values without repRates', () => { | ||
| const { container } = render(<UserPageRepHeader repRates={null} />); | ||
| expect(container).toHaveTextContent('Rep:'); | ||
| it('renders without repRates', () => { | ||
| const { container } = render(<UserPageRepHeader repRates={null} profile={mockProfile} />); | ||
| expect(container).toHaveTextContent('Reputation'); | ||
| }); | ||
| }); | ||
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.