Installing Cypress
Setting up Cypress involves two different steps. First, we need to install Cypress itself and then install the cypress-rails gem to help us integrate Cypress into our system.
Install Cypress as a package:
â | â$ ââyarnââ ââaddââ ââ--devââ ââcypressâ |
On the Rails side, we need to make sure we have two gems: the cypress-rails gem and the dotenv gem. The gems both go in the Gemfile in the development and test groups, they are already in place in the sample code:
â | group â:developmentâ, â:testâ âdoâ |
â | â# <existing gems...>â |
â | gem â"cypress-rails"â |
â | gem â"dotenv-rails"â |
â | âendâ |
The cypress-rails gem uses environment variables to manage some settings, so ...
Get Modern Front-End Development for Rails, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.