Improve invite dialog ui - Part 2 (#30836)

* feat: add `Pill` component

* chore: add `react-merge-refs` lib

* feat: add `PillInput` component

* feat: use new pills component in invite dialog

* test: update invite dialog selector

* test(e2e): update test locators

* test(e2e): update screenshot
This commit is contained in:
Florian Duros
2025-10-01 11:03:43 +02:00
committed by GitHub
parent 3d5749bfc7
commit 9cecd52477
29 changed files with 520 additions and 151 deletions

View File

@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
*/
import React from "react";
import { fireEvent, render, screen } from "jest-matrix-react";
import { fireEvent, render, screen, findByText } from "jest-matrix-react";
import userEvent from "@testing-library/user-event";
import { RoomType, type MatrixClient, MatrixError, Room } from "matrix-js-sdk/src/matrix";
import { KnownMembership } from "matrix-js-sdk/src/types";
@@ -401,7 +401,7 @@ describe("InviteDialog", () => {
const btn = await screen.findByRole("option", { name: aliceId });
fireEvent.click(btn);
const tile = await screen.findByText(aliceId, { selector: ".mx_InviteDialog_userTile_name" });
const tile = await findByText(screen.getByTestId("invite-dialog-input-wrapper"), aliceId);
expect(tile).toBeInTheDocument();
});