-
Notifications
You must be signed in to change notification settings - Fork 0
Custom Commands
Parameters:
- selector -> The element selector
This command takes a data-cy element selector and forms a string such as [data-cy=${selector}]
then uses the cy.get()
to locate the element.
Parameters: None
This command visits /account/login
inputs email, password, clicks on 'Remember Me' button and on submit on LoginForm.
It uses the testuser
credentials found on: https://github.com/manuel12/productivity-app/wiki/Test-Data#testuserjson
Parameters:
- cb -> A callback triggered on the response.
This command logs in programmatically through the POST /api/login
endpoint.
It uses the testuser
credentials found on: https://github.com/manuel12/productivity-app/wiki/Test-Data#testuserjson
Parameters: None
This command visits /account/register
inputs username, email, password, password confirmation and on submit on RegisterForm.
It uses the testuser
credentials found on: https://github.com/manuel12/productivity-app/wiki/Test-Data#testuserjson
Parameters:
- user -> A user credentials objects that can be used to register instead of the default testuser credentials.
This command register a user programmatically through the POST /api/user
endpoint.
If the user
credentials object is provided it registers those credentials and if not it uses the testuser
credentials found on: https://github.com/manuel12/productivity-app/wiki/Test-Data#testuserjson
Parameters: None
This command programmatically deletes all test users through the DELETE /api/users/delete-test-users/
endpoint.
Parameters: None
This command programmatically deletes all test todos through the DELETE /api/users/delete-test-todos/
endpoint.
Parameters: None
This command programmatically deletes all test dailies through the DELETE /api/users/delete-test-dailies/
endpoint.