chore: enable vaults if dev mode or if user has role (#2483)

This commit is contained in:
Aman Harwara
2023-09-08 00:15:21 +05:30
committed by GitHub
parent 6724e1d79c
commit ec69e8041f
27 changed files with 64 additions and 43 deletions

View File

@@ -22,6 +22,7 @@ import { LinkingController } from './LinkingController'
import { NavigationController } from './Navigation/NavigationController'
import { SubscriptionController } from './Subscription/SubscriptionController'
import { getLinkingSearchResults } from '@/Utils/Items/Search/getSearchResults'
import { FeaturesController } from './FeaturesController'
const createNote = (name: string, options?: Partial<SNNote>) => {
return {
@@ -63,11 +64,13 @@ describe('LinkingController', () => {
itemListController: {} as jest.Mocked<ItemListController>,
filesController: {} as jest.Mocked<FilesController>,
subscriptionController: {} as jest.Mocked<SubscriptionController>,
featuresController: {} as jest.Mocked<FeaturesController>,
} as unknown as jest.Mocked<WebApplication>
application.getPreference = jest.fn()
application.addSingleEventObserver = jest.fn()
application.sync.sync = jest.fn()
application.featuresController.isEntitledToVaults = jest.fn().mockReturnValue(true)
Object.defineProperty(application, 'items', { value: {} as jest.Mocked<ItemManagerInterface> })
@@ -81,6 +84,7 @@ describe('LinkingController', () => {
application.filesController,
application.subscriptionController,
application.navigationController,
application.featuresController,
application.itemControllerGroup,
application.vaultDisplayService,
application.preferences,