Skip to content

Commit

Permalink
revert manipulated test to original form
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tore Simonsen committed Oct 15, 2024
1 parent 878da9e commit 49fac4c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/components/views/dialogs/InviteDialog-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -464,19 +464,19 @@ describe("InviteDialog", () => {

it("should not allow pasting the same user multiple times", async () => {
// VERJI modify invite kind, due to heavy modifications in invitation flow
// render(<InviteDialog kind={InviteKind.Invite} roomId={roomId} onFinished={jest.fn()} />);
render(<InviteDialog kind={InviteKind.Dm} onFinished={jest.fn()} />);
render(<InviteDialog kind={InviteKind.Invite} roomId={roomId} onFinished={jest.fn()} />);
//render(<InviteDialog kind={InviteKind.Dm} onFinished={jest.fn()} />);

const input = screen.getByTestId("invite-dialog-input");
input.focus();
await userEvent.paste(`${bobId}`);
await userEvent.keyboard("[Enter]"); // Verji: Add this line to register input
//await userEvent.keyboard("[Enter]"); // Verji: Add this line to register input

await userEvent.paste(`${bobId}`);
await userEvent.keyboard("[Enter]"); // Verji: Add this line to register input
//await userEvent.keyboard("[Enter]"); // Verji: Add this line to register input

await userEvent.paste(`${bobId}`);
await userEvent.keyboard("[Enter]"); // Verji: Add this line to register input
//await userEvent.keyboard("[Enter]"); // Verji: Add this line to register input

expect(input).toHaveValue("");
await expect(screen.findAllByText(bobId, { selector: "a" })).resolves.toHaveLength(1);
Expand Down

0 comments on commit 49fac4c

Please sign in to comment.