time tracker app on react
Time tracking app on React, try demo.
The app is inspired by toggl.com.
Web application based on React (clientside) and Firebase (serverside)
Authentication
Time entry
Tag
Try demo at https://vivid-trace.firebaseapp.com/ and storybook
Simulate onClick
event in shallow
(github)
const componentWrapper = shallow(<Component />)
componentWrapper.simulate('click', { preventDefault() {} })
Simulate change event in material-ui's TextField (github)
const input = wrapper.find('input[name="text"]')
input.node.value = "newvalue"
input.simulate('change', input)
Click on button in a Table's Row without select that row (github)
Doesn't support responsive (github)
Use storyshots to enable unit test. Need install story book addon packages and babel preset
Add .babelrc
to project's root directory
{
"presets": ["babel-preset-es2015", "react-app"]
}
Install packages
npm install storyshots @kadira/storybook-addons @kadira/storybook-channel --save-dev
npm install babel-core babel-preset-es2015 babel-preset-react-app --save-dev
Add src/__tests__/Storyshots.test.js
:
import initStoryshots from 'storyshots'
initStoryshots()
Explicitly add material ui component id so Jest snapshot test doesn't get failed because of auto generated id
Run npm test