Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kg: add focus functionality to DateInput #312

Merged
merged 2 commits into from
Oct 13, 2017

Conversation

buronnie
Copy link

const component = wrapper.instance();
sinon.spy(component.inputEl, 'focus');
component.focus();
assert.equal(component.inputEl.focus.calledOnce, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend using sinon asserts where possible since they give nicer error messages on failure. Something like sinon.assert.calledOnce(component.inputEl.focus);

@gthomas-appfolio gthomas-appfolio merged commit 0aa6b5b into master Oct 13, 2017
@gthomas-appfolio gthomas-appfolio deleted the feature/add-focus-to-date-input branch October 13, 2017 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants