user.tsx 1018 B

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