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 3a7dd8a commit 1c46f29Copy full SHA for 1c46f29
exercises/user_signup/solutions/codely_next-typescript-middle-out/tests/pages/index.spec.ts
@@ -1,8 +1,20 @@
1
-describe("The Home Page", () => {
2
- it("works", () => {
3
-
4
- cy.visit("/")
5
- .contains("User Signup")
6
- .should("exist");
+describe("The sign up user form", () => {
+ it("displays success message on form submission", () => {
+ cy.visit("/");
+ const name = "Jane Doe";
+ const email = "jane@gmail.com";
+
7
+ cy.find
8
+ cy.findByLabelText(/name/i)
9
+ .type(name);
10
+ cy.findByLabelText(/email/i)
11
+ .type(email);
12
13
+ cy.findByRole("button", { name: /submit/i })
14
+ .click()
15
16
+ const successMessage = cy.findByText(/thank you/i)
17
18
+ successMessage.should("exist");
19
});
20
0 commit comments