-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix (client/karma): Set reload context flag to avoid full page reload #1648
fix (client/karma): Set reload context flag to avoid full page reload #1648
Conversation
… full page reload error
There were the following issues with your Pull Request
Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html This message was auto-generated by https://gitcop.com |
Could you please explain the reasoning behind these changes? (Not saying they are wrong just having a hard time understanding it) |
@dignifiedquire My thoughts are that, anytime "navigateContextTo" gets called (do a search and find instances of invocation), it's a result of the framework purposely changing the context location, either based on an emitted event or otherwise, thus, resulting in an erroneous "Some of your tests did a full page reload!" when it was not a result of a unit test, but rather, an event within the test framework itself. The 'full page reload' error was getting triggered any time I had excess describe blocks. I'm not sure why the number of describe blocks would affect the number of times this function is called. Perhaps 'execute' is getting emitted more than once? I didn't really dig deep enough to see. |
Okay thanks, merging this as it makes sense and hopefully will improve the behaviour for others :) |
fix (client/karma): Set reload context flag to avoid full page reload
@dignifiedquire there is something else going on here. I'm still seeing the issue after messing with my tests some more. The suite runs as expected, but when I add any additional describe blocks with just basic expectations, true to be true, for instance, I get the full page reload error. |
Did this make it into 0.13.12? |
Yes, please test it and give feedback if it works or not |
We're still receiving the full page reload error in WebKit based browsers with 0.13.12. The tests complete with 392/392 success but fail with the reload error Reference travis log https://travis-ci.org/jashkenas/backbone/builds/86852035 |
@megawac I'm still getting it as well in various browsers. My testing last night must have been a fluke. I'm going to dig a bit deeper into this today. It's really affecting our ability to write tests. |
Yeah, it appears to be all webkit based browsers (karma v0.12 still works). I've tested with Chrome + chrome mobile, safari, and opera |
@megawac I don't think it's browser specific. It's happening in PhantomJS for us as well. |
Isn't phantom also webkit based? I haven't seen this occur with IE, Firefox, Edge, or Opera 11/12 |
@megawac Yes it is. Interesting, let me try ours out in Firefox. |
@megawac I am getting the issue with firefox as well |
I think the issue is that you need to wait for the iframe to be loaded before you set the reloadingContext to false |
@dignifiedquire This did it! Good team work sir. |
@dignifiedquire @megawac Added a fix for when iframe is configured to false: #1655 |
Looking into the failed tests. |
I'm not getting the failed tests locally, hmm. |
Oh I see, there is a PR just before mine: Pull Request #1654 [email protected] breaks build |
I'm starting to think this issue goes a bit deeper guys. I'm unable to trigger a full page reload error at all now. |
...full page reload.
Refer to http://stackoverflow.com/questions/29352578/some-of-your-tests-did-a-full-page-reload-error-when-running-jasmine-tests
and
#1101