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

Desktop,Mobile: Resolves #10073, #10080: Fix conflicts notebook doesn't work with the trash feature (#10104)

This commit is contained in:
Henry Heino
2024-03-14 11:30:49 -07:00
committed by GitHub
parent 8eea3953f3
commit c16ce1c434
16 changed files with 193 additions and 15 deletions

View File

@ -88,4 +88,15 @@ describe('restoreItems', () => {
expect(noteReloaded.parent_id).toBe(folderReloaded2.id);
});
it('should restore a conflict', async () => {
const note = await Note.save({ is_conflict: 1, title: 'Test' });
await Note.delete(note.id, { toTrash: true });
await restoreItems(ModelType.Note, [await Note.load(note.id)]);
const noteReloaded = await Note.load(note.id);
expect(noteReloaded.title).toBe('Test');
expect(noteReloaded.is_conflict).toBe(1);
expect(noteReloaded.deleted_time).toBe(0);
});
});