fix: Fixes issue where lock screen would not use previously active theme (#2372)

This commit is contained in:
Mo
2023-07-26 15:50:08 -05:00
committed by GitHub
parent 86fc4c684d
commit d268c02ab3
88 changed files with 1118 additions and 716 deletions

View File

@@ -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',