Skip to content

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

web: fix notebook tests

Abdullah Atta2337b8cd85aa
diff --git a/apps/web/__e2e__/notebooks.test.ts b/apps/web/__e2e__/notebooks.test.ts
index 3db3c6e44..fc24ba7d6 100644
--- a/apps/web/__e2e__/notebooks.test.ts
+++ b/apps/web/__e2e__/notebooks.test.ts
@@ -111,7 +111,7 @@ test("restore a notebook", async ({ page }) => {
await app.goToNotebooks();
const restoredNotebook = await notebooks.findNotebook(NOTEBOOK);
expect(restoredNotebook).toBeDefined();
- expect(await app.toasts.waitForToast("1 item restored")).toBe(true);
+ expect(await app.toasts.waitForToast("Item restored")).toBe(true);
});
test("permanently delete a notebook", async ({ page }) => {
@@ -224,7 +224,9 @@ test("delete all notes within a notebook", async ({ page }) => {
test("creating more than 20 notebooks shouldn't be possible on basic plan", async ({
page
-}) => {
+}, info) => {
+ info.setTimeout(2 * 60 * 1000);
+
await page.exposeBinding("isBasic", () => true);
const app = new AppModel(page);
await app.goto();
@@ -235,9 +237,7 @@ test("creating more than 20 notebooks shouldn't be possible on basic plan", asyn
const result = await Promise.race([
notebooks.createNotebook(NOTEBOOK),
- app.toasts.waitForToast(
- "Please upgrade your account to Pro to add more notebooks."
- )
+ app.toasts.waitForToast("Upgrade to Notesnook Pro to add more notebooks.")
]);
expect(result).toBe(true);
});
diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.po
index 02a733bea..c052a5544 100644
--- a/packages/intl/locale/en.po
+++ b/packages/intl/locale/en.po
@@ -5858,6 +5858,10 @@ msgstr "Upgrade now"
msgid "Upgrade to Notesnook Pro to add colors."
msgstr "Upgrade to Notesnook Pro to add colors."
+#: src/strings.ts:1994
+msgid "Upgrade to Notesnook Pro to add more notebooks."
+msgstr "Upgrade to Notesnook Pro to add more notebooks."
+
#: src/strings.ts:1993
msgid "Upgrade to Notesnook Pro to create more tags."
msgstr "Upgrade to Notesnook Pro to create more tags."
@@ -5870,17 +5874,25 @@ msgstr "Upgrade to Notesnook Pro to customize the toolbar."
msgid "Upgrade to Notesnook Pro to use custom toolbar presets."
msgstr "Upgrade to Notesnook Pro to use custom toolbar presets."
+#: src/strings.ts:1995
+msgid "Upgrade to Notesnook Pro to use the notes vault."
+msgstr "Upgrade to Notesnook Pro to use the notes vault."
+
+#: src/strings.ts:1998
+msgid "Upgrade to Notesnook Pro to use this feature."
+msgstr "Upgrade to Notesnook Pro to use this feature."
+
#: src/strings.ts:1994
-msgid "Upgrade to Notesnook Proto add more notebooks."
-msgstr "Upgrade to Notesnook Proto add more notebooks."
+#~ msgid "Upgrade to Notesnook Proto add more notebooks."
+#~ msgstr "Upgrade to Notesnook Proto add more notebooks."
#: src/strings.ts:1995
-msgid "Upgrade to Notesnook Proto use the notes vault."
-msgstr "Upgrade to Notesnook Proto use the notes vault."
+#~ msgid "Upgrade to Notesnook Proto use the notes vault."
+#~ msgstr "Upgrade to Notesnook Proto use the notes vault."
#: src/strings.ts:1998
-msgid "Upgrade to Notesnook Proto use this feature."
-msgstr "Upgrade to Notesnook Proto use this feature."
+#~ msgid "Upgrade to Notesnook Proto use this feature."
+#~ msgstr "Upgrade to Notesnook Proto use this feature."
#: src/strings.ts:705
msgid "Upgrade to Pro"
diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.po
index ec02349b9..60179f951 100644
--- a/packages/intl/locale/pseudo-LOCALE.po
+++ b/packages/intl/locale/pseudo-LOCALE.po
@@ -5826,6 +5826,10 @@ msgstr ""
msgid "Upgrade to Notesnook Pro to add colors."
msgstr ""
+#: src/strings.ts:1994
+msgid "Upgrade to Notesnook Pro to add more notebooks."
+msgstr ""
+
#: src/strings.ts:1993
msgid "Upgrade to Notesnook Pro to create more tags."
msgstr ""
@@ -5838,18 +5842,26 @@ msgstr ""
msgid "Upgrade to Notesnook Pro to use custom toolbar presets."
msgstr ""
-#: src/strings.ts:1994
-msgid "Upgrade to Notesnook Proto add more notebooks."
-msgstr ""
-
#: src/strings.ts:1995
-msgid "Upgrade to Notesnook Proto use the notes vault."
+msgid "Upgrade to Notesnook Pro to use the notes vault."
msgstr ""
#: src/strings.ts:1998
-msgid "Upgrade to Notesnook Proto use this feature."
+msgid "Upgrade to Notesnook Pro to use this feature."
msgstr ""
+#: src/strings.ts:1994
+#~ msgid "Upgrade to Notesnook Proto add more notebooks."
+#~ msgstr ""
+
+#: src/strings.ts:1995
+#~ msgid "Upgrade to Notesnook Proto use the notes vault."
+#~ msgstr ""
+
+#: src/strings.ts:1998
+#~ msgid "Upgrade to Notesnook Proto use this feature."
+#~ msgstr ""
+
#: src/strings.ts:705
msgid "Upgrade to Pro"
msgstr ""
diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.ts
index 5c0b335c8..3cebb3ebb 100644
--- a/packages/intl/src/strings.ts
+++ b/packages/intl/src/strings.ts
@@ -1900,12 +1900,12 @@ All attachments will be downloaded & cached again on access.
backupSavedAt: (path: string) => t`Backup saved at ${path}`,
movedToTrash: (type: string, count: number) =>
plural(count, {
- one: `1 ${
- strings.dataTypes[type as keyof typeof strings.dataTypes]
- } moved to trash`,
- other: `# ${
- strings.dataTypesPlural[type as keyof typeof strings.dataTypesPlural]
- } moved to trash`
+ one: `1 ${strings.dataTypes[
+ type as keyof typeof strings.dataTypes
+ ]()} moved to trash`,
+ other: `# ${strings.dataTypesPlural[
+ type as keyof typeof strings.dataTypesPlural
+ ]()} moved to trash`
}),
irreverisibleAction: () => t`This action is IRREVERSIBLE.`,
doAction: (type: string, count: number, action: DoActions) =>
@@ -1991,11 +1991,11 @@ All attachments will be downloaded & cached again on access.
const features = {
color: t`Upgrade to Notesnook Pro to add colors.`,
tags: t`Upgrade to Notesnook Pro to create more tags.`,
- notebook: t` Upgrade to Notesnook Proto add more notebooks.`,
- vault: t` Upgrade to Notesnook Proto use the notes vault.`,
+ notebook: t` Upgrade to Notesnook Pro to add more notebooks.`,
+ vault: t` Upgrade to Notesnook Pro to use the notes vault.`,
customPresets: t` Upgrade to Notesnook Pro to use custom toolbar presets.`,
customizeToolbar: t` Upgrade to Notesnook Pro to customize the toolbar.`,
- default: t` Upgrade to Notesnook Proto use this feature.`
+ default: t` Upgrade to Notesnook Pro to use this feature.`
};
return features[feature as keyof typeof features];
},