These tests simulate typical user interactions with both the Gist UI application and its API.
- Install homebrew (if you prefer):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install node:
brew install node
-
Download Visual Studio Code
-
Create a new folder and Open it in Visual Studio Code
-
Open the terminal
-
Create package.json file:
npm -i init
- Install Cypress:
npm install cypress --save -dev
- Open Cypress:
npx cypress open
or node_modules/.bin/cypress open
- Click E2E Testing selection when the Welcome to Cypress! page opened.
- Click Continue in Configuration files page.
- Click Start E2E Testing in Chrome button in Choose a browser page.
- Click Scaffold example specs selection in Create your first spec page.
- Click Okay, I got it! button.
-
Open the terminal and change the current working directory to the location where you want to clone the repository.
-
Clone this repo to your device.
-
Install homebrew (if you prefer):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install node:
brew install node
- Install project dependencies:
npm install
-
Create a file named "cypress.env.json" and fill in your GitHub credentials such as "cypress.example.env.json"
-
Run all tests interactively:
npx cypress open
npm install --save-dev cypress-file-upload
npm install --save-dev @4tw/cypress-drag-drop
I am using SelectorsHub to find the UI elements.