Skip to content

Add integration test for localStorage preference helper persisting sort order across re-renders#518

Closed
wheval wants to merge 1 commit into
accesslayerorg:mainfrom
wheval:test/preference-sort-persistence
Closed

Add integration test for localStorage preference helper persisting sort order across re-renders#518
wheval wants to merge 1 commit into
accesslayerorg:mainfrom
wheval:test/preference-sort-persistence

Conversation

@wheval

@wheval wheval commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an integration test suite for setPreference/getPreference verifying that sort order preferences survive a simulated unmount/remount cycle.

Changes

  • src/utils/__tests__/preferences.sort.integration.test.ts — new integration tests
    • Saved desc sort is read back after remount
    • Default asc applied when no preference stored
    • Overwriting a preference reflects the new value on next read
    • Clearing storage resets to default
    • Sort key is isolated from unrelated localStorage entries

Closes #478

…ross re-renders

- Saved 'desc' sort preference is read back correctly after simulated remount
- Default 'asc' sort applied when no preference is stored in localStorage
- Overwriting a preference reflects the new value on next read
- Clearing storage resets to the default sort order
- Sort key is isolated from unrelated localStorage entries

Closes accesslayerorg#478
@github-actions

Copy link
Copy Markdown

👋 Hey @wheval, thanks for your contribution!

This PR is targeting main directly. We use main for stable releases only — all contributions should be opened against the dev branch instead.

Please close this PR and reopen it with dev as the base branch. If you're unsure how to do that, you can change the base branch using the Edit button at the top of this PR page.

Closing this PR automatically. See you in dev! 🚀

@github-actions github-actions Bot closed this Jun 29, 2026
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for accesslayer ready!

Name Link
🔨 Latest commit c435ee9
🔍 Latest deploy log https://app.netlify.com/projects/accesslayer/deploys/6a42c9fe51f1290008703977
😎 Deploy Preview https://deploy-preview-518--accesslayer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant