mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
integration-test: Fix test for i18n
This commit is contained in:
parent
45e2b565ef
commit
ec3066caee
@ -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");
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user