diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index b5e96a8010..68a31a8bdb 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -26,12 +26,7 @@ import { Icon as InfoIcon } from "../../../../res/img/element-icons/info.svg"; import { Icon as EmailPillAvatarIcon } from "../../../../res/img/icon-email-pill-avatar.svg"; import { _t, _td } from "../../../languageHandler"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; -import { - getHostnameFromMatrixServerName, - getServerName, - makeRoomPermalink, - makeUserPermalink, -} from "../../../utils/permalinks/Permalinks"; +import { makeRoomPermalink, makeUserPermalink } from "../../../utils/permalinks/Permalinks"; import DMRoomMap from "../../../utils/DMRoomMap"; import SdkConfig from "../../../SdkConfig"; import * as Email from "../../../email"; @@ -724,18 +719,6 @@ export default class InviteDialog extends React.PureComponent { expect(screen.getByText(`Invite to ${roomId}`)).toBeInTheDocument(); }); - it("should suggest valid MXIDs even if unknown", async () => { + it("should not suggest valid unknown MXIDs", async () => { render( { initialText="@localpart:server.tld" />, ); - - await screen.findAllByText("@localpart:server.tld"); // Using findAllByText as the MXID is used for name too + await flushPromises(); + expect(screen.queryByText("@localpart:server.tld")).not.toBeInTheDocument(); }); it("should not suggest invalid MXIDs", () => {