Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asadhasan/cypress-react-component-testing
Using Cypress to do component testing of basic React components (created via create-react-app, and deployed on Heroku via Terraform).
https://github.com/asadhasan/cypress-react-component-testing
create-react-app cypress-component-testing dependabot docker docker-compose eslint heroku javascript multi-stage-docker npm prettier react terraform-heroku
Last synced: 21 days ago
JSON representation
Using Cypress to do component testing of basic React components (created via create-react-app, and deployed on Heroku via Terraform).
- Host: GitHub
- URL: https://github.com/asadhasan/cypress-react-component-testing
- Owner: AsadHasan
- License: mit
- Created: 2021-12-27T19:59:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T21:31:44.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T07:30:44.090Z (2 months ago)
- Topics: create-react-app, cypress-component-testing, dependabot, docker, docker-compose, eslint, heroku, javascript, multi-stage-docker, npm, prettier, react, terraform-heroku
- Language: JavaScript
- Homepage:
- Size: 1.86 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cypress React Component Tests
Basic component tests using the currently experimental `Cypress Component Testing` library, to test individual `React` components of a very basic app (which calls the NASA 'picture of the day' API, and displays image title as heading and the image itself, and offers a button to toggle the detailed description of the image) created using the `Create-React-App` tool and deployed on Heroku (https://simple-react-app-123456.herokuapp.com/). Heroku deployed is managed via Terraform.
## Run the app locally
**Prerequisites**: Environment variables `REACT_APP_URL` (API base url) and `REACT_APP_API_KEY` (API key for the API) need to be defined.
App can be run by either of following methods:
- Via npm: Run `npm start`
- Via `docker-compose`: Run `docker-compose up`## Running component tests
Run `npm test`