A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
test: fix all tests
thecodrrb83d51177657
diff --git a/apps/web/__e2e__/notes.test.js b/apps/web/__e2e__/notes.test.jsindex 3655d76b5..0924e00ca 100644--- a/apps/web/__e2e__/notes.test.js+++ b/apps/web/__e2e__/notes.test.js@@ -154,15 +154,13 @@ async function addNoteToNotebook() {await page.click(List.new("notebook").atIndex(0).build());- await page.click(getTestId("mnd-new-topic"));-await page.type(getTestId("mnd-new-topic-title"), "Topic 1");await page.press(getTestId("mnd-new-topic-title"), "Enter");await page.click(List.new("notebook").atIndex(0).topic(0).build());- await page.click(getTestId("dialog-no"));+ await page.click(getTestId("dialog-yes"));await expect(isToastPresent()).resolves.toBeTruthy();diff --git a/apps/web/src/components/dialogs/move-note-dialog.js b/apps/web/src/components/dialogs/move-note-dialog.jsindex 8462faa5b..fe15e1a52 100644--- a/apps/web/src/components/dialogs/move-note-dialog.js+++ b/apps/web/src/components/dialogs/move-note-dialog.js@@ -79,6 +79,7 @@ function MoveDialog({ onClose, noteIds }) {return (<Accordionkey={notebook.id}+ testId={`notebook-${index}`}title={<Flex flexDirection={"column"} sx={{ px: 1 }}><Text variant={"body"}>{notebook.title}</Text>@@ -98,6 +99,7 @@ function MoveDialog({ onClose, noteIds }) {empty: "Add a new topic",filter: "Filter topics",}}+ testId="mnd-new-topic-title"itemName="topic"filter={(topics, query) => db.lookup.topics(topics, query)}getAll={() => db.notebooks.notebook(notebook).topics.all}diff --git a/apps/web/src/components/global-menu-wrapper/index.js b/apps/web/src/components/global-menu-wrapper/index.jsindex f0f7791b1..372795d25 100644--- a/apps/web/src/components/global-menu-wrapper/index.js+++ b/apps/web/src/components/global-menu-wrapper/index.js@@ -30,7 +30,10 @@ function GlobalMenuWrapper() {zIndex: 1000,backgroundColor: isAutocomplete ? "transparent" : "unset",}}- onClick={(e) => closeMenu()}+ onClick={(e) => {+ if (e.target.closest(".menuContainer")) return;+ closeMenu();+ }}onContextMenu={(e) => {e.preventDefault();closeMenu();diff --git a/apps/web/src/components/menu/index.js b/apps/web/src/components/menu/index.jsindex 5b65014c6..65163c128 100644--- a/apps/web/src/components/menu/index.js+++ b/apps/web/src/components/menu/index.js@@ -140,8 +140,10 @@ function Menu({ items, data, title, closeMenu }) {index={index}item={item}onClick={(e) => {- if (item.items?.length) setIsSubmenuOpen(true);- else onAction(e, item);+ if (item.items?.length) {+ setFocusIndex(index);+ setIsSubmenuOpen(true);+ } else onAction(e, item);}}isFocused={focusIndex === index}onMouseEnter={() => {@@ -184,6 +186,7 @@ export default React.memo(Menu);function MenuContainer({ title, children }) {return (<Flex+ className="menuContainer"as="ul"tabIndex={-1}bg="background"diff --git a/apps/web/src/components/navigation-menu/index.js b/apps/web/src/components/navigation-menu/index.jsindex 9df2c0f4e..7d3cab8c8 100644--- a/apps/web/src/components/navigation-menu/index.js+++ b/apps/web/src/components/navigation-menu/index.js@@ -159,7 +159,7 @@ function NavigationMenu(props) {{colors.map((color) => (<NavigationItemkey={color.id}- title={toTitleCase(db.colors.alias(color.id))}+ title={db.colors.alias(color.id)}icon={Circle}selected={location === `/colors/${color.id}`}color={color.title.toLowerCase()}