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: add editor focus mode test
thecodrr45323ced12ab
diff --git a/apps/web/__e2e__/editor.test.js b/apps/web/__e2e__/editor.test.jsnew file mode 100644index 000000000..fed10525a--- /dev/null+++ b/apps/web/__e2e__/editor.test.js@@ -0,0 +1,24 @@+const { Page, test, expect } = require("@playwright/test");+const { createNote, NOTE, getTestId } = require("./utils");+/**+ * @type {Page}+ */+var page = null;+global.page = null;+test.beforeEach(async ({ page: _page }) => {+ global.page = _page;+ page = _page;+ await page.goto("http://localhost:3000/");+});++test("focus mode", async () => {+ await createNote(NOTE, "notes");++ await page.click(getTestId("focus-mode"));++ await page.waitForTimeout(1000);++ expect(+ await page.screenshot({ fullPage: true, quality: 100, type: "jpeg" })+ ).toMatchSnapshot("focus-mode.jpg", { threshold: 99 });+});diff --git a/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-Chromium-linux.jpg b/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-Chromium-linux.jpgnew file mode 100644index 000000000..f91abfb4dBinary files /dev/null and b/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-Chromium-linux.jpg differdiff --git a/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-Firefox-linux.jpg b/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-Firefox-linux.jpgnew file mode 100644index 000000000..a910e68d9Binary files /dev/null and b/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-Firefox-linux.jpg differdiff --git a/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-WebKit-linux.jpg b/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-WebKit-linux.jpgnew file mode 100644index 000000000..63d65fd2fBinary files /dev/null and b/apps/web/__e2e__/editor.test.js-snapshots/focus-mode-WebKit-linux.jpg differdiff --git a/apps/web/__e2e__/notes.test.js b/apps/web/__e2e__/notes.test.jsindex 93dec90bd..4d7385100 100644--- a/apps/web/__e2e__/notes.test.js+++ b/apps/web/__e2e__/notes.test.js@@ -3,7 +3,8 @@/*** TODO: We are still not checking if toast appears on delete/restore or not.- */ const { test, expect } = require("@playwright/test");+ */+const { Page, test, expect } = require("@playwright/test");const {getTestId,createNote,