Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix tests

Abdullah Atta7dd8b13bc8b6
diff --git a/apps/web/__e2e__/models/editor.model.ts b/apps/web/__e2e__/models/editor.model.ts
index e24c58bba..bdc647b13 100644
--- a/apps/web/__e2e__/models/editor.model.ts
+++ b/apps/web/__e2e__/models/editor.model.ts
@@ -97,8 +97,8 @@ export class EditorModel {
await this.searchButton.isDisabled();
await this.page
.locator(".active")
- .locator(getTestId("tags"))
- .waitFor({ state: "hidden" });
+ .locator(getTestId("editor-tag-input"))
+ .isDisabled();
await this.dateEditedText.waitFor({ state: "hidden" });
await this.wordCountText.waitFor();
await this.waitForLoading("", "");
@@ -113,7 +113,7 @@ export class EditorModel {
async isUnloaded() {
return (
- (await this.tagInput.isHidden()) &&
+ (await this.tagInput.isDisabled()) &&
(await this.enterFullscreenButton.isHidden()) &&
(await this.dateEditedText.isHidden())
);
diff --git a/apps/web/__e2e__/notebooks.test.ts b/apps/web/__e2e__/notebooks.test.ts
index 468875ff3..38456e5f9 100644
--- a/apps/web/__e2e__/notebooks.test.ts
+++ b/apps/web/__e2e__/notebooks.test.ts
@@ -333,9 +333,7 @@ test("when default notebook is set, created note in tags context should go to de
test("when default notebook is set, created note in colors context should go to default notebook", async ({
page
-}, info) => {
- info.setTimeout(2 * 60 * 1000);
-
+}) => {
const coloredNote = { title: "Red note", content: NOTE.content };
const app = new AppModel(page);
await app.goto();
@@ -345,7 +343,7 @@ test("when default notebook is set, created note in colors context should go to
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
- await note?.contextMenu.newColor(coloredNote);
+ await note?.contextMenu.newColor({ color: "#ff0000", title: "red" });
const color = await app.goToColor("red");
await color?.createNote(coloredNote);
notebooks = await app.goToNotebooks();