From 4ff051130b5b02c3e5be7603c7e0f8eaaebc5d27 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Mon, 27 Nov 2023 16:33:09 +0500 Subject: [PATCH] mobile: pass tests --- .../list-items/headers/section-header.tsx | 5 + apps/mobile/app/components/properties/tags.js | 2 +- .../app/components/selection-header/index.tsx | 21 +- .../sheets/add-to/notebook-item.tsx | 14 +- .../sheets/notebook-sheet/index.tsx | 57 +++-- .../app/components/sheets/sort/index.js | 2 +- apps/mobile/app/hooks/use-actions.tsx | 11 +- .../app/screens/editor/tiptap/commands.ts | 2 +- .../editor/tiptap/use-editor-events.ts | 12 +- .../app/screens/editor/tiptap/use-editor.ts | 5 +- apps/mobile/app/screens/notebook/index.tsx | 7 +- apps/mobile/app/utils/functions.js | 5 +- apps/mobile/e2e/tests/note.e2e.js | 2 +- apps/mobile/e2e/tests/notebook.e2e.js | 218 ++++++++---------- apps/mobile/e2e/tests/search.e2e.js | 2 +- apps/mobile/e2e/tests/sort.e2e.js | 17 -- apps/mobile/e2e/tests/tag.e2e.js | 2 +- apps/mobile/e2e/tests/utils.js | 11 +- apps/mobile/native/babel.config.js | 6 + 19 files changed, 191 insertions(+), 210 deletions(-) diff --git a/apps/mobile/app/components/list-items/headers/section-header.tsx b/apps/mobile/app/components/list-items/headers/section-header.tsx index b53e8d057..54276249c 100644 --- a/apps/mobile/app/components/list-items/headers/section-header.tsx +++ b/apps/mobile/app/components/list-items/headers/section-header.tsx @@ -185,6 +185,11 @@ export const SectionHeader = React.memo< }, (prev, next) => { if (prev.item.title !== next.item.title) return false; + if (prev.groupOptions?.groupBy !== next.groupOptions.groupBy) return false; + if (prev.groupOptions?.sortDirection !== next.groupOptions.sortDirection) + return false; + if (prev.groupOptions?.sortBy !== next.groupOptions.sortBy) return false; + return true; } ); diff --git a/apps/mobile/app/components/properties/tags.js b/apps/mobile/app/components/properties/tags.js index b8ee852a4..59e7d4e5b 100644 --- a/apps/mobile/app/components/properties/tags.js +++ b/apps/mobile/app/components/properties/tags.js @@ -48,7 +48,7 @@ export const Tags = ({ item, close }) => { >