We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32c46d9 commit 01c1a5fCopy full SHA for 01c1a5f
exercises/user_signup/solutions/codely_next-typescript-middle-out/tests/pages/index.spec.ts
@@ -17,4 +17,23 @@ describe("The sign up user form", () => {
17
18
successMessage.should("exist");
19
});
20
+
21
+ it("displays error message on form submission if data is incorrect", () => {
22
+ cy.visit("/");
23
+ const name = "J";
24
+ const email = "jane@gmail.com";
25
26
+ cy.find
27
+ cy.findByLabelText(/name/i)
28
+ .type(name);
29
+ cy.findByLabelText(/email/i)
30
+ .type(email);
31
32
+ cy.findByRole("button", { name: /submit/i })
33
+ .click()
34
35
+ const successMessage = cy.findByText(/an error ocurred/i)
36
37
+ successMessage.should("exist");
38
+ });
39
0 commit comments