To get started with Cypress please watch this video: https://docs.cypress.io/guides/overview/why-cypress.html#In-a-nutshell. This site also includes all the documentation you will need for custom commands. This repo is mostly devoted to testing Fulcrum apps and all the custom cypress commands are made for it.
- Download and install node.js onto your computer.
- Clone this repo onto your computer.
- Navigate to the root of the directory and install cypress using
$ npm install --save cypress
- In the root, install the directory's dependancies using
$ npm install
- In the root, create/edit a file called 'cypress.json' and ensure it contains this:
{
"waitForAnimations": true,
"defaultCommandTimeout": 10000,
"pageLoadTimeout": 30000,
"env":{
"email":"[email protected]",
"password":"your_password"
}
}
Don't worry this file is gitignored
- Save all tests within the 'integration' folder within a folder for its app suite.
- Add all new commands to the 'support/commands.js' file
- Add all environmental variables to the 'cypress.json' file
- Everytime your test or commands are saved while the Cypress GUI is open, it listens and will re run all your tests.
- Write tests so each it statement has a different test within it
- Lost as to how to do somthing? Check out this repo
- When you want to test if your test is working, open up the GUI by navigating to the root of the directory and typeing
$ npx cypress open
"Please note that any appearance of danger is merely a device to enhance your testing experience." -GLaDOS