Skip to content
This repository has been archived by the owner on Aug 18, 2019. It is now read-only.
/ react-demo Public archive

An fully working single page app demo using React and Redux that consumes an API and displays its data on the page.

License

Notifications You must be signed in to change notification settings

markwylde/react-demo

Repository files navigation

React with Redux Demo

This is an example of building a React application using a Redux store. The app is fully tested, showing how to use Mocha for unit tests and CasperJS for end to end testing.

Build Status Coverage Status Dependancies Check Node.js BrowserStack GitHub


Screenshot

screenshot of react-demo

Installation

Installation instructions:

  • Clone this git repository locally and navigate to the folder in your console.
  • Install the node dependancies by running npm install
  • Launch the application in dev mode by running npm run dev
git clone git@github.com:markwylde/react-demo.git
cd react-demo
npm install
npm run dev

Deployment:

  • Check your code passes all unit tests by running npm run unit_tests
  • Check your code is well structured and formatted to the correct standards npm run lint
  • Run npm run build to compile the source into ./dist.
  • Check your code passes all feature tests npm run feature_tests
npm run unit_tests
npm run lint
npm run build
npm run TEST_WEBSERVER="dist" npm run feature_tests

##Testing:# ###Feature Tests## The feature test runner comes with the ability to start a local webserver. When running the tests locally you wil probably want to test the already running webpack-dev-server. So that is the default behaviour of feature_tests.

  • If you would like to feature test the build (dist) directory you can add the TEST_WEBSERVER environment variable:
TEST_WEBSERVER="dist" npm run feature_tests

####Locally####

  • To run the feature tests locally just run
npm run feature_tests

####BrowserStack####

Make sure you have the BrowserStackLocal service running

  • To run the feature tests on browser stack run the following
TEST_BROWSER="browserstack:chrome:osx" BS_USER="???" BS_KEY="???" npm run feature_tests
  • The following test browsers are currently available:
    • browserstack:IE11:windows
    • browserstack:IE10:windows
    • browserstack:IE9:windows
    • browserstack:chrome:osx
    • browserstack:firefox:osx
    • browserstack:safari9:osx
    • browserstack:safari8:osx
    • browserstack:ios:iphone
    • browserstack:android:galaxy

About

An fully working single page app demo using React and Redux that consumes an API and displays its data on the page.

Resources

License

Stars

Watchers

Forks

Packages

No packages published