-
Maintainers:
-
Installation
-
Running (locally / CI)
-
Examples and tests
- Fork current repository.
- Go to
https://circleci.com/add-projects/gh/<YOURUSERNAME>
or https://circleci.com/dashboard -> add projects -> set up project (choose the fork) and clickStart building
. - Clone repository with command
git clone https://github.com/<YOUR_USER_NAME>/My-circleci-cypress-ui-automation.git
cd My-circleci-cypress-ui-automation
- Install npm with
npm i
. - Go to https://t.me/botfather , create new bot by
/newbot
command, rememberTELEGRAM_BOT_TOKEN
. - Add bot to your group or start chat with bot.
- Go to
https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/getUpdates
to getchatId
and copychatId
with-
. - At
Circleci > Settings > Contexts (https://circleci.com/gh/organizations/<YOUR_USER_NAME>/settings#contexts)
create contextproject_context
(If you want to change name of context, then also change name at.circleci/config.yml
) - At
Circleci > Settings > Contexts (https://circleci.com/gh/organizations/<YOUR_USER_NAME>/settings#contexts)
create environment variables:
- TELEGRAM_CHAT_ID from step (7)
- CYPRESS_URL with value
https://google.com
- TELEGRAM_BOT_TOKEN from step (5)
- NODE_ENV with value
production
- Create file
cypress.env.json
in project's root folder. - Open file
cypress.env.json
and add{ "URL":"https://google.com" }
- Run test on your local machine with command
npm run cy:run
. (Also you can open cypress menu withnpm run cy:open
then choose which test you need and run it.) - If test succeed, then add all (
gaa
) your changes, commit (git -commit 'branch_name'
) them and push (ggp
) to your repository on github.
In this repository in folder <project_name>/cypress/integration
you cand find example test: smokes.js
.
This test visit URL https://google.com/
and is looking for word Google
in the title. (If you need, you can change this title to your value in URL). If its true then test succeed, else test failed.