From 43f0e8a9df2507a5c1c147899dd6d915400b5eb9 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 27 May 2025 13:05:18 -0400 Subject: [PATCH 1/3] fix: adjust min volume level Signed-off-by: Adam Setch --- src/renderer/components/settings/SystemSettings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/settings/SystemSettings.tsx b/src/renderer/components/settings/SystemSettings.tsx index 7b30b00b6..ab69ff850 100644 --- a/src/renderer/components/settings/SystemSettings.tsx +++ b/src/renderer/components/settings/SystemSettings.tsx @@ -106,7 +106,7 @@ export const SystemSettings: FC = () => { onClick={() => { const newVolume = Math.max( settings.notificationVolume - 10, - 0, + 10, ); updateSetting('notificationVolume', newVolume); }} From a22e456cdd61a585f9f4f675c2c3b000fc9f8b84 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 27 May 2025 13:11:17 -0400 Subject: [PATCH 2/3] refactor test suite grouping Signed-off-by: Adam Setch --- src/renderer/utils/notifications/native.test.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/renderer/utils/notifications/native.test.ts b/src/renderer/utils/notifications/native.test.ts index 6e33703aa..e1b1621be 100644 --- a/src/renderer/utils/notifications/native.test.ts +++ b/src/renderer/utils/notifications/native.test.ts @@ -133,14 +133,8 @@ describe('renderer/utils/notifications/native.ts', () => { native.raiseSoundNotification(); expect(window.Audio.prototype.play).toHaveBeenCalledTimes(1); }); - }); - - describe('triggerNativeNotifications', () => { - afterEach(() => { - jest.clearAllMocks(); - }); - it('should raise only sound notification with correct volume', () => { + it('should play notification sound with correct volume', () => { const settings: SettingsState = { ...defaultSettings, playSound: true, From 9aa22bc34f4db116da84de4572c40606d653fda6 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 27 May 2025 13:19:52 -0400 Subject: [PATCH 3/3] refactor test suite names Signed-off-by: Adam Setch --- src/renderer/components/settings/SystemSettings.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/settings/SystemSettings.test.tsx b/src/renderer/components/settings/SystemSettings.test.tsx index e4d669b6d..0a9d7d7d6 100644 --- a/src/renderer/components/settings/SystemSettings.test.tsx +++ b/src/renderer/components/settings/SystemSettings.test.tsx @@ -149,7 +149,7 @@ describe('renderer/components/settings/SystemSettings.tsx', () => { expect(screen.getByTestId('settings-volume-group')).not.toBeVisible(); }); - it('should increase playSound volume', async () => { + it('should increase notification volume', async () => { render( { expect(updateSetting).toHaveBeenCalledWith('notificationVolume', 30); }); - it('should decrease playSound volume', async () => { + it('should decrease notification volume', async () => { render( { expect(updateSetting).toHaveBeenCalledWith('notificationVolume', 10); }); - it('should reset playSound volume', async () => { + it('should reset notification volume', async () => { render(