79076268

Date: 2024-10-10 22:01:33
Score: 1
Natty:
Report link

This seemed to have solved my problem, although I am still getting the act error.

it("enables the request tokens button if the wallet address input has a valid address", async () => {
    isAddress.mockReturnValue(true);

    render(<FaucetCard setSuccess={jest.fn()} setError={jest.fn()} />);

    const input = screen.getByRole("textbox");
    expect(input).toBeInTheDocument();
    const button = screen.getByTestId("request-tokens-button");
    expect(button).toBeInTheDocument();

    userEvent.type(input, validWalletAddress);

    await waitFor(() => {
      expect(isAddress).toHaveBeenCalledWith(validWalletAddress);
    });

    await waitFor(() => {
      expect(input.value).toBe(validWalletAddress);
    });

    await waitFor(() => {
      expect(button).not.toBeDisabled();
    });
  });
Reasons:
  • RegEx Blacklisted phrase (1): I am still getting the act error
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: melly18