Skip to content

Commit 702c6b6

Browse files
committed
✅ Update test to verify if email field is valid
1 parent aa1f5c9 commit 702c6b6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cypress/integration/pages/Forgot/index.test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@ describe("Page Forgot", function() {
88

99
it("Send form without filling in the email input", function() {
1010
cy.visit("/auth/forgot");
11-
cy.contains("Enviar").click();
1211

12+
cy.contains("Enviar").click();
1313
cy.contains("E-mail é obrigatório");
1414
});
1515

1616
it("Send form with email invalid", function() {
1717
cy.visit("/auth/forgot");
18+
1819
cy.get("input[name=email]").type("empix");
1920
cy.contains("Enviar").click();
2021
cy.contains("Preencha com email válido");
2122
});
2223

23-
it("Send form with all fields valid", function() {
24+
it("Send form with email field valid", function() {
2425
cy.visit("/auth/forgot");
26+
2527
cy.get("input[name=email]").type("any.email@gmail.com");
2628
cy.contains("Enviar").click();
29+
30+
cy.get("input[name=email] + span").should("not.exist");
2731
});
2832
});

0 commit comments

Comments
 (0)