test-user-email-data.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import { UserEmailData } from '../../../../../types/user-email'
  2. import { Affiliation } from '../../../../../types/affiliation'
  3. export const confirmedUserData: UserEmailData = {
  4. confirmedAt: '2022-03-10T10:59:44.139Z',
  5. email: 'bar@overleaf.com',
  6. default: false,
  7. }
  8. export const unconfirmedUserData: UserEmailData = {
  9. email: 'baz@overleaf.com',
  10. default: false,
  11. }
  12. export const professionalUserData: UserEmailData & {
  13. affiliation: Affiliation
  14. } = {
  15. affiliation: {
  16. cachedConfirmedAt: null,
  17. cachedEntitlement: null,
  18. cachedLastDayToReconfirm: null,
  19. cachedPastReconfirmDate: false,
  20. cachedReconfirmedAt: null,
  21. department: 'Art History',
  22. institution: {
  23. commonsAccount: false,
  24. confirmed: true,
  25. id: 1,
  26. isUniversity: false,
  27. maxConfirmationMonths: null,
  28. name: 'Overleaf',
  29. ssoEnabled: false,
  30. ssoBeta: false,
  31. },
  32. inReconfirmNotificationPeriod: false,
  33. inferred: false,
  34. licence: 'pro_plus',
  35. pastReconfirmDate: false,
  36. portal: { slug: '', templates_count: 1 },
  37. role: 'Reader',
  38. },
  39. confirmedAt: '2022-03-09T10:59:44.139Z',
  40. email: 'foo@overleaf.com',
  41. default: true,
  42. }
  43. export const ssoUserData: UserEmailData = {
  44. affiliation: {
  45. cachedConfirmedAt: '2022-02-03T11:46:28.249Z',
  46. cachedEntitlement: null,
  47. cachedLastDayToReconfirm: null,
  48. cachedPastReconfirmDate: false,
  49. cachedReconfirmedAt: null,
  50. department: 'Art History',
  51. institution: {
  52. commonsAccount: true,
  53. confirmed: true,
  54. id: 2,
  55. isUniversity: true,
  56. maxConfirmationMonths: 12,
  57. name: 'SSO University',
  58. ssoEnabled: true,
  59. ssoBeta: false,
  60. },
  61. inReconfirmNotificationPeriod: false,
  62. inferred: false,
  63. licence: 'pro_plus',
  64. pastReconfirmDate: false,
  65. portal: { slug: '', templates_count: 0 },
  66. role: 'Prof',
  67. },
  68. confirmedAt: '2022-02-03T11:46:28.249Z',
  69. email: 'sso-prof@sso-university.edu',
  70. samlProviderId: 'sso-prof-saml-id',
  71. default: false,
  72. }
  73. export const fakeUsersData = [
  74. { ...confirmedUserData },
  75. { ...unconfirmedUserData },
  76. { ...professionalUserData },
  77. ]