From 078287e967037dc3ae28601fff05693e2ce7e2f3 Mon Sep 17 00:00:00 2001 From: Jonathan Poltak Samosir Date: Fri, 2 Dec 2022 15:59:42 +0700 Subject: [PATCH] Add forgotten test details for new collections --- external/@worldbrain/memex-common | 2 +- src/backup-restore/background/index.test.ts | 2 + .../background/storage.ts | 4 ++ src/storage/index.test.ts | 49 +++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/external/@worldbrain/memex-common b/external/@worldbrain/memex-common index 7d672cd2a5..81d2c0a9ed 160000 --- a/external/@worldbrain/memex-common +++ b/external/@worldbrain/memex-common @@ -1 +1 @@ -Subproject commit 7d672cd2a50def9baa427df3bf9c48e783fdac70 +Subproject commit 81d2c0a9ed611b88ffce69ff2760243bac6f908b diff --git a/src/backup-restore/background/index.test.ts b/src/backup-restore/background/index.test.ts index 2f08ad98dc..6aee295189 100644 --- a/src/backup-restore/background/index.test.ts +++ b/src/backup-restore/background/index.test.ts @@ -22,6 +22,8 @@ describe('Backup feature', () => { visits: { backup: true, watch: true }, bookmarks: { backup: true, watch: true }, favIcons: { backup: true, watch: true }, + followedList: { backup: false, watch: false }, + followedListEntry: { backup: false, watch: false }, annotations: { backup: true, watch: true }, annotBookmarks: { backup: true, watch: true }, annotListEntries: { backup: true, watch: true }, diff --git a/src/page-activity-indicator/background/storage.ts b/src/page-activity-indicator/background/storage.ts index 68db95cc16..a4f142bae4 100644 --- a/src/page-activity-indicator/background/storage.ts +++ b/src/page-activity-indicator/background/storage.ts @@ -25,6 +25,8 @@ export default class PageActivityIndicatorStorage extends StorageModule { field: 'sharedList', }, ], + backup: false, + watch: false, }, followedListEntry: { version: STORAGE_VERSIONS[27].version, @@ -41,6 +43,8 @@ export default class PageActivityIndicatorStorage extends StorageModule { { field: 'normalizedPageUrl' }, { field: 'followedList' }, ], + watch: false, + backup: false, }, }, operations: { diff --git a/src/storage/index.test.ts b/src/storage/index.test.ts index e7595a3c74..e51222ff55 100644 --- a/src/storage/index.test.ts +++ b/src/storage/index.test.ts @@ -801,6 +801,55 @@ describe('Storage initialization', () => { dexieSchemaVersion: 27, storexSchemaVersion: STORAGE_VERSIONS[26].version, }, + { + schema: { + annotBookmarks: 'url, createdAt', + annotListEntries: '[listId+url], listId, url', + annotationPrivacyLevels: '++id, annotation', + annotations: + 'url, *_body_terms, *_comment_terms, *_pageTitle_terms, createdWhen, lastEdited, pageUrl', + backupChanges: 'timestamp, collection', + bookmarks: 'url, time', + clientSyncLogEntry: + '[deviceId+createdOn], [collection+pk], [createdOn+sharedOn], createdOn, needsIntegration, sharedOn', + contentSharingAction: '++id, createdWhen', + customListDescriptions: 'listId', + customLists: + 'id, *nameTerms, createdAt, isDeletable, isNestable, name', + directLinks: + 'url, *_body_terms, *_comment_terms, *_pageTitle_terms, createdWhen, pageUrl', + eventLog: '[time+type], time, type', + favIcons: 'hostname', + followedList: 'sharedList', + followedListEntry: + '++id, followedList, normalizedPageUrl', + locators: '++id, fingerprint, normalizedUrl', + notifications: 'id', + pageFetchBacklog: '++id, createdAt', + pageListEntries: '[listId+pageUrl], listId, pageUrl', + pageListEntryDescriptions: '[listId+pageUrl]', + pages: + 'url, *terms, *titleTerms, *urlTerms, domain, hostname', + personalCloudAction: '++id, createdWhen', + readablePageArchives: 'url, createdWhen, lastEdited', + readwiseAction: '++id, createdWhen', + settings: 'key', + sharedAnnotationMetadata: 'localId, remoteId', + sharedListMetadata: 'localId', + socialBookmarks: '++id, createdAt, postId', + socialPostListEntries: '++id, listId, postId', + socialPosts: + '++id, *_text_terms, createdAt, serviceId, userId', + socialTags: '++id, name, postId', + socialUsers: '++id, name, serviceId, username', + syncDeviceInfo: 'deviceId', + tags: '[name+url], name, url', + templates: 'id, code, isFavourite, title', + visits: '[time+url], url', + }, + dexieSchemaVersion: 28, + storexSchemaVersion: STORAGE_VERSIONS[27].version, + }, ]), ) })