Files
notesnook/apps/mobile/e2e/tests/trash.e2e.ts
Ammar Ahmed cb5a7904d3 mobile: add clear trash option in Trash properties
mobile: show clear trash success message

mobile: add e2e tests

mobile: fix clear trash option remains disabled after moving item to trash after login

mobile: Disable "Move to trash" for deleted notes.
2026-04-15 12:48:24 +05:00

54 lines
1.4 KiB
TypeScript

import { notesnook } from "../test.ids";
import { TestBuilder } from "./utils";
describe("TRASH TESTS", () => {
it("Move a note to trash", async () => {
await TestBuilder.create()
.prepare()
.createNote("Test", "Test note item")
.tapById(notesnook.listitem.menu)
.tapById("icon-trash")
.navigate("Trash")
.wait(500)
.isVisibleByText("Test")
.run();
});
it("Permanently remove a note from trash", async () => {
await TestBuilder.create()
.prepare()
.createNote("Test", "Test note item")
.tapById(notesnook.listitem.menu)
.tapById("icon-trash")
.navigate("Trash")
.wait(500)
.isVisibleByText("Test")
.tapById("trash-clear")
.tapByText("Clear")
.wait(100)
.isNotVisibleByText("Test")
.navigate("Notes")
.isNotVisibleByText("Test")
.run();
});
it("Clear all notes from side menu", async () => {
await TestBuilder.create()
.prepare()
.createNote("Test", "Test note item")
.tapById(notesnook.listitem.menu)
.tapById("icon-trash")
.navigate("Trash")
.wait(500)
.isVisibleByText("Test")
.openSideMenu()
.longPressByText("Trash")
.tapByText("Clear trash")
.wait(500)
.tapByText("Clear")
.tapByText("Trash")
.isNotVisibleByText("Test")
.run();
});
});