From 3958312651021f73f591ebf9a01939da9fbad3e2 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 7 Mar 2025 20:34:08 +0200 Subject: [PATCH] fix(e2e): flaky test due to navigation --- e2e/i18n.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/i18n.spec.ts b/e2e/i18n.spec.ts index 8c87e08d9..1f711b060 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"); });