So I just started using cypress and I am writing an end-to-end test for an application. But I am getting the following error:
_locale.cy.visit is not a function
And this is my test code:
import { cy } from "date-fns/locale";
describe("payment", () => {
it("user can make payment", () => {
// login
cy.visit("/");
cy.findByRole("textbox", { name: /username/i }).type("johndoe");
cy.findByLabelText(/password/i).type("s3cret");
cy.findByRole("checkbox", { name: /remember me/i }).check();
cy.findByRole("button", { name: /sign in/i });
});
});