Skip to content

Commit

Permalink
feat(Input): add Input component
Browse files Browse the repository at this point in the history
  • Loading branch information
lulutia committed Mar 16, 2017
1 parent 81bee15 commit 77f6b75
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions components/Drawer/__tests__/Drawer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var drawerContent = shallow(
</View>
);

var isOpen;
var isOpen = false;
let treeA = shallow(
<Drawer
drawerContent={drawerContent}
Expand All @@ -42,7 +42,7 @@ it('Drawer Test [Type: default, Position: left]', () => {
expect(instance.isLeft).toEqual(true);
expect(tree.state('showMask')).toEqual(false);
instance.openDrawer();
setTimeout(function () {
requestAnimationFrame(function () {
expect(tree.state('showMask')).toEqual(true);
expect(isOpen).toEqual(true);
expect(instance._onMoveShouldSetPanResponder(null, {
Expand All @@ -52,7 +52,7 @@ it('Drawer Test [Type: default, Position: left]', () => {
})).toEqual(true);
})
instance.closeDrawer();
setTimeout(function () {
requestAnimationFrame(function () {
expect(tree.state('showMask')).toEqual(false);
expect(isOpen).toEqual(false);
}, 0);
Expand All @@ -72,15 +72,15 @@ it('Drawer Test [Type: default, Position: left]', () => {
});
expect(instance.styles.main.style.left).toEqual(200);
instance._handlePanResponderEnd();
setTimeout(function () {
requestAnimationFrame(function () {
expect(instance.isOpen).toEqual(true);
expect(instance.styles.main.style.left).toEqual(240);
}, 0);
instance.closeDrawer();
instance._handlePanResponderMove(null, {
dx: 100,
});
setTimeout(function () {
requestAnimationFrame(function () {
expect(instance.isOpen).toEqual(false);
expect(instance.styles.main.style.left).toEqual(0);
}, 0);
Expand Down
1 change: 1 addition & 0 deletions components/Input
Submodule Input added at ee13d2
4 changes: 3 additions & 1 deletion example/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import Drawer from '../components/Drawer/example';
import LabelSelect from '../components/LabelSelect/example';
import Grading from '../components/Grading/example';
import Button from '../components/Button/example';
import Input from '../components/Input/example';

const listData = {
// #list#
DatePicker,
Drawer,
Grading,
LabelSelect,
Button
Button,
Input
};

export default listData;

0 comments on commit 77f6b75

Please sign in to comment.