Repository navigation
feat(testing): consolidate playwright fixtures, add search utils jsdoc, wallet persistence and saved searches e2e - #1153
Merged
nanaf6203-bit merged 1 commit intoSep 28, 2026
Conversation
…c, wallet persistence and saved searches e2e
|
@dDevAhmed 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! 🚀 |
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
This PR resolves 4 issues across Playwright fixtures, search utilities JSDoc documentation, wallet session reload persistence, and saved searches dashboard E2E coverage.
tests/fixtures/msw-fixture.ts,tests/fixtures/wallet-msw.ts,tests/e2e/wallet-fixture.ts) into a single canonical fixture module attests/fixtures/index.ts, eliminates inline route mock duplication across specs, and documents test fixtures intests/README.md.src/utils/searchUtils.ts(purpose,@param,@returns,@example, and locale-dependent URL key behavior).tests/e2e/saved-searches.spec.ts), including creating, listing, running/filter restoration, deleting, empty states, and storage reload persistence.src/store/walletStore.tsacross page reload with session expiry checks, version migration, and clear on disconnect/reset, with unit tests insrc/store/__tests__/walletPersistence.test.ts.What Changed
Playwright Fixtures Consolidation (
#1103):tests/fixtures/index.tsextending@playwright/testwithwallet,api, andwalletMswFixturefixtures plussetupWalletMockandsetupApiMockhelpers.property-purchase-flow,property-purchase,purchase-confirmation,wallet-connection,msw-verification,visual-regression,governance-voting,onboarding-tour,property-alerts,transaction-history,referral-leaderboard,csp,accessibility) to use canonical fixtures.tests/fixtures/msw-fixture.ts,tests/fixtures/wallet-msw.ts, andtests/e2e/wallet-fixture.ts.tests/README.mddocumenting fixture usage and test suites.Search Utils JSDoc (
#1104):src/utils/searchUtils.ts:parseSearchFilters,serializeSearchFilters,parseSortOption,serializeSortOption,buildFilterQueryString,areFiltersEqual,getFilterSummary,sanitizeSearchTerm,hasActiveFilters,resetFilters,validatePriceRange, andvalidateRoiRange.getResolvedLocale/navigator.language.Dashboard Saved Searches E2E Coverage (
#1105):<SavedSearchCard />grid and data test attributes (data-testid="saved-searches-grid",data-testid="empty-saved-searches") onsrc/app/dashboard/saved-searches/page.tsx.tests/e2e/saved-searches.spec.tstesting applying filters, saving search, listing on dashboard, reload persistence, running search (filter restoration on/properties), deleting search, empty states, and corrupted storage fallback.saved-searches.spec.tsintests/README.md.Wallet Persistence & Reload Tests (
#1106):persistmiddleware insrc/store/walletStore.tswith custom storage adapter, versioning (WALLET_STORE_VERSION = 1), TTL validation (WALLET_SESSION_TTL_MS = 24h), and auto-clearing storage on disconnect or reset.createWalletStorefor test isolation.src/store/__tests__/walletPersistence.test.tscovering connect persistence, account switch, session TTL expiry, version mismatch migration, corrupt JSON resilience, and storage removal on disconnect.tests/e2e/wallet-connection.spec.ts.Why
Testing Performed
npm test -- src/store/__tests__/walletPersistence.test.ts src/store/__tests__/walletStore.test.ts src/utils/__tests__/searchUtils.test.ts: 48/48 passed.npx eslint src/utils/searchUtils.ts src/store/walletStore.ts: 0 errors, 0 warnings.Risks Considered
setupWalletMock,setupApiMock) are exported bytests/fixtures/index.tsso future specs can use either programmatic setup or fixtures.Edge Cases Handled
Closes #1103
Closes #1104
Closes #1105
Closes #1106