test-user-email-data.ts 2.9 KB

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