fix: restore current page after refresh
This commit is contained in:
@@ -120,6 +120,12 @@ describe('task and habit row decoration', () => {
|
||||
expect(css).toContain('.habit-progress{margin-left:auto;')
|
||||
})
|
||||
|
||||
it('restores the current page and list from local storage', () => {
|
||||
expect(app).toContain("readStoredNavigation(window.localStorage, NAVIGATION_STORAGE_KEY)")
|
||||
expect(app).toContain("writeStoredNavigation(window.localStorage, NAVIGATION_STORAGE_KEY, view, activeList.value)")
|
||||
expect(app).toContain('if (restoredNavigation.view === \'tasks\' && restoredNavigation.listId)')
|
||||
})
|
||||
|
||||
it('restores the completed-item visibility choices from local storage', () => {
|
||||
expect(app).toContain("readStoredBoolean(window.localStorage, SHOW_COMPLETED_STORAGE_KEY, true)")
|
||||
expect(app).toContain("writeStoredBoolean(window.localStorage, SHOW_COMPLETED_STORAGE_KEY, value)")
|
||||
@@ -366,7 +372,7 @@ describe('sidebar layout', () => {
|
||||
})
|
||||
|
||||
it('loads archived lists during bootstrap so archived rows are visible after refresh', () => {
|
||||
expect(app).toContain('expandedFolders.value = new Set(folders.value.map((folder) => folder.id))\n await loadArchivedLists()\n void preloadCountdowns()\n await loadAll()')
|
||||
expect(app).toContain('expandedFolders.value = new Set(folders.value.map((folder) => folder.id))\n await loadArchivedLists()\n void preloadCountdowns()\n await loadRestoredView()')
|
||||
})
|
||||
|
||||
it('styles archived rows through the new list-row-main structure', () => {
|
||||
|
||||
Reference in New Issue
Block a user