diff --git a/e2e/i18n.spec.ts b/e2e/i18n.spec.ts new file mode 100644 index 000000000..87019c201 --- /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.ts index 4f36dfb7b..40546acae 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 otherwise await this.page.getByText("Close all tabs").click({ force: true }); + await this.page.waitForTimeout(500); // TODO: context menu won't dismiss otherwise } async addNewTab() {