mark all as read

This commit is contained in:
2026-06-08 07:06:38 +02:00
parent b4fc86302f
commit 3c42ebb972
4 changed files with 82 additions and 4 deletions
@@ -23,11 +23,13 @@ describe('RssFeeds', () => {
// useFeeds() returns module-level singleton refs shared across the whole
// app (and this spec file) — reset them so state doesn't leak between tests.
const { feeds, showMessage, message, showModal } = useFeeds()
const { feeds, showMessage, message, showModal, viewMode, currentIndex } = useFeeds()
feeds.value = []
showMessage.value = false
message.value = ''
showModal.value = false
viewMode.value = 'list'
currentIndex.value = 0
})
it('fetches the current user articles and shows the empty state', async () => {
@@ -177,7 +179,9 @@ describe('RssFeeds', () => {
const wrapper = mount(RssFeeds)
await flushPromises()
await wrapper.find('.view-toggle__btn').trigger('click')
// The view-toggle button now lives in AppNav's hamburger menu, not here —
// switch modes directly through the shared composable, as AppNav would.
useFeeds().toggleViewMode()
await flushPromises()
expect(wrapper.find('.article-single .feed-title').text()).toBe('Article one')