Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8dfe561

Browse files
committed
Fix test to not use otherwise unused class name
1 parent 69efe91 commit 8dfe561

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

playwright/e2e/settings/preferences-user-settings-tab.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ test.describe("Preferences user settings tab", () => {
3636

3737
test("should be able to change the app language", async ({ uut, user }) => {
3838
// Check language and region setting dropdown
39-
const languageInput = uut.locator(".mx_PreferencesUserSettingsTab_section_languageInput");
39+
const languageInput = uut.getByRole("button", { name: "Language Dropdown" });
4040
await languageInput.scrollIntoViewIfNeeded();
4141
// Check the default value
4242
await expect(languageInput.getByText("English")).toBeVisible();
4343
// Click the button to display the dropdown menu
44-
await languageInput.getByRole("button", { name: "Language Dropdown" }).click();
44+
await languageInput.click();
4545
// Assert that the default option is rendered and highlighted
4646
languageInput.getByRole("option", { name: /Albanian/ });
4747
await expect(languageInput.getByRole("option", { name: /Albanian/ })).toHaveClass(
4848
/mx_Dropdown_option_highlight/,
4949
);
5050
await expect(languageInput.getByRole("option", { name: /Deutsch/ })).toBeVisible();
5151
// Click again to close the dropdown
52-
await languageInput.getByRole("button", { name: "Language Dropdown" }).click();
52+
await languageInput.click();
5353
// Assert that the default value is rendered again
5454
await expect(languageInput.getByText("English")).toBeVisible();
5555
});

0 commit comments

Comments
 (0)