Skip to content

Commit 74ab2e8

Browse files
committed
update input test
1 parent f496dd4 commit 74ab2e8

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

test/specs/elements/Input/Input-test.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,32 @@ describe('Input', () => {
55
it('has the input type of text by default', () => {
66
render(<Input />)
77
.findTag('input')
8-
.props.type.should.equal('text');
8+
.getAttribute('type')
9+
.should.equal('text');
910
});
1011

11-
it('has a default value', () => {
12+
it('allows a defaultValue', () => {
1213
render(<Input defaultValue='John' />)
1314
.findTag('input')
1415
.value.should.equal('John');
1516
});
1617

17-
it('has a type of phone', () => {
18+
it('spreads type on the input element', () => {
1819
render(<Input type='phone' />)
1920
.findTag('input')
20-
.props.type.should.equal('phone');
21+
.getAttribute('type')
22+
.should.equal('phone');
2123
});
2224

23-
it('has a name of emailAddress', () => {
25+
it('spreads name on the input element', () => {
2426
render(<Input name='emailAddress' />)
2527
.findTag('input')
26-
.props.name.should.equal('emailAddress');
28+
.getAttribute('name')
29+
.should.equal('emailAddress');
2730
});
2831

29-
it('is an icon input if icon given', () => {
32+
it('adds an icon element given an icon class and prop', () => {
3033
render(<Input className='icon' icon='linkedin' />)
3134
.findTag('i');
3235
});
33-
34-
it('has an icon class if icon given', () => {
35-
render(<Input className='icon' icon='foo' />)
36-
.findClass('ui icon input');
37-
});
3836
});

0 commit comments

Comments
 (0)