This is a project related to the Sketch hiring process code task.
This project contains a code task for E2E test automation of the Sketch website onboarding. The automation will cover the onboarding scenarios described in this document. Follow the documentation and perform the proper setup and execution guidelines.
Prerequisites:
-
Clone the project
-
To initialize the project issue the below command in project root directory.
npm install
- Configure Cypress dotenv file.
The Cypress dotenv is a NPM library that will load any environment variables defined in your cypress.env.json
file so you can access them via Cypress.env() from within your tests as you would expect.
- Create and add variable in the cypress.env.json file in the root: Since we are going to login in the application using these info. This file won't be commited since it contains sensitive data.
{
"EMAIL": "@yourEmail",
"PASSWORD": "@yourPassword",
"USERNAME": "@yourUsername"
}
Issue the below command in project root directory and get the tests on the Cypress IDE:
npx cypress open
Or issue the bellow command in project root directory to run all tests in headless mode:
npx cypress run
The test cases in this suite are the following:
- Valid login (Positive case)
- Invalid login (Negative cases)
- No email, No password
- No email, valid password
- Valid email, No password
- Valid email, wrong password
- Invalid email
- Invalid email