userDetails.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import {User} from 'sentry/types/user';
  2. export function UserDetailsFixture(params: Partial<User> = {}): User {
  3. return {
  4. username: 'billyfirefoxusername@test.com',
  5. emails: [
  6. {is_verified: false, id: '20', email: 'billyfirefox@test.com2'},
  7. {is_verified: true, id: '8', email: 'billyfirefox2@test.com'},
  8. {is_verified: false, id: '7', email: 'billyfirefox@test.com'},
  9. ],
  10. isManaged: false,
  11. lastActive: '2018-01-25T21:00:19.946Z',
  12. identities: [],
  13. id: '4',
  14. isStaff: false,
  15. isActive: true,
  16. isSuperuser: false,
  17. isAuthenticated: true,
  18. ip_address: '',
  19. has2fa: false,
  20. name: 'Firefox Billy',
  21. avatarUrl:
  22. 'https://secure.gravatar.com/avatar/5df53e28e63099658c1ba89b8e9a7cf4?s=32&d=mm',
  23. authenticators: [],
  24. dateJoined: '2018-01-11T00:30:41.366Z',
  25. options: {
  26. timezone: 'UTC',
  27. stacktraceOrder: 1,
  28. language: 'en',
  29. clock24Hours: false,
  30. defaultIssueEvent: 'recommended',
  31. avatarType: 'gravatar',
  32. theme: 'light',
  33. prefersIssueDetailsStreamlinedUI: false,
  34. },
  35. avatar: {avatarUuid: null, avatarType: 'letter_avatar'},
  36. lastLogin: '2018-01-25T19:57:46.973Z',
  37. permissions: new Set(),
  38. email: 'billyfirefox@test.com',
  39. canReset2fa: false,
  40. experiments: [],
  41. flags: {newsletter_consent_prompt: false},
  42. hasPasswordAuth: false,
  43. ...params,
  44. };
  45. }