Testing Web Apps with Cypress

Sign In Test Exercise

Steve Kinney

Steve Kinney

Temporal
Testing Web Apps with Cypress

Check out a free preview of the full Testing Web Apps with Cypress course

The "Sign In Test Exercise" Lesson is part of the full, Testing Web Apps with Cypress course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to test the sign in process. The database should first be seeded with users. The test should log in with one of the users and verify the login works.

Preview
Close

Transcript from the "Sign In Test Exercise" Lesson

[00:00:00]
>> Now your mission is that is the signup process. Luckily for you, the sign in process is effectively half of this test, right? Instead of resetting the database, we want to seed it with known users, right, and they don't need to sign up for an account. Now extra things that we could do, like here's where you would also take this test, which you'd see the database.

[00:00:21]
And then you could theoretically go try to sign up with a user that already exists in the database, and you should get the error that you expect. There's many additional ways that you could take this, and obviously if you're doing full if you're doing the happy and unhappy paths you would test for all of those things.

[00:00:37]
But it's mostly I should see this error it's versions of things we've already done at this point multiple times. But the kind of new piece is just, yeah, setting up for our test where you seed the database using a seed task and then you only have the part when you sign up, and they should already exist in this case.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now