Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(e2e): add test for settings translations
Elian Doran0db3bfd8ae23
diff --git a/e2e/i18n.spec.ts b/e2e/i18n.spec.tsnew file mode 100644index 0000000000..87019c2017--- /dev/null+++ b/e2e/i18n.spec.ts@@ -0,0 +1,13 @@+import { test, expect, Page } from "@playwright/test";+import App from "./support/app";++test("Displays translations in Settings", async ({ page }) => {+ const app = new App(page);+ await app.goto();+ await app.closeAllTabs();+ await app.goToSettings();+ await app.noteTree.getByText("Appearance").click();++ expect(app.currentNoteSplit).toContainText("Localization");+ expect(app.currentNoteSplit).toContainText("Language");+});diff --git a/e2e/support/app.ts b/e2e/support/app.tsindex 4f36dfb7b7..40546acaec 100644--- a/e2e/support/app.ts+++ b/e2e/support/app.ts@@ -31,6 +31,10 @@ export default class App {await autocomplete.press("Enter");}+ async goToSettings() {+ await this.page.locator(".launcher-button.bx-cog").click();+ }+getTab(tabIndex: number) {return this.tabBar.locator(".note-tab-wrapper").nth(tabIndex);}@@ -43,6 +47,7 @@ export default class App {await this.getTab(0).click({ button: "right" });await this.page.waitForTimeout(500); // TODO: context menu won't dismiss otherwiseawait this.page.getByText("Close all tabs").click({ force: true });+ await this.page.waitForTimeout(500); // TODO: context menu won't dismiss otherwise}async addNewTab() {