quick-diamond-67609
11/29/2022, 1:53 PMorigin command to visit the auth app. But the entire spec will get restarted when I redirect to the next page after typing the email. When I checked the doc, I found that params are not supported in the URLs inside the origin callback function.
Can anyone suggest me an alternate solution for this?
Version: 9.6
App framework: React
js
it("should login successfully", () => {
cy.origin(
"http:localhost:3000/", //auth app URL
{ args },
({ email, otp }) => {
cy.visit("/");
cy.get(".email-field").type("test@gmail.com");
cy.get(".sbmit-btn").click();
// Should redirect to otp page => http:localhost:3000/?email=test@gmail.com
cy.get(".otp-field").type("123456");
}
);
cy.visit("/"); // Should redirect to app url (http:localhost:3001)
});
This is the sample snippet.