mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 22:58:52 +02:00
e2e(server): broken test after switch to combobox
This commit is contained in:
parent
5d961e1a9a
commit
0958204779
@ -42,19 +42,21 @@ test("User can change language from settings", async ({ page, context }) => {
|
||||
|
||||
// Check that the default value (English) is set.
|
||||
await expect(app.currentNoteSplit).toContainText("First day of the week");
|
||||
const languageCombobox = app.currentNoteSplit.getByRole("combobox").first();
|
||||
await expect(languageCombobox).toHaveValue("en");
|
||||
const languageCombobox = app.currentNoteSplit.locator(".options-section .dropdown").first();
|
||||
await expect(languageCombobox).toContainText("English");
|
||||
|
||||
// Select Chinese and ensure the translation is set.
|
||||
await languageCombobox.selectOption("cn");
|
||||
await languageCombobox.locator(".dropdown-toggle").click();
|
||||
await languageCombobox.locator(".dropdown-item", { hasText: "简体中文" }).click();
|
||||
await app.currentNoteSplit.locator("button[name=restart-app-button]").click();
|
||||
|
||||
await expect(app.currentNoteSplit).toContainText("一周的第一天", { timeout: 15000 });
|
||||
await expect(languageCombobox).toHaveValue("cn");
|
||||
await expect(languageCombobox).toContainText("简体中文");
|
||||
|
||||
// Select English again.
|
||||
await languageCombobox.selectOption("en");
|
||||
await languageCombobox.locator(".dropdown-toggle").click();
|
||||
await languageCombobox.locator(".dropdown-item", { hasText: "English" }).click();
|
||||
await app.currentNoteSplit.locator("button[name=restart-app-button]").click();
|
||||
await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 });
|
||||
await expect(languageCombobox).toHaveValue("en");
|
||||
await expect(languageCombobox).toContainText("English");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user