chore: vault member permissions (#2509)

This commit is contained in:
Aman Harwara
2023-09-18 19:53:34 +05:30
committed by GitHub
parent 2af610c7bf
commit 48e7820100
32 changed files with 331 additions and 94 deletions

View File

@@ -10,6 +10,7 @@ import {
SNNote,
NoteType,
PayloadEmitSource,
VaultServiceInterface,
} from '@standardnotes/snjs'
import NoteView from './NoteView'
import { NoteViewController } from './Controller/NoteViewController'
@@ -19,6 +20,7 @@ describe('NoteView', () => {
let application: WebApplication
let notesController: NotesController
let vaults: VaultServiceInterface
const createNoteView = () =>
new NoteView({
@@ -36,9 +38,13 @@ describe('NoteView', () => {
notesController.getSpellcheckStateForNote = jest.fn()
notesController.getEditorWidthForNote = jest.fn()
vaults = {} as jest.Mocked<VaultServiceInterface>
vaults.getItemVault = jest.fn().mockReturnValue(undefined)
application = {
notesController,
noteViewController,
vaults,
} as unknown as jest.Mocked<WebApplication>
application.hasProtectionSources = jest.fn().mockReturnValue(true)