*Check note under 'E2E tests' section
Series Ratings is an application where you can search for the IMDb & Rotten Tomatoes ratings of your favorite series.
The app visits the IMDb and Rotten Tomatoes websites and uses their own search features to find out the series you requested, then it parses the score on each page and delivers it to you on a results page. It also creates a record of the searched series on the database so the next time you search for it the result will be retrieved faster.
Write the series of your choosing in the search bar in order to have the application fetch it's IMDb score and Rottentomatoes tomatometer and audience scores.
It shouldn't take more than 6 seconds to load the values the first time. The next time you search for the same series the app will show the score's inmediatly.
For installing the Django application clone the repository and run:
pipenv install
This will install the virtual environments and all dependencies.
Now start the virtual environment shell:
pipenv shell
Run migrations: python manage.py makemigrations python manage.py migrate
Create superuser:
python manage.py createsuperuser
Now you can start server...
python manage.py runserver
...and visit http://localhost:8000/
For installing the React application go to the front-end folder and run:
npm install
And after install is finished run:
npm start
For installing Cypress go to the e2e folder and run:
npm install
Type | Location |
---|---|
api | e2e/cypress/integration/api-tests |
ui | e2e/cypress/integration/ui-tests |
unit | media_ratings/tests |
For running the tests run:
python manage.py test
For running the tests go to the e2e folder and run:
npm run test
For running the tests on headless mode run:
npm run test:headless
For opening cypress client run:
npm run test:open
Note: currently the test of the tv series The Crown are failing (hence the 3 failed tests shown on cypress badge). These tests are failing because the Rotten Tomatoes parser is parsing the results of another tv series other than The Crown. An update will be made once I figure out how to make the parser pick the correct series.
- Django.
- DRF.
- React
- React-Bootstrap.
- Font Awesome icons.
- Cypress.
- Web Parsing.
- UI tests.
- API tests.
- Unit tests.