Skip to content

Commit b5779ac

Browse files
authored
fix: adjust min volume level (#2033)
* fix: adjust min volume level Signed-off-by: Adam Setch <[email protected]> * refactor test suite grouping Signed-off-by: Adam Setch <[email protected]> * refactor test suite names Signed-off-by: Adam Setch <[email protected]> --------- Signed-off-by: Adam Setch <[email protected]>
1 parent c9f643e commit b5779ac

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/renderer/components/settings/SystemSettings.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('renderer/components/settings/SystemSettings.tsx', () => {
149149
expect(screen.getByTestId('settings-volume-group')).not.toBeVisible();
150150
});
151151

152-
it('should increase playSound volume', async () => {
152+
it('should increase notification volume', async () => {
153153
render(
154154
<AppContext.Provider
155155
value={{
@@ -170,7 +170,7 @@ describe('renderer/components/settings/SystemSettings.tsx', () => {
170170
expect(updateSetting).toHaveBeenCalledWith('notificationVolume', 30);
171171
});
172172

173-
it('should decrease playSound volume', async () => {
173+
it('should decrease notification volume', async () => {
174174
render(
175175
<AppContext.Provider
176176
value={{
@@ -191,7 +191,7 @@ describe('renderer/components/settings/SystemSettings.tsx', () => {
191191
expect(updateSetting).toHaveBeenCalledWith('notificationVolume', 10);
192192
});
193193

194-
it('should reset playSound volume', async () => {
194+
it('should reset notification volume', async () => {
195195
render(
196196
<AppContext.Provider
197197
value={{

src/renderer/components/settings/SystemSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const SystemSettings: FC = () => {
106106
onClick={() => {
107107
const newVolume = Math.max(
108108
settings.notificationVolume - 10,
109-
0,
109+
10,
110110
);
111111
updateSetting('notificationVolume', newVolume);
112112
}}

src/renderer/utils/notifications/native.test.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,8 @@ describe('renderer/utils/notifications/native.ts', () => {
133133
native.raiseSoundNotification();
134134
expect(window.Audio.prototype.play).toHaveBeenCalledTimes(1);
135135
});
136-
});
137-
138-
describe('triggerNativeNotifications', () => {
139-
afterEach(() => {
140-
jest.clearAllMocks();
141-
});
142136

143-
it('should raise only sound notification with correct volume', () => {
137+
it('should play notification sound with correct volume', () => {
144138
const settings: SettingsState = {
145139
...defaultSettings,
146140
playSound: true,

0 commit comments

Comments
 (0)