account-info.js 698 B

12345678910111213141516171819
  1. const MOCK_DELAY = 1000
  2. export function defaultSetupMocks(fetchMock) {
  3. fetchMock.post(/\/user\/settings/, 200, {
  4. delay: MOCK_DELAY,
  5. })
  6. }
  7. export function setDefaultMeta() {
  8. window.metaAttributesCache = window.metaAttributesCache || new Map()
  9. window.metaAttributesCache.set('ol-usersEmail', 'sherlock@holmes.co.uk')
  10. window.metaAttributesCache.set('ol-firstName', 'Sherlock')
  11. window.metaAttributesCache.set('ol-lastName', 'Holmes')
  12. window.metaAttributesCache.set('ol-ExposedSettings', {
  13. hasAffiliationsFeature: false,
  14. })
  15. window.metaAttributesCache.set('ol-isExternalAuthenticationSystemUsed', false)
  16. window.metaAttributesCache.set('ol-shouldAllowEditingDetails', true)
  17. }