Skip to content

Commit

Permalink
Add forgotten test details for new collections
Browse files Browse the repository at this point in the history
  • Loading branch information
poltak committed Dec 2, 2022
1 parent ed105bc commit 078287e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
2 changes: 2 additions & 0 deletions src/backup-restore/background/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
4 changes: 4 additions & 0 deletions src/page-activity-indicator/background/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default class PageActivityIndicatorStorage extends StorageModule {
field: 'sharedList',
},
],
backup: false,
watch: false,
},
followedListEntry: {
version: STORAGE_VERSIONS[27].version,
Expand All @@ -41,6 +43,8 @@ export default class PageActivityIndicatorStorage extends StorageModule {
{ field: 'normalizedPageUrl' },
{ field: 'followedList' },
],
watch: false,
backup: false,
},
},
operations: {
Expand Down
49 changes: 49 additions & 0 deletions src/storage/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
]),
)
})
Expand Down

0 comments on commit 078287e

Please sign in to comment.