1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

All: Fixes #11934: Restoring a note which was in a deleted notebook (#12016)

This commit is contained in:
Laurent Cozic
2025-03-27 21:55:36 +01:00
committed by GitHub
parent 44d1e9e3ca
commit 0bc62aa05e
2 changed files with 12 additions and 1 deletions

View File

@ -50,6 +50,7 @@ describe('stateToWhenClauseContext', () => {
it('should be in trash if command folder is deleted', async () => {
const applicationState = {
notes: [],
notesParentType: 'Folder',
folders: [
{ id: '1', deleted_time: 1722567036580, share_id: '', parent_id: '' },
],
@ -71,4 +72,14 @@ describe('stateToWhenClauseContext', () => {
expect(resultingState.inTrash).toBe(false);
});
it('should not be in trash if viewing all notes', async () => {
const applicationState = {
selectedFolderId: 'folder',
notesParentType: 'SmartFolder',
} as State;
const resultingState = stateToWhenClauseContext(applicationState);
expect(resultingState.inTrash).toBe(false);
});
});