Skip to content

tgrrr/indiefilms

Repository files navigation

Indie Films - WIP

Current state: Alpha

A Chrome plugin to simplify streaming services

Show setup instructions...

1. Install

git clone https://github.com/tgrrr/indiefilms indiefilms
cd indiefilms
yarn

2. Generate an API key

3. Setup an .env file

  • Duplicate the .env file:
mv .env.template .env
  • Edit the following lines:
REACT_APP_MOVIEDB_API_KEY=<MOVIEDB_API_KEY>
# Optionally edit the read access token:
REACT_APP_MOVIEDB_API_READ_ACCESS_TOKEN=<MOVIEDB_API_READ_ACCESS_TOKEN>

4. Setup an cypress.json file

  • Create a copy of the cypress.json file:
mv cypress.json.template cypress.json
  • Edit the following lines:
"REACT_APP_MOVIEDB_API_KEY": "<MOVIEDB_API_KEY>",
# Optionally edit the read access token:
"REACT_APP_MOVIEDB_API_READ_ACCESS_TOKEN": "<MOVIEDB_API_READ_ACCESS_TOKEN>",

(hint: it's the same key as the .env file)

5. Run the app in Development mode

yarn start or yarn watch

Runs the app in the development mode at http://localhost:3000

Development

yarn start or yarn watch

Runs the app in the development mode at http://localhost:3000

Tests

  • yarn run test or yarn run test:run - run Cypress in CLI
  • yarn run test:open - open Cypress browser for visual tests
  • yarn run test:bdd - behaviour driven development (BDD) with Cucumber
Learn more about testing...

Behavior Driven Development

Running test:bdd loads tests where the Cucumber definition includes the tags @focus to let you focus on a single integration/unit test.

You can see the product definitions located in our ./cypress/integration files. If you want to do the same, checkout this simple explanation by Cucumber

# Cucumber example
@focus
Feature: A user can search for TV shows
  In order to keep a list of TV shows I want to watch
  As a user
  I want to be able to search the moviedb for TV shows
  It search for a TV show

  Scenario Outline:
    When I search for the TV show <searchTerm>
    Then I get the <searchResult> for that TV show
    And I get the <year>

     Examples:
       | searchTerm | searchResult | year |
       | Stranger | Stranger Things  | 2016 |
       | Rick | Rick and Morty | 2013 |

Learn more about BDD testing:

Stubbing API requests:

Deploy

  • yarn run build for production
  • TODO: Deployment options
How to contribute...
  • TODO: Roadmap
  • TODO: Contributor guidelines
Reference material...

This project was bootstrapped with Create React App.

API

https://www.themoviedb.org/documentation/api/discover

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published