-
Notifications
You must be signed in to change notification settings - Fork 163
Handle disabled components #36
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
Conversation
I havent been able to work out how to use the test libraries to test that something wont occur. I've tried to duplicate the test that confirms a route transition occurs, but becuse when the button is disabled such a transition occurs, the second step doesnt apply and done() isnt called.
Any guidance would be appreciated on how to approach this.
@mtscout6 this looks good to me, what do you think?
Looks good to me as well. I'm on my phone though and can't merge right now.
On Sat, May 2, 2015, 14:46 Hugo Dozois notifications@github.com wrote:
@mtscout6 https://github.com/mtscout6 this looks good to me, what do
you think?—
Reply to this email directly or view it on GitHub
https://github.com/mtscout6/react-router-bootstrap/pull/36#issuecomment-98398511
.
@mtscout6 I need to test a thing though, I'm not sure it's going to work properly since the event is not defaultPrevented
@dozoisch Were you able to test this out?
@mtscout6 Ill try to find some time hehe ! time is pretty good at Hide and Seek
I spent a bit of time looking into how to test it, and came up with the commit I just pushed. Let me know if its suitable or not. I still dont know enough about mocha/karma/javascript testing to be certain this test covers what is necessary.
Usually such testing are done by Sinon spy functionality,
but it seems this not throw error
-approach would do 👍
I'm not totally sure if this is appropriate, however I've been encountering issues where a disabled Nav item will still transition to the supplied route even though it is disabled.