1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Fix close button on forgot password flow (#12732)

* Fix close button on forgot password flow

The 'x' had escaped out the right of the button for some reason

* Add test that actually opens the dialog in question

* Actually screenshot the right thing

* Unnecessary screenshot
This commit is contained in:
David Baker
2024-07-05 10:51:21 +01:00
committed by GitHub
parent 2f953f1d0f
commit 06117695bc
8 changed files with 141 additions and 17 deletions

View File

@ -17,8 +17,8 @@ limitations under the License.
*/
import { uniqueId } from "lodash";
import { expect, type Page } from "@playwright/test";
import type { Page } from "@playwright/test";
import type { ClientEvent, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
import { Client } from "../pages/client";
@ -63,4 +63,15 @@ export async function waitForRoom(
);
}
export async function selectHomeserver(page: Page, homeserverUrl: string) {
await page.getByRole("button", { name: "Edit" }).click();
await page.getByRole("textbox", { name: "Other homeserver" }).fill(homeserverUrl);
await page.getByRole("button", { name: "Continue", exact: true }).click();
// wait for the dialog to go away
await expect(page.locator(".mx_ServerPickerDialog")).toHaveCount(0);
await expect(page.locator(".mx_Spinner")).toHaveCount(0);
await expect(page.locator(".mx_ServerPicker_server")).toHaveText(homeserverUrl);
}
export const CommandOrControl = process.platform === "darwin" ? "Meta" : "Control";