π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[photos][web] Use realistic sidebar actions in search category tests
AswinAsok79af72d94d14
diff --git a/web/apps/photos/tests/search-categories.test.ts b/web/apps/photos/tests/search-categories.test.tsindex 2ecd9b4d27..2a8c8a4ea0 100644--- a/web/apps/photos/tests/search-categories.test.ts+++ b/web/apps/photos/tests/search-categories.test.ts@@ -29,12 +29,20 @@ const categoriesByType = {clip: "photos",} satisfies Record<SearchSuggestion["type"], Exclude<SearchCategory, "all">>;+const sidebarOption = (actionID: SidebarActionID): SearchOption => ({+ suggestion: { type: "sidebarAction", actionID, label: actionID, path: [] },+ fileCount: 0,+ previewFiles: [],+});+const option = (type: SearchSuggestion["type"], fileCount = 100) =>- ({- suggestion: { type, label: type },- fileCount,- previewFiles: [],- }) as SearchOption;+ type === "sidebarAction"+ ? sidebarOption("utility.preferences")+ : ({+ suggestion: { type, label: type },+ fileCount,+ previewFiles: [],+ } as SearchOption);describe("search categories", () => {test.each(Object.entries(categoriesByType))(@@ -120,12 +128,6 @@ test("groups results in tab order while preserving rows within each category", (expect(groupSearchOptions([])).toEqual([]);});-const sidebarOption = (actionID: SidebarActionID): SearchOption => ({- suggestion: { type: "sidebarAction", actionID, label: actionID, path: [] },- fileCount: 0,- previewFiles: [],-});-const albumShortcuts = ["shortcuts.uncategorized","shortcuts.archive",