Skip to content

Commit 2e21bb8

Browse files
committed
Fix JS test
1 parent aae70a0 commit 2e21bb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

site/src/pages/CreateUserPage/CreateUserPage.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ const fillForm = async ({
3434
await userEvent.type(emailField, email);
3535
await userEvent.type(loginTypeField, "password");
3636
await userEvent.type(passwordField as HTMLElement, password);
37-
const submitButton = await screen.findByText("Create user");
37+
const submitButton = screen.getByRole("button", {
38+
name: "Create user",
39+
});
3840
fireEvent.click(submitButton);
3941
};
4042

0 commit comments

Comments
 (0)