mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(e2e): add test for settings translations
This commit is contained in:
parent
1abc8abee6
commit
0db3bfd8ae
13
e2e/i18n.spec.ts
Normal file
13
e2e/i18n.spec.ts
Normal file
@ -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");
|
||||
});
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user