(params: Partial<User> = {})
| 1 | import type {User} from 'sentry/types/user'; |
| 2 | |
| 3 | export function UserFixture(params: Partial<User> = {}): User { |
| 4 | return { |
| 5 | id: '1', |
| 6 | username: 'foo@example.com', |
| 7 | email: 'foo@example.com', |
| 8 | name: 'Foo Bar', |
| 9 | isAuthenticated: true, |
| 10 | options: { |
| 11 | clock24Hours: false, |
| 12 | timezone: 'UTC', |
| 13 | language: 'en', |
| 14 | theme: 'system', |
| 15 | defaultIssueEvent: 'recommended', |
| 16 | avatarType: 'letter_avatar', |
| 17 | stacktraceOrder: -1, |
| 18 | prefersIssueDetailsStreamlinedUI: true, |
| 19 | }, |
| 20 | ip_address: '127.0.0.1', |
| 21 | hasPasswordAuth: true, |
| 22 | authenticators: [], |
| 23 | canReset2fa: false, |
| 24 | dateJoined: '2020-01-01T00:00:00.000Z', |
| 25 | emails: [], |
| 26 | has2fa: false, |
| 27 | identities: [], |
| 28 | isActive: false, |
| 29 | isManaged: false, |
| 30 | isStaff: false, |
| 31 | isSuperuser: false, |
| 32 | isSuspended: false, |
| 33 | lastActive: '2020-01-01T00:00:00.000Z', |
| 34 | lastLogin: '2020-01-01T00:00:00.000Z', |
| 35 | permissions: new Set(), |
| 36 | flags: { |
| 37 | newsletter_consent_prompt: false, |
| 38 | }, |
| 39 | ...params, |
| 40 | }; |
| 41 | } |
no outgoing calls