overleaf/services/web/test/frontend/features/file-tree/components/file-tree-create/context-props.js
Alf Eaton 609c4495f5 Check that user.refProviders[provider] is set to a truthy value (#4063)
* Ensure that user.refProviders is set to a truthy value

* Update stories

* Update tests

GitOrigin-RevId: 51919f755f6d3bcb9d3564685253222691b0d92b
2021-05-20 02:05:21 +00:00

26 lines
614 B
JavaScript

import sinon from 'sinon'
export const contextProps = {
projectId: 'test-project',
hasWritePermissions: true,
userHasFeature: () => true,
refProviders: { mendeley: false, zotero: false },
reindexReferences: () => {
console.log('reindex references')
},
setRefProviderEnabled: provider => {
console.log(`ref provider ${provider} enabled`)
},
setStartedFreeTrial: () => {
console.log('started free trial')
},
rootFolder: [
{
docs: [{ _id: 'entity-1' }],
fileRefs: [],
folders: [],
},
],
initialSelectedEntityId: 'entity-1',
onSelect: sinon.stub(),
}