Skip to content
A shopping cart demo made with React, Redux, and React Router and includes unit and integration tests
JavaScript CSS
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
img update readme Mar 5, 2017
src add eslint and lint files Mar 6, 2017
test add integration tests Feb 25, 2017
.babelrc add actions, reducers, and tests Feb 20, 2017
.eslintrc add eslint and lint files Mar 6, 2017
.gitignore add actions, reducers, and tests Feb 20, 2017
README.md update readme Mar 5, 2017
gulpfile.babel.js add eslint and lint files Mar 6, 2017
package.json add eslint and lint files Mar 6, 2017
server.js add components and assets Feb 21, 2017
wdio.conf.js add integration tests Feb 25, 2017
webpack.config.js move css and js to separate folders Mar 5, 2017

README.md

react-shopping-cart-demo

A shopping cart demo made with React, Redux, and React-router. This demo includes unit and integration tests. An interactive demo can be found on Codepen.

React Shopping Cart Demo

Getting started

Clone the git repo:

git clone https://github.com/paulmskim/react-shopping-cart-demo.git

Install node modules:

npm install

Run express server with npm run server and visit http://localhost:8080.

To make changes to the React components, ensure npm run server is not running and run npm run dev to begin making changes. Whenever a file is saved, webpack-dev-server will compile the code and the browser will automatically refresh http://localhost:8080 to reflect the changes.

When all the changes have been made, run npm run build to build a new static asset or npm run prod to build a production-optimized asset.

Testing

To run unit tests, run:

npm run unit-test

Coverage of components can be see in /coverage.

To run integration tests, run:

npm run integration-test

Ensure you have at least Firefox 49 for integration tests. Webdriverio selectByValue will not work in Firefox 48 and earlier.

You can’t perform that action at this time.