Skip to content

Build your personal knowledge base with Trilium Notes

fix(e2e): flaky test due to navigation

Elian Doran395831265102
diff --git a/e2e/i18n.spec.ts b/e2e/i18n.spec.ts
index 8c87e08d9c..1f711b060c 100644
--- a/e2e/i18n.spec.ts
+++ b/e2e/i18n.spec.ts
@@ -42,14 +42,16 @@ test("User can change language from settings", async ({ page, context }) => {
// Check that the default value (English) is set.
await expect(app.currentNoteSplit).toContainText("Theme");
- const languageCombobox = await app.currentNoteSplit.getByRole("combobox").first();
+ const languageCombobox = app.currentNoteSplit.getByRole("combobox").first();
await expect(languageCombobox).toHaveValue("en");
// Select Chinese and ensure the translation is set.
await languageCombobox.selectOption("cn");
await expect(app.currentNoteSplit).toContainText("主题", { timeout: 15000 });
+ await expect(languageCombobox).toHaveValue("cn");
// Select English again.
await languageCombobox.selectOption("en");
await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 });
+ await expect(languageCombobox).toHaveValue("en");
});