feat: calendar invitations RSVP, trust assessment, file preview

This commit is contained in:
Linus Rath
2026-03-16 22:00:11 +01:00
parent cde1d61d02
commit 0f5d030d5f
32 changed files with 21143 additions and 279 deletions
@@ -0,0 +1,32 @@
import { beforeEach, describe, expect, it } from 'vitest';
import { useSettingsStore } from '../settings-store';
describe('settings-store attachment action', () => {
beforeEach(() => {
useSettingsStore.getState().resetToDefaults();
});
it('defaults to preview when settings are reset', () => {
expect(useSettingsStore.getState().mailAttachmentAction).toBe('preview');
});
it('includes the attachment action in exported settings', () => {
useSettingsStore.getState().updateSetting('mailAttachmentAction', 'download');
const exported = JSON.parse(useSettingsStore.getState().exportSettings()) as {
mailAttachmentAction?: string;
};
expect(exported.mailAttachmentAction).toBe('download');
});
it('includes calendar invitation parsing in exported settings', () => {
useSettingsStore.getState().updateSetting('calendarInvitationParsingEnabled', false);
const exported = JSON.parse(useSettingsStore.getState().exportSettings()) as {
calendarInvitationParsingEnabled?: boolean;
};
expect(exported.calendarInvitationParsingEnabled).toBe(false);
});
});