Skip to content

Commit 5495ad7

Browse files
committed
test: add coverage settings
Signed-off-by: Adam Setch <[email protected]>
1 parent e446c42 commit 5495ad7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ describe('renderer/components/settings/SystemSettings.tsx', () => {
6464
expect(mockUpdateSetting).toHaveBeenCalledWith('playSound', false);
6565
});
6666

67+
it('volume controls should not be shown if playSound checkbox is false', async () => {
68+
renderWithAppContext(<SystemSettings />, {
69+
updateSetting: mockUpdateSetting,
70+
settings: { ...mockSettings, playSound: false },
71+
});
72+
73+
expect(screen.getByTestId('settings-volume-group')).not.toBeVisible();
74+
});
75+
76+
it('volume controls should be shown if playSound checkbox is true', async () => {
77+
renderWithAppContext(<SystemSettings />, {
78+
updateSetting: mockUpdateSetting,
79+
settings: { ...mockSettings, playSound: true },
80+
});
81+
82+
expect(screen.getByTestId('settings-volume-group')).toBeVisible();
83+
});
84+
6785
it('should increase notification volume', async () => {
6886
renderWithAppContext(<SystemSettings />, {
6987
updateSetting: mockUpdateSetting,

0 commit comments

Comments
 (0)