Skip to content

Commit

Permalink
Test the focus() method on Select
Browse files Browse the repository at this point in the history
  • Loading branch information
mcls committed Oct 28, 2016
1 parent a8f4118 commit dfe4119
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Select-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3799,4 +3799,17 @@ describe('Select', () => {
});
});
});

describe('.focus()', () => {
beforeEach(() => {
instance = createControl({});
});

it('focuses the search input', () => {
var input = ReactDOM.findDOMNode(instance.input).querySelector('input');
expect(input, 'not to equal', document.activeElement);
instance.focus();
expect(input, 'to equal', document.activeElement);
});
});
});

0 comments on commit dfe4119

Please sign in to comment.