fix: Fixes issue where lock screen would not use previously active theme (#2372)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { WebApplication } from '@/Application/WebApplication'
|
||||
import { ContentType } from '@standardnotes/domain-core'
|
||||
import {
|
||||
MutatorService,
|
||||
SNComponentManager,
|
||||
SNComponent,
|
||||
SNTag,
|
||||
@@ -11,7 +10,7 @@ import {
|
||||
ItemManagerInterface,
|
||||
MutatorClientInterface,
|
||||
} from '@standardnotes/snjs'
|
||||
import { FeatureIdentifier, NoteType } from '@standardnotes/features'
|
||||
import { NativeFeatureIdentifier, NoteType } from '@standardnotes/features'
|
||||
import { NoteViewController } from './NoteViewController'
|
||||
|
||||
describe('note view controller', () => {
|
||||
@@ -40,7 +39,9 @@ describe('note view controller', () => {
|
||||
})
|
||||
|
||||
it('should create notes with plaintext note type', async () => {
|
||||
application.componentManager.getDefaultEditorIdentifier = jest.fn().mockReturnValue(FeatureIdentifier.PlainEditor)
|
||||
application.componentManager.getDefaultEditorIdentifier = jest
|
||||
.fn()
|
||||
.mockReturnValue(NativeFeatureIdentifier.TYPES.PlainEditor)
|
||||
|
||||
const controller = new NoteViewController(application)
|
||||
await controller.initialize()
|
||||
@@ -55,13 +56,13 @@ describe('note view controller', () => {
|
||||
it('should create notes with markdown note type', async () => {
|
||||
application.items.getDisplayableComponents = jest.fn().mockReturnValue([
|
||||
{
|
||||
identifier: FeatureIdentifier.MarkdownProEditor,
|
||||
identifier: NativeFeatureIdentifier.TYPES.MarkdownProEditor,
|
||||
} as SNComponent,
|
||||
])
|
||||
|
||||
application.componentManager.getDefaultEditorIdentifier = jest
|
||||
.fn()
|
||||
.mockReturnValue(FeatureIdentifier.MarkdownProEditor)
|
||||
.mockReturnValue(NativeFeatureIdentifier.TYPES.MarkdownProEditor)
|
||||
|
||||
const controller = new NoteViewController(application)
|
||||
await controller.initialize()
|
||||
@@ -74,7 +75,9 @@ describe('note view controller', () => {
|
||||
})
|
||||
|
||||
it('should add tag to note if default tag is set', async () => {
|
||||
application.componentManager.getDefaultEditorIdentifier = jest.fn().mockReturnValue(FeatureIdentifier.PlainEditor)
|
||||
application.componentManager.getDefaultEditorIdentifier = jest
|
||||
.fn()
|
||||
.mockReturnValue(NativeFeatureIdentifier.TYPES.PlainEditor)
|
||||
|
||||
const tag = {
|
||||
uuid: 'tag-uuid',
|
||||
|
||||
Reference in New Issue
Block a user