diff --git a/src/__mocks__/mock-state.ts b/src/__mocks__/mock-state.ts index 6594be1d0..4a930d0e7 100644 --- a/src/__mocks__/mock-state.ts +++ b/src/__mocks__/mock-state.ts @@ -15,7 +15,7 @@ export const mockSettings: SettingsState = { showNotificationsCountInTray: false, openAtStartup: false, theme: Theme.SYSTEM, - detailedNotifications: false, + detailedNotifications: true, markAsDoneOnOpen: false, showAccountHostname: false, delayNotificationState: false, diff --git a/src/context/App.test.tsx b/src/context/App.test.tsx index f687aeed8..bf8c297f7 100644 --- a/src/context/App.test.tsx +++ b/src/context/App.test.tsx @@ -330,7 +330,7 @@ describe('context/App.tsx', () => { showNotificationsCountInTray: false, openAtStartup: false, theme: 'SYSTEM', - detailedNotifications: false, + detailedNotifications: true, markAsDoneOnOpen: false, showAccountHostname: false, delayNotificationState: false, @@ -375,7 +375,7 @@ describe('context/App.tsx', () => { showNotificationsCountInTray: false, openAtStartup: true, theme: 'SYSTEM', - detailedNotifications: false, + detailedNotifications: true, markAsDoneOnOpen: false, showAccountHostname: false, delayNotificationState: false, diff --git a/src/context/App.tsx b/src/context/App.tsx index 45eacda12..77c32fe23 100644 --- a/src/context/App.tsx +++ b/src/context/App.tsx @@ -41,7 +41,7 @@ export const defaultSettings: SettingsState = { showNotificationsCountInTray: false, openAtStartup: false, theme: Theme.SYSTEM, - detailedNotifications: false, + detailedNotifications: true, markAsDoneOnOpen: false, showAccountHostname: false, delayNotificationState: false, diff --git a/src/hooks/useNotifications.test.ts b/src/hooks/useNotifications.test.ts index 11b96b296..29e4be3bd 100644 --- a/src/hooks/useNotifications.test.ts +++ b/src/hooks/useNotifications.test.ts @@ -34,7 +34,10 @@ describe('hooks/useNotifications.ts', () => { const { result } = renderHook(() => useNotifications()); act(() => { - result.current.fetchNotifications(mockAccounts, mockSettings); + result.current.fetchNotifications(mockAccounts, { + ...mockSettings, + detailedNotifications: false, + }); }); expect(result.current.status).toBe('loading'); @@ -116,7 +119,10 @@ describe('hooks/useNotifications.ts', () => { const { result } = renderHook(() => useNotifications()); act(() => { - result.current.fetchNotifications(accounts, mockSettings); + result.current.fetchNotifications(accounts, { + ...mockSettings, + detailedNotifications: false, + }); }); await waitFor(() => { @@ -179,7 +185,10 @@ describe('hooks/useNotifications.ts', () => { const { result } = renderHook(() => useNotifications()); act(() => { - result.current.fetchNotifications(accounts, mockSettings); + result.current.fetchNotifications(accounts, { + ...mockSettings, + detailedNotifications: false, + }); }); await waitFor(() => { @@ -417,7 +426,10 @@ describe('hooks/useNotifications.ts', () => { const { result } = renderHook(() => useNotifications()); act(() => { - result.current.fetchNotifications(mockAccounts, mockSettings); + result.current.fetchNotifications(mockAccounts, { + ...mockSettings, + detailedNotifications: false, + }); }); await waitFor(() => { diff --git a/src/routes/Settings.test.tsx b/src/routes/Settings.test.tsx index 9f2566057..3484ef88d 100644 --- a/src/routes/Settings.test.tsx +++ b/src/routes/Settings.test.tsx @@ -113,7 +113,10 @@ describe('routes/Settings.tsx', () => { fireEvent.click(screen.getByLabelText('Detailed notifications')); expect(updateSetting).toHaveBeenCalledTimes(1); - expect(updateSetting).toHaveBeenCalledWith('detailedNotifications', true); + expect(updateSetting).toHaveBeenCalledWith( + 'detailedNotifications', + false, + ); }); }); diff --git a/src/routes/__snapshots__/Settings.test.tsx.snap b/src/routes/__snapshots__/Settings.test.tsx.snap index ad0209460..212b00039 100644 --- a/src/routes/__snapshots__/Settings.test.tsx.snap +++ b/src/routes/__snapshots__/Settings.test.tsx.snap @@ -133,6 +133,7 @@ exports[`routes/Settings.tsx General should render itself & its children 1`] = ` class="flex items-center h-5" > @@ -277,7 +277,6 @@ exports[`routes/Settings.tsx General should render itself & its children 1`] = `