This application is almost complete! It is your job to add in the necessary network request so the app works as expected. You will also test this network request using Cypress. Follow the steps below carefully.
- Clone down this repo and
cd
into the directory - Run
npm i
- Run
npm start
- Clone down the backend repo and
cd
into that directory - Run
npm i
- Run
node server.js
- Spend some time reading through both codebases and clicking around the app (Note: There IS a bug in the app! This is what you are in charge of fixing!)
- Go to the
apiCalls.js
file in the FE repo - Complete the function by following the steps outlined (Note: When you're done, the app should work with NO bugs!)
- Install Cypress into your FE repo
- Write a Cypress test that intercepts the POST request and tests the user flow: If a user gets the answer correct, the card should be replaced with a new card
- Write a Cypress test that intercepts the POST request and tests the user flow: If a user gets the answer wrong, the card should NOT be replaced with a new card
- (optional πΆπΆ challenge) Write a sad path Cypress test that intercepts the POST request and stubs a response with a 500 status code. What should appear on the page if there is an error (hint: look at
MatchCard.js
)? Test that it renders as expected!