Skip to content

Build your personal knowledge base with Trilium Notes

integration-test: Fix test for i18n

Elian Doranec3066caeeef
diff --git a/integration-tests/i18n.spec.ts b/integration-tests/i18n.spec.ts
index 28d898d9b8..b7fc6f95b0 100644
--- a/integration-tests/i18n.spec.ts
+++ b/integration-tests/i18n.spec.ts
@@ -1,13 +1,16 @@
import test, { expect } from "@playwright/test";
test("User can change language from settings", async ({ page }) => {
+ await page.goto('http://localhost:8082');
+
// Clear all tabs
await page.locator('.note-tab:first-of-type').locator("div").nth(1).click({ button: 'right' });
await page.getByText('Close all tabs').click();
- // Go to options
+ // Go to options -> Appearance
await page.locator('#launcher-pane div').filter({ hasText: 'Options Open New Window' }).getByRole('button').click();
await page.locator('#launcher-pane').getByText('Options').click();
+ await page.locator('#center-pane').getByText('Appearance').click();
// Check that the default value (English) is set.
await expect(page.locator('#center-pane')).toContainText('Theme');
@@ -17,4 +20,7 @@ test("User can change language from settings", async ({ page }) => {
// Select Chinese and ensure the translation is set.
languageCombobox.selectOption("cn");
await expect(page.locator('#center-pane')).toContainText('主题');
+
+ // Select English again.
+ languageCombobox.selectOption("en");
});
\ No newline at end of file