test-user-email-data.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. writefullCommonsAccount: false,
  25. confirmed: true,
  26. id: 1,
  27. isUniversity: false,
  28. maxConfirmationMonths: null,
  29. name: 'Overleaf',
  30. ssoEnabled: false,
  31. ssoBeta: false,
  32. },
  33. inReconfirmNotificationPeriod: false,
  34. inferred: false,
  35. licence: 'pro_plus',
  36. pastReconfirmDate: false,
  37. portal: { slug: '', templates_count: 1 },
  38. role: 'Reader',
  39. },
  40. confirmedAt: '2022-03-09T10:59:44.139Z',
  41. email: 'foo@overleaf.com',
  42. default: true,
  43. }
  44. export const unconfirmedCommonsUserData: UserEmailData & {
  45. affiliation: Affiliation
  46. } = {
  47. affiliation: {
  48. cachedConfirmedAt: null,
  49. cachedEntitlement: null,
  50. cachedLastDayToReconfirm: null,
  51. cachedPastReconfirmDate: false,
  52. cachedReconfirmedAt: null,
  53. department: 'Art History',
  54. institution: {
  55. commonsAccount: true,
  56. writefullCommonsAccount: false,
  57. confirmed: true,
  58. id: 1,
  59. isUniversity: false,
  60. maxConfirmationMonths: null,
  61. name: 'Overleaf',
  62. ssoEnabled: false,
  63. ssoBeta: false,
  64. },
  65. inReconfirmNotificationPeriod: false,
  66. inferred: false,
  67. licence: 'free',
  68. pastReconfirmDate: false,
  69. portal: { slug: '', templates_count: 1 },
  70. role: 'Reader',
  71. },
  72. email: 'qux@overleaf.com',
  73. default: true,
  74. }
  75. export const ssoUserData: UserEmailData = {
  76. affiliation: {
  77. cachedConfirmedAt: '2022-02-03T11:46:28.249Z',
  78. cachedEntitlement: null,
  79. cachedLastDayToReconfirm: null,
  80. cachedPastReconfirmDate: false,
  81. cachedReconfirmedAt: null,
  82. department: 'Art History',
  83. institution: {
  84. commonsAccount: true,
  85. writefullCommonsAccount: false,
  86. confirmed: true,
  87. id: 2,
  88. isUniversity: true,
  89. maxConfirmationMonths: 12,
  90. name: 'SSO University',
  91. ssoEnabled: true,
  92. ssoBeta: false,
  93. },
  94. inReconfirmNotificationPeriod: false,
  95. inferred: false,
  96. licence: 'pro_plus',
  97. pastReconfirmDate: false,
  98. portal: { slug: '', templates_count: 0 },
  99. role: 'Prof',
  100. },
  101. confirmedAt: '2022-02-03T11:46:28.249Z',
  102. email: 'sso-prof@sso-university.edu',
  103. samlProviderId: 'sso-prof-saml-id',
  104. default: false,
  105. }
  106. export const fakeUsersData = [
  107. { ...confirmedUserData },
  108. { ...unconfirmedUserData },
  109. { ...professionalUserData },
  110. { ...unconfirmedCommonsUserData },
  111. ]