The activity for this chapter is to complete automating this page [Form Authentication] using all that you have been taught.
It accepts a Username. It accepts a Password, and you click Login.
After you log in you should be taken to a dashboard. So, if we enter “tomsmith”, and the password SuperSecretPassword!” and click Login, we get the message, "You logged into a secure area!"
And we can also Logout and we get the message, "You logged out of the secure area!"
So, using all that you have been taught, I want you to come up with a way of how to test this functionality, logging in, verify that you have logged in, logged out.
Also, there are errors that you get if enter the wrong username or password, or let's say you did not enter anything.
So, you can get an error saying, "Your username is invalid."
If we enter “tomsmith” as a username and we don't have a password, we get "Your password is invalid."
There are a lot of tests here that we can do. Some examples:
Verify that a valid username and password will log in the user
Verify that the user can log out
Verify that an invalid username will give the invalid username error
Verify that an incorrect password will give the "Your password is invalid" error
So, for this activity I want you to create those 4 tests.