-
Notifications
You must be signed in to change notification settings - Fork 285
Expand file tree
/
Copy pathstate-mocks.ts
More file actions
78 lines (68 loc) · 1.84 KB
/
state-mocks.ts
File metadata and controls
78 lines (68 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { Constants } from '../constants';
import {
type AppearanceSettingsState,
type AuthState,
FetchType,
type GitifyState,
GroupBy,
type NotificationSettingsState,
OpenPreference,
type Percentage,
type SettingsState,
type SystemSettingsState,
Theme,
type Token,
type TraySettingsState,
} from '../types';
import {
mockGitHubCloudAccount,
mockGitHubEnterpriseServerAccount,
} from './account-mocks';
export const mockAuth: AuthState = {
accounts: [mockGitHubCloudAccount, mockGitHubEnterpriseServerAccount],
};
export const mockToken = 'token-123-456' as Token;
const mockAppearanceSettings: AppearanceSettingsState = {
theme: Theme.SYSTEM,
increaseContrast: false,
zoomPercentage: 100 as Percentage,
showAccountHeader: false,
wrapNotificationTitle: false,
};
const mockNotificationSettings: NotificationSettingsState = {
groupBy: GroupBy.REPOSITORY,
fetchType: FetchType.INTERVAL,
fetchInterval: Constants.DEFAULT_FETCH_NOTIFICATIONS_INTERVAL_MS,
fetchAllNotifications: true,
detailedNotifications: true,
showPills: true,
showNumber: true,
participating: false,
fetchReadNotifications: false,
markAsDoneOnOpen: false,
markAsDoneOnUnsubscribe: false,
delayNotificationState: false,
};
const mockTraySettings: TraySettingsState = {
showNotificationsCountInTray: true,
useUnreadActiveIcon: true,
useAlternateIdleIcon: false,
};
const mockSystemSettings: SystemSettingsState = {
openLinks: OpenPreference.FOREGROUND,
keyboardShortcut: true,
showNotifications: true,
playSound: true,
notificationVolume: 20 as Percentage,
openAtStartup: false,
};
export const mockSettings: SettingsState = {
...mockAppearanceSettings,
...mockNotificationSettings,
...mockTraySettings,
...mockSystemSettings,
};
export const mockState: GitifyState = {
auth: mockAuth,
settings: mockSettings,
};