Signup
Learn about custom signup commands.
We'll cover the following...
Introduction
At least half of RealWorld features require a user to be authenticated. By default, Cypress does not allow you to share the state between the tests (which would otherwise be an anti-pattern). We need to transform the signup process into something usable by every test: a Cypress custom command.
A Cypress Custom Command is a function that can be called from the global cy
object. We are going to create a cy.signupV1()
command to be run before every other test.
Steps to create a new Cypress custom command:
-
Create a new file containing the code of the command itself in the
cypress/support
...