119602: Add additional accessibilitySettingsComponent tests

This commit is contained in:
Andreas Awouters
2024-11-25 10:12:39 +01:00
parent ec016e80fb
commit deb4a63c88

View File

@@ -50,6 +50,10 @@ describe('AccessibilitySettingsComponent', () => {
it('should retrieve the current settings', () => {
expect(settingsService.getAll).toHaveBeenCalled();
});
it('should convert retrieved settings to form format', () => {
expect(settingsService.convertStoredValuesToFormValues).toHaveBeenCalled();
});
});
describe('saveSettings', () => {
@@ -59,6 +63,12 @@ describe('AccessibilitySettingsComponent', () => {
expect(settingsService.setSettings).toHaveBeenCalled();
});
it('should convert form settings to stored format', () => {
settingsService.setSettings = jasmine.createSpy('setSettings').and.returnValue(of('cookie'));
component.saveSettings();
expect(settingsService.convertFormValuesToStoredValues).toHaveBeenCalled();
});
it('should give the user a notification mentioning where the settings were saved', () => {
settingsService.setSettings = jasmine.createSpy('setSettings').and.returnValue(of('cookie'));
component.saveSettings();