Skip to content

Instantly share code, notes, and snippets.

@JWLangford
Created April 29, 2021 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JWLangford/acce8c9944f133102bb6314848af32b4 to your computer and use it in GitHub Desktop.
Save JWLangford/acce8c9944f133102bb6314848af32b4 to your computer and use it in GitHub Desktop.
it("enables submit when form is filled out", () => {
const { getByTestId } = render(<FormTest />);
const password = getByTestId("account-delete-password");
const confirm = getByTestId("account-delete-confirm");
const submit = getByTestId("account-delete-submit");
fireEvent.change(password, { target: { value: "password" } });
fireEvent.click(confirm);
expect(submit).not.toHaveClass("Mui-disabled");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment