Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 1.48 KB

README.md

File metadata and controls

47 lines (27 loc) · 1.48 KB

My Binge List solution

Introduction

This app has been bootstrapped using Create React App. I have tried to use as few third dependencies as possible, according to the specifications. In addittion to React and ReactDom dependencies, I have used:

  • idx: to select properties on an object. Very useful in GraphQL.
  • react-media: to conditionally render elements depending on the display size.
  • react-relay: to query the GraphQL server.

I have also used some development dependencies for testing purposes like:

  • react-testing-library for unit testing and integration tests.
  • cypress for end to end testing.

The app implements the GraphQL API instead of the REST API. I had to fix 2 issues:

  • The server was returning 500 status code for mutations. To avoid this error I downgraded the version in the docker-compose file to the previous version 0.2.2.
  • There was no ID defined in the GraphQL schema resulting in an error in Relay, so I added one.

Installation

To install dependencies run yarn inside the bingelist directory.

Start the development server

To start the server run

yarn start

and head to http://localhost:3000

Testing

To execute the unit test and integration test run

yarn test

To execute end to end testing run:

yarn test:e2e

The end to end tests are located under Cypres/e2e directory. The integration and unit tests are located under src/__tests__.

You can also run the end to end tests by opening the cypress browser with yarn cy:open.