diff --git a/cypress/e2e/invite/invite-dialog.spec.ts b/cypress/e2e/invite/invite-dialog.spec.ts index 80edfa411d64..ef1337490d08 100644 --- a/cypress/e2e/invite/invite-dialog.spec.ts +++ b/cypress/e2e/invite/invite-dialog.spec.ts @@ -181,4 +181,16 @@ describe("Invite dialog", function () { // Assert that the message is displayed at the bottom cy.get(".mx_EventTile_last").findByText("Hello").should("exist"); }); + + it("should support pasting one username that is not a mx id or email", () => { + cy.get(".mx_RoomList").within(() => { + cy.findByRole("button", { name: "Start chat" }).click(); + }); + cy.get(".mx_InviteDialog_other").within(() => { + cy.findByTestId("invite-dialog-input").invoke("val", "test"); + cy.findByText("Failed to find the following users").should("not.exist"); + cy.findByTestId("invite-dialog-input").invoke("val", "test,test,test"); + cy.findByText("Failed to find the following users").should("exist"); + }); + }); }); diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index fa81a28bee05..05fe712bfa7c 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -870,11 +870,17 @@ export default class InviteDialog extends React.PureComponent m.userId === address); if (member) {