test: cover AccountScreen refresh state and ConnectScreen wallet options - #286
Open
Adeolu01 wants to merge 1 commit into
Open
test: cover AccountScreen refresh state and ConnectScreen wallet options#286Adeolu01 wants to merge 1 commit into
Adeolu01 wants to merge 1 commit into
Conversation
test(screens): cover AccountScreen refresh state and ConnectScreen wallet options Add the AccountScreen refresh loading/last-updated behaviour and the ConnectScreen supported-wallet and onboarding UI that the coverage in Sorokit#199 depends on, then test both. AccountScreen: - track a last-updated timestamp that is set once refreshAccount resolves - test the refresh button disabled/aria-busy state while isLoadingAccount - test that the timestamp only appears after a refresh completes ConnectScreen: - render supported wallet options with accessible logos - add a collapsible "New to Stellar?" onboarding section - hide the hero image on small viewports (hidden sm:block) - test wallet options, collapsible expand, and the responsive hero class @
|
@Adeolu01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Collaborator
|
@Adeolu01 Well done, kindly resolve the conflicts |
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.
closes #199
Summary
This PR closes the test-coverage gaps called out in #199 for the AccountScreen refresh flow and the ConnectScreen wallet/onboarding UI, adding the small pieces of behaviour those tests depend on so the coverage is meaningful.
While scoping the work I confirmed that two of the three gaps in the issue are already covered on
main:walletcase are already tested insrc/components/Sidebar.test.tsx.src/components/BalanceList.test.tsx(the link is rendered byBalanceList, whichAccountScreencomposes).The remaining behaviour described in the issue did not yet exist in the codebase, so this PR adds it and tests it.
Changes
AccountScreen (#81)
lastUpdatedtimestamp that is set only afterrefreshAccount()resolves, and render a "Last updated ..." label next to the refresh control.aria-busywhileisLoadingAccountis true, and enabled otherwiserefreshAccountConnectScreen (#82)
role="img"+aria-label).<details>/<summary>.hidden sm:block.<details>element is in the DOM, is collapsed by default, and expands on summary clickNo production dependencies were added; the tests use the existing
@testing-library/react+ Vitest setup already used across the suite.Verification
npx tsc -p tsconfig.app.json --noEmitpasses.eslintpasses on all changed files.npm testoutput below. All 32 tests in the three targeted files pass. The single failing test (SorokitProvider > memoizes the context value across parent re-renders) is pre-existing onmainand unrelated to this change (verified by running it on a cleanmain).Full npm test output
Acceptance criteria
main)npm test(excluding the pre-existing, unrelatedSorokitProvidermemoization failure)