mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix: format changes are not saved in editor
This commit is contained in:
@@ -15,6 +15,7 @@ const {
|
||||
editNote,
|
||||
getEditorTitle,
|
||||
getEditorContent,
|
||||
getEditorContentAsHTML,
|
||||
} = require("./utils");
|
||||
const {
|
||||
navigateTo,
|
||||
@@ -508,7 +509,7 @@ test.describe("run tests independently", () => {
|
||||
);
|
||||
});
|
||||
|
||||
test.only("creating a new title-only note should add it to the list", async () => {
|
||||
test("creating a new title-only note should add it to the list", async () => {
|
||||
const selector = await createNoteAndCheckPresence();
|
||||
|
||||
await page.click(getTestId("notes-action-button"));
|
||||
@@ -517,6 +518,26 @@ test.describe("run tests independently", () => {
|
||||
|
||||
await createNoteAndCheckPresence({ title: "Hello World" });
|
||||
});
|
||||
|
||||
test.only("format changes should get saved", async () => {
|
||||
const selector = await createNoteAndCheckPresence();
|
||||
|
||||
await page.click(getTestId("notes-action-button"));
|
||||
|
||||
await page.click(selector);
|
||||
|
||||
await page.keyboard.press("Control+a");
|
||||
|
||||
await page.click(`#editorToolbar button[title="Bold"]`);
|
||||
|
||||
await page.click(getTestId("notes-action-button"));
|
||||
|
||||
await page.click(selector);
|
||||
|
||||
const content = await getEditorContentAsHTML();
|
||||
|
||||
expect(content).toMatchSnapshot(`format-changes-should-get-saved.txt`);
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("stress tests", () => {
|
||||
|
||||
Reference in New Issue
Block a user