Local running of the application requires enabling of the Cross-origin resource sharing
Assumptions: Redux state management is not used in the solution due to small size of the project and to reduce the complexity of the current solution.
Only the main error messages are handled:
- one of the cinema's end point didn't respond will ask for Refresh.
- price is nod loaded, will ask to try again. The rest of the errors are handled by suppressing and showing in the console window: either throwing the error (like bad response/crash of the API call) or showing the message in the console(like timeout).
The main flow:
- Application should show only the movies that are returned by the APIs for both Cinemas.
- If one of the Cinemas end points did not respond or had a call longer than 10 seconds the application will ask to Refresh the page.
- By Clicking on the Poster of the movie, the pop up window will load the movie title and start loading the movie prices from both Cinemas.
- If the price is not loaded (either cinema API) the price will be equal to 'Try Again'. User need to press back button and load the movie again.
- If the prices are loaded, the better price will be highlighted with the green background.
INSTRUCTIONS
- Open Command Terminal/command line/cmd.
- Navigate to the folder containing packege.json file
- a. If running in OSX run: sudo npm i b. If runnin in Windows: make sure that command line is running as Administrator
- after successfull installation of the required packages run: npm start
The default browser will pop up and you can continue with the application