e2e(server): broken test after translations were introduced

This commit is contained in:
Elian Doran 2025-08-07 23:34:28 +03:00
parent bf50883e40
commit 360b5d6de4
No known key found for this signature in database

View File

@ -47,15 +47,14 @@ test("User can change language from settings", async ({ page, context }) => {
// Select Chinese and ensure the translation is set. // Select Chinese and ensure the translation is set.
await languageCombobox.selectOption("cn"); await languageCombobox.selectOption("cn");
await app.currentNoteSplit.locator("button.restart-app-button").click();
// Press the refresh button.
await app.currentNoteSplit.getByRole("button", { name: "Restart the application" }).click();
await expect(app.currentNoteSplit).toContainText("一周的第一天", { timeout: 15000 }); await expect(app.currentNoteSplit).toContainText("一周的第一天", { timeout: 15000 });
await expect(languageCombobox).toHaveValue("cn"); await expect(languageCombobox).toHaveValue("cn");
// Select English again. // Select English again.
await languageCombobox.selectOption("en"); await languageCombobox.selectOption("en");
await app.currentNoteSplit.locator("button.restart-app-button").click();
await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 }); await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 });
await expect(languageCombobox).toHaveValue("en"); await expect(languageCombobox).toHaveValue("en");
}); });