diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1298438219..a35643149d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -135,7 +135,7 @@ jobs: node-version: 14.x npm-version: 7.x - name: ${{ matrix.browsers }} bm@${{ matrix.app-version }} ${{matrix.floccus-adapter}}:${{ matrix.test-name}} + name: ${{ matrix.browsers }} ${{matrix.floccus-adapter}}:${{ matrix.test-name}} bm@${{ matrix.app-version }} services: hub: diff --git a/src/lib/Account.ts b/src/lib/Account.ts index 49d1c90d83..3096de4bf4 100644 --- a/src/lib/Account.ts +++ b/src/lib/Account.ts @@ -202,7 +202,7 @@ export default class Account { mappings, localResource, this.server, - async (progress) => { + async(progress) => { if (!this.syncing) { return } diff --git a/src/lib/strategies/Default.ts b/src/lib/strategies/Default.ts index 4ddb795085..419082a474 100644 --- a/src/lib/strategies/Default.ts +++ b/src/lib/strategies/Default.ts @@ -64,12 +64,18 @@ export default class SyncProcess { setState({localTreeRoot, cacheTreeRoot, serverTreeRoot, localPlan, doneLocalPlan, serverPlan, doneServerPlan, serverReorderPlan, localReorderPlan, flagLocalPostMoveMapping, flagServerPostMoveMapping, flagPostReorderReconciliation}: any) { if (typeof localTreeRoot !== 'undefined') { this.localTreeRoot = Folder.hydrate(localTreeRoot) + } else { + throw new Error('No localTreeRoot found in continuation') } if (typeof cacheTreeRoot !== 'undefined') { this.cacheTreeRoot = Folder.hydrate(cacheTreeRoot) + } else { + throw new Error('No cacheTreeRoot found in continuation') } if (typeof serverTreeRoot !== 'undefined') { this.serverTreeRoot = Folder.hydrate(serverTreeRoot) + } else { + throw new Error('No serverTreeRoot found in continuation') } if (typeof localPlan !== 'undefined') { this.localPlan = Diff.fromJSON(localPlan) diff --git a/src/test/test.js b/src/test/test.js index 2e1a49b59a..1421492db3 100644 --- a/src/test/test.js +++ b/src/test/test.js @@ -304,7 +304,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server on local changes', async function() { @@ -359,7 +359,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server on local removals', async function() { @@ -408,7 +408,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server on local folder moves', async function() { @@ -462,7 +462,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should create server bookmarks locally', async function() { @@ -508,7 +508,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update local bookmarks on server changes', async function() { @@ -570,7 +570,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update local bookmarks on server removals', async function() { @@ -621,7 +621,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should not delete additions while sync is running', async function() { @@ -680,7 +680,7 @@ describe('Floccus', function() { }), ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should be able to handle duplicates', async function() { @@ -732,7 +732,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should deduplicate unnormalized URLs', async function() { @@ -807,7 +807,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should deduplicate unnormalized URLs without getting stuck', async function() { @@ -869,7 +869,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should not fail when moving both folders and contents', async function() { @@ -924,23 +924,14 @@ describe('Floccus', function() { new Bookmark({ title: 'url', url: 'http://ur.l/' }), new Folder({ title: 'foo', - children: - ACCOUNT_DATA.type !== 'nextcloud-legacy' - ? [] - : [ - // This is because of a peculiarity of the legacy adapter - new Bookmark({ - title: 'test', - url: 'http://ureff.l/' - }) - ] + children: [], }), new Bookmark({ title: 'test', url: 'http://ureff.l/' }), ] }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should not fail when both moving folders and deleting their contents', async function() { @@ -1012,7 +1003,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should handle strange characters well', async function() { @@ -1062,7 +1053,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should be able to delete a server folder', async function() { @@ -1102,7 +1093,7 @@ describe('Floccus', function() { title: tree.title, children: [] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should be able to delete a local folder', async function() { @@ -1146,7 +1137,7 @@ describe('Floccus', function() { title: tree.title, children: [] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should be ok if both server and local bookmark are removed', async function() { @@ -1224,7 +1215,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const localTree = await account.localTree.getBookmarksTree(true) @@ -1242,7 +1233,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should move items successfully even into new folders', async function() { @@ -1300,7 +1291,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const localTree = await account.localTree.getBookmarksTree(true) @@ -1326,7 +1317,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should move items successfully when mixing creation and moving (1)', async function() { @@ -1398,7 +1389,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const localTree = await account.localTree.getBookmarksTree(true) @@ -1433,7 +1424,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should move items successfully when mixing creation and moving (2)', async function() { @@ -1522,7 +1513,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const localTree = await account.localTree.getBookmarksTree(true) @@ -1566,7 +1557,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should move items without creating a folder loop', async function() { @@ -1636,7 +1627,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const localTree = await account.localTree.getBookmarksTree(true) @@ -1644,7 +1635,7 @@ describe('Floccus', function() { expectTreeEqual( localTree, tree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should integrate existing items from both sides', async function() { @@ -1727,7 +1718,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA), + false, false /* checkOrder */ ) @@ -1757,7 +1748,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA), + false, false /* checkOrder */ ) @@ -1869,7 +1860,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) @@ -1896,7 +1887,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) }) @@ -1962,7 +1953,7 @@ describe('Floccus', function() { ]}), ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) expectTreeEqual( tree, @@ -1979,7 +1970,7 @@ describe('Floccus', function() { ]}), ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('initial sync done') @@ -2010,7 +2001,7 @@ describe('Floccus', function() { new Bookmark({title: '-----', url: 'https://separator.floccus.org/?id=379999'}) ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree = await getAllBookmarks(account) expectTreeEqual( @@ -2028,7 +2019,7 @@ describe('Floccus', function() { new Bookmark({title: '-----', url: 'https://separator.floccus.org/?id=467366'}) ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should sync separators 2', async function() { @@ -2093,7 +2084,7 @@ describe('Floccus', function() { ]}), ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) expectTreeEqual( tree, @@ -2110,7 +2101,7 @@ describe('Floccus', function() { ]}), ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('initial sync done') @@ -2138,7 +2129,7 @@ describe('Floccus', function() { ]}), ]}), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should sync root folder successfully', async function() { @@ -2175,7 +2166,7 @@ describe('Floccus', function() { expectTreeEqual( tree, newRoot, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) // Switch it back to something harmless, so we don't attempt to clean up the root folder @@ -2250,9 +2241,6 @@ describe('Floccus', function() { account = await Account.get(account.id) }) it('should synchronize ordering', async function() { - if (ACCOUNT_DATA.type === 'nextcloud-legacy') { - this.skip() - } if (ACCOUNT_DATA.noCache) { return this.skip() } @@ -2421,7 +2409,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it("shouldn't update the server on local removals", async function() { @@ -2457,7 +2445,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it("shouldn't update the server on local folder moves", async function() { @@ -2500,7 +2488,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should create server bookmarks locally', async function() { @@ -2545,7 +2533,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update local bookmarks on server changes', async function() { @@ -2607,7 +2595,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update local bookmarks on server removals', async function() { @@ -2654,7 +2642,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should sync root folder ignoring unsupported folders', async function() { @@ -2728,9 +2716,6 @@ describe('Floccus', function() { }) }) context('with overwrite mode', function() { - before(function() { - if (ACCOUNT_DATA.type === 'nextcloud-legacy') return this.skip() - }) it('should create local bookmarks on the server', async function() { await account.setData({ ...account.getData(), @@ -2776,7 +2761,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should create local bookmarks on the server respecting moves', async function() { @@ -2824,7 +2809,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const bazFolder = await browser.bookmarks.create({ @@ -2867,7 +2852,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server on local changes', async function() { @@ -2911,7 +2896,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server on local removals', async function() { @@ -2951,7 +2936,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server on local folder moves', async function() { @@ -2998,7 +2983,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it("shouldn't create server bookmarks locally", async function() { @@ -3031,7 +3016,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it("shouldn't update local bookmarks on server changes", async function() { @@ -3076,7 +3061,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it("shouldn't update local bookmarks on server removals", async function() { @@ -3115,7 +3100,7 @@ describe('Floccus', function() { expectTreeEqual( tree, originalTree, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) }) @@ -3278,7 +3263,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) const tree1AfterSyncing = await account1.localTree.getBookmarksTree( @@ -3290,13 +3275,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSyncing, tree2AfterSyncing, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterSyncing.title = serverTreeAfterSyncing.title expectTreeEqual( tree2AfterSyncing, serverTreeAfterSyncing, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should overtake moves to a different client', async function() { @@ -3329,19 +3314,19 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('First round ok') @@ -3363,13 +3348,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSecondSync, tree1BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterSecondSync.title = tree1AfterSecondSync.title expectTreeEqual( serverTreeAfterSecondSync, tree1AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round first half ok') @@ -3383,13 +3368,13 @@ describe('Floccus', function() { expectTreeEqual( tree2AfterThirdSync, tree1AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterThirdSync.title = tree2AfterThirdSync.title expectTreeEqual( serverTreeAfterThirdSync, tree2AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round second half ok') @@ -3404,13 +3389,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterThirdSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterThirdSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should handle creations inside deletions gracefully', async function() { @@ -3445,19 +3430,19 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('First round ok') @@ -3491,13 +3476,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterThirdSync, tree2BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterThirdSync.title = tree2BeforeSecondSync.title expectTreeEqual( serverTreeAfterThirdSync, tree2BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round second half ok') @@ -3514,13 +3499,13 @@ describe('Floccus', function() { expectTreeEqual( tree2AfterFinalSync, tree2BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2BeforeSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( serverTreeAfterFinalSync, tree2BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should handle duplicate bookmarks in different serverRoot folders', async function() { @@ -3592,12 +3577,12 @@ describe('Floccus', function() { expectTreeEqual( serverTree1, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) expectTreeEqual( tree2AfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should handle concurrent hierarchy reversals', async function() { @@ -3641,19 +3626,19 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('First round ok') @@ -3687,7 +3672,7 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterThirdSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round second half ok') @@ -3705,13 +3690,13 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterFinalSync, tree2AfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree1AfterThirdSync.title = tree2AfterFinalSync.title expectTreeEqual( tree2AfterFinalSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should handle complex hierarchy reversals', async function() { @@ -3776,21 +3761,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) console.log('First round ok') @@ -3834,7 +3819,7 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterThirdSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) @@ -3853,14 +3838,14 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterFinalSync, tree2AfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) tree1AfterThirdSync.title = tree2AfterFinalSync.title expectTreeEqual( tree2AfterFinalSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) }) @@ -3916,19 +3901,22 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) console.log('First round ok') @@ -3976,7 +3964,8 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterThirdSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) console.log('Second round second half ok') @@ -3994,13 +3983,15 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterFinalSync, tree2AfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) tree1AfterThirdSync.title = tree2AfterFinalSync.title expectTreeEqual( tree2AfterFinalSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) }) it('should handle faux hierarchy reversals', async function() { @@ -4052,19 +4043,22 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) console.log('First round ok') @@ -4124,7 +4118,8 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterThirdSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) console.log('Second round second half ok') @@ -4142,13 +4137,15 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterFinalSync, tree2AfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) tree1AfterThirdSync.title = tree2AfterFinalSync.title expectTreeEqual( tree2AfterFinalSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false, + false ) }) it('should handle complex move-remove interactions', async function() { @@ -4196,21 +4193,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) console.log('First round ok') @@ -4245,7 +4242,7 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterThirdSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) @@ -4264,19 +4261,18 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterFinalSync, tree2AfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) tree1AfterThirdSync.title = tree2AfterFinalSync.title expectTreeEqual( tree2AfterFinalSync, tree1AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA), + false, false ) }) it('should synchronize ordering', async function() { - if (ACCOUNT_DATA.type === 'nextcloud-legacy') return this.skip() expect( (await getAllBookmarks(account1)).children ).to.have.lengthOf(0) @@ -4403,19 +4399,19 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterFirstSync.title = tree1.title expectTreeEqual( serverTreeAfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterFirstSync.title = tree1.title expectTreeEqual( tree2AfterFirstSync, tree1, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('First round ok') @@ -4436,13 +4432,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSecondSync, tree1BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterSecondSync.title = tree1AfterSecondSync.title expectTreeEqual( serverTreeAfterSecondSync, tree1AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round first half ok') @@ -4464,13 +4460,13 @@ describe('Floccus', function() { expectTreeEqual( tree2AfterThirdSync, tree2BeforeThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterThirdSync.title = tree2AfterThirdSync.title expectTreeEqual( serverTreeAfterThirdSync, tree2AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round second half ok') @@ -4484,13 +4480,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterThirdSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterThirdSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) }) @@ -4588,7 +4584,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should create server bookmarks as tabs', async function() { @@ -4632,7 +4628,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update the server when pushing local changes', async function() { @@ -4670,7 +4666,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) await browser.tabs.update(tab.id, {url: 'https://example.org'}) @@ -4694,7 +4690,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) it('should update local tabs when pulling server changes', async function() { @@ -4738,7 +4734,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) let serverMark2 @@ -4775,7 +4771,7 @@ describe('Floccus', function() { }) ] }), - ignoreEmptyFolders(ACCOUNT_DATA) + false ) }) }) @@ -4948,19 +4944,19 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterFirstSync.title = tree1Initial.title expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) } serverTreeAfterFirstSync = null @@ -4988,13 +4984,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSecondSync, tree1BeforeSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterSecondSync.title = tree1AfterSecondSync.title expectTreeEqual( serverTreeAfterSecondSync, tree1AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) } tree1BeforeSecondSync = null @@ -5013,13 +5009,13 @@ describe('Floccus', function() { expectTreeEqual( tree2AfterThirdSync, tree1AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterThirdSync.title = tree2AfterThirdSync.title expectTreeEqual( serverTreeAfterThirdSync, tree2AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) } serverTreeAfterThirdSync = null @@ -5038,13 +5034,13 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterThirdSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterThirdSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterThirdSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) } serverTreeAfterFinalSync = null @@ -5101,7 +5097,7 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: first tree ok') @@ -5109,14 +5105,14 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: server tree ok') tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5142,14 +5138,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('first tree ok') tree2AfterFirstSync.title = serverTreeAfterFirstSync.title expectTreeEqual( tree2AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5175,14 +5171,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, tree1BeforeSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: local tree tree ok') serverTreeAfterSync.title = tree1AfterSync.title expectTreeEqual( serverTreeAfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: server tree tree ok') } @@ -5203,14 +5199,14 @@ describe('Floccus', function() { expectTreeEqual( tree2AfterSecondSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second local tree tree ok') serverTreeAfterSecondSync.title = tree2AfterSecondSync.title expectTreeEqual( serverTreeAfterSecondSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second server tree tree ok') } @@ -5231,14 +5227,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: local tree tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: server tree tree ok') } @@ -5261,14 +5257,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterInit, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: local tree ok') tree2AfterSecondSync.title = serverTreeAfterInit.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: server tree ok') } @@ -5332,21 +5328,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: first tree ok') serverTreeAfterFirstSync.title = tree1Initial.title expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: server tree ok') tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5371,14 +5367,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('first tree ok') tree2AfterFirstSync.title = serverTreeAfterFirstSync.title expectTreeEqual( tree2AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5411,14 +5407,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, tree1BeforeSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: local tree tree ok') serverTreeAfterSync.title = tree1AfterSync.title expectTreeEqual( serverTreeAfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: server tree tree ok') } @@ -5441,7 +5437,7 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterSecondSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second server tree tree ok') } @@ -5462,14 +5458,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: local tree tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: server tree tree ok') } @@ -5492,14 +5488,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterInit, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: local tree ok') tree2AfterSecondSync.title = serverTreeAfterInit.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: server tree ok') } @@ -5563,21 +5559,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: first tree ok') serverTreeAfterFirstSync.title = tree1Initial.title expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: server tree ok') tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5603,14 +5599,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('first tree ok') tree2AfterFirstSync.title = serverTreeAfterFirstSync.title expectTreeEqual( tree2AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5643,14 +5639,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, tree1BeforeSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: local tree tree ok') serverTreeAfterSync.title = tree1AfterSync.title expectTreeEqual( serverTreeAfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: server tree tree ok') } @@ -5678,7 +5674,7 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterSecondSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second server tree tree ok') } @@ -5699,14 +5695,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: local tree tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: server tree tree ok') } @@ -5728,14 +5724,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterInit, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: local tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: server tree ok') } @@ -5797,21 +5793,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: first tree ok') serverTreeAfterFirstSync.title = tree1Initial.title expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: server tree ok') tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5840,14 +5836,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('first tree ok') tree2AfterFirstSync.title = serverTreeAfterFirstSync.title expectTreeEqual( tree2AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -5879,14 +5875,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, tree1BeforeSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: local tree tree ok') serverTreeAfterSync.title = tree1AfterSync.title expectTreeEqual( serverTreeAfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: server tree tree ok') } @@ -5912,7 +5908,7 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterSecondSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second server tree tree ok') } @@ -5932,14 +5928,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: local tree tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: server tree tree ok') } @@ -5960,14 +5956,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterInit, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: local tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: server tree ok') } @@ -6047,21 +6043,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: first tree ok') serverTreeAfterFirstSync.title = tree1Initial.title expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: server tree ok') tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -6086,14 +6082,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('first tree ok') tree2AfterFirstSync.title = serverTreeAfterFirstSync.title expectTreeEqual( tree2AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -6126,14 +6122,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, tree1BeforeSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: local tree tree ok') serverTreeAfterSync.title = tree1AfterSync.title expectTreeEqual( serverTreeAfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: server tree tree ok') } @@ -6154,13 +6150,13 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterSecondSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterSecondSync.title = tree2AfterSecondSync.title expectTreeEqual( serverTreeAfterSecondSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second server tree tree ok') } @@ -6181,14 +6177,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: local tree tree ok') tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: server tree tree ok') } @@ -6211,20 +6207,20 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree1AfterInit.title = serverTreeAfterSync.title expectTreeEqual( tree1AfterInit, serverTreeAfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: local tree ok') tree2AfterSecondSync.title = serverTreeAfterInit.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: server tree ok') } @@ -6290,21 +6286,21 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: first tree ok') serverTreeAfterFirstSync.title = tree1Initial.title expectTreeEqual( serverTreeAfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: server tree ok') tree2AfterFirstSync.title = tree1Initial.title expectTreeEqual( tree2AfterFirstSync, tree1Initial, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -6330,14 +6326,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('first tree ok') tree2AfterFirstSync.title = serverTreeAfterFirstSync.title expectTreeEqual( tree2AfterFirstSync, serverTreeAfterFirstSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Initial round: second tree ok') } @@ -6371,14 +6367,14 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterSync, tree1BeforeSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: local tree tree ok') serverTreeAfterSync.title = tree1AfterSync.title expectTreeEqual( serverTreeAfterSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: server tree tree ok') } @@ -6404,13 +6400,13 @@ describe('Floccus', function() { expectTreeEqual( serverTreeAfterSecondSync, serverTreeAfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) serverTreeAfterSecondSync.title = tree2AfterSecondSync.title expectTreeEqual( serverTreeAfterSecondSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Second round: second server tree tree ok') } @@ -6432,26 +6428,26 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterFinalSync, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterSecondSync.title = tree1AfterFinalSync.title expectTreeEqual( tree1AfterFinalSync, tree2AfterSecondSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: local tree tree ok') serverTreeAfterSync.title = serverTreeAfterFinalSync.title expectTreeEqual( serverTreeAfterFinalSync, serverTreeAfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree2AfterSecondSync.title = serverTreeAfterFinalSync.title expectTreeEqual( tree2AfterSecondSync, serverTreeAfterFinalSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round: server tree tree ok') } @@ -6473,20 +6469,20 @@ describe('Floccus', function() { expectTreeEqual( tree1AfterInit, serverTreeAfterInit, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) tree1AfterInit.title = tree1AfterSync.title expectTreeEqual( tree1AfterInit, tree1AfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: local tree ok') serverTreeAfterInit.title = serverTreeAfterSync.title expectTreeEqual( serverTreeAfterInit, serverTreeAfterSync, - ignoreEmptyFolders(ACCOUNT_DATA) + false ) console.log('Final round after init: server tree ok') } @@ -6505,10 +6501,6 @@ function hasNoBookmarks(child) { else return !child.children.some(child => !hasNoBookmarks(child)) } -function ignoreEmptyFolders(account_data) { - return account_data.type === 'nextcloud-legacy' -} - async function getAllBookmarks(account) { let tree await withSyncConnection(account, async() => {