diff --git a/test/integration/platform_incompatibilities.js b/test/integration/platform_incompatibilities.js index 8359baad5..1c71fb0b2 100644 --- a/test/integration/platform_incompatibilities.js +++ b/test/integration/platform_incompatibilities.js @@ -228,5 +228,33 @@ suite('Platform incompatibilities', () => { 'dir2/sub:dir/file' ]) }) + + test('rename dir compatible -> incompatible -> compatible with compatible content', async () => { + const docs = await helpers.remote.createTree([ + 'dir/', + 'dir/file' + ]) + await helpers.pullAndSyncAll() + should(await helpers.local.tree()).deepEqual([ + 'dir/', + 'dir/file' + ]) + + await cozy.files.updateAttributesById(docs['dir/']._id, {name: 'd:ir'}) + await helpers.pullAndSyncAll() + should(await helpers.local.tree()).deepEqual([ + '/Trash/dir/', + '/Trash/dir/file' + ]) + + await cozy.files.updateAttributesById(docs['dir/']._id, {name: 'dir'}) + await helpers.pullAndSyncAll() + should(await helpers.local.tree()).deepEqual([ + '/Trash/dir/', + '/Trash/dir/file', + 'dir/' + // FIXME: 'dir/file' + ]) + }) } })