overleaf/services/web/frontend/stories/settings/helpers/account-info.js
Timothée Alby cf2dfc6bf1 Merge pull request #7593 from overleaf/ta-settings-migration
[SettingsPage] Integration Branch

GitOrigin-RevId: 5a3c26b2a02d716c4ae3981e3f08b811ae307725
2022-04-25 08:05:12 +00:00

19 lines
698 B
JavaScript

const MOCK_DELAY = 1000
export function defaultSetupMocks(fetchMock) {
fetchMock.post(/\/user\/settings/, 200, {
delay: MOCK_DELAY,
})
}
export function setDefaultMeta() {
window.metaAttributesCache = window.metaAttributesCache || new Map()
window.metaAttributesCache.set('ol-usersEmail', 'sherlock@holmes.co.uk')
window.metaAttributesCache.set('ol-firstName', 'Sherlock')
window.metaAttributesCache.set('ol-lastName', 'Holmes')
window.metaAttributesCache.set('ol-ExposedSettings', {
hasAffiliationsFeature: false,
})
window.metaAttributesCache.set('ol-isExternalAuthenticationSystemUsed', false)
window.metaAttributesCache.set('ol-shouldAllowEditingDetails', true)
}