Skip to content

Build your personal knowledge base with Trilium Notes

e2e(server): broken test after translations were introduced

Elian Doran360b5d6de439
diff --git a/apps/server-e2e/src/i18n.spec.ts b/apps/server-e2e/src/i18n.spec.ts
index 0124f271be..c7a3257685 100644
--- a/apps/server-e2e/src/i18n.spec.ts
+++ b/apps/server-e2e/src/i18n.spec.ts
@@ -47,15 +47,14 @@ test("User can change language from settings", async ({ page, context }) => {
// Select Chinese and ensure the translation is set.
await languageCombobox.selectOption("cn");
-
- // Press the refresh button.
- await app.currentNoteSplit.getByRole("button", { name: "Restart the application" }).click();
+ await app.currentNoteSplit.locator("button.restart-app-button").click();
await expect(app.currentNoteSplit).toContainText("一周的第一天", { timeout: 15000 });
await expect(languageCombobox).toHaveValue("cn");
// Select English again.
await languageCombobox.selectOption("en");
+ await app.currentNoteSplit.locator("button.restart-app-button").click();
await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 });
await expect(languageCombobox).toHaveValue("en");
});