-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: asset list cleanup #201
Conversation
WalkthroughThe pull request modifies the Changes
Suggested labels
Suggested reviewers
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/bank/components/__tests__/tokenList.test.tsx (1)
74-81
: Enhance test clarity and error messages.The test implementation looks good and aligns with accessibility best practices. Consider these improvements:
- Add a comment explaining why we expect
TOKEN 1
to appear twice- Add a custom error message to the balance assertion for better debugging
const token1Row = screen.getByLabelText('utoken1'); expect(token1Row).toBeInTheDocument(); +// TOKEN 1 appears twice: once in the main display and once in the info section const ticker = within(token1Row).getAllByText('TOKEN 1'); expect(ticker).toHaveLength(2); const balance = within(token1Row).getByText('0.001'); -expect(balance).toBeInTheDocument(); +expect(balance).toBeInTheDocument('Balance should be displayed for the token');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/bank/components/__tests__/tokenList.test.tsx
(2 hunks)
🔇 Additional comments (2)
components/bank/components/__tests__/tokenList.test.tsx (2)
124-127
: LGTM! Well-structured filtering test.The test properly validates both the presence of filtered tokens and absence of non-matching tokens using consistent aria-labels.
Line range hint
1-171
: Verify removal of denomination display tests.The AI summary mentions that tests for base denomination display were removed. Let's verify this aligns with the PR objectives.
✅ Verification successful
Test changes improve coverage and accessibility
The removal of the base denomination display test is justified as:
- It was redundant with other tests that now verify both ticker and balance display
- The test suite was updated to use better accessibility practices with aria-labels
- The overall test coverage has improved with more specific assertions
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining denomination-related tests git diff HEAD^ HEAD -- components/bank/components/__tests__/tokenList.test.tsx | grep -i "denom" # Check if there are any other test files that might need similar updates fd -e test.tsx -e test.ts -x grep -l "denom" {} \;Length of output: 820
Script:
#!/bin/bash # Get the full diff of the test file git diff HEAD^ HEAD -- components/bank/components/__tests__/tokenList.test.tsx # Check denomination display tests in other files rg "test.*display.*denom" -A 5 -B 5Length of output: 5097
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Use uppercase ticker and remove subdenom display.
Summary by CodeRabbit
Style
Tests