-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Ember router doesn't know that it's without router.router while testing. #11610
Comments
Here's the minimalist reproduction. I'll be tracing this tomorrow. Notes:
Something fishy here. |
Original report is a collection of symptoms from just one problem. The issue is simply this: the container set up for testing doesn't resolve for Haven't decided how best to fix this, just documenting. |
@nathanhammond - these lines ensure that the default built registry contains |
Still an error moving to [email protected], just a different one. :) I've updated all dependencies to their latest versions in the minimal reproduction. emberRouter.router is Untraced at this point, will continue to look... |
Two issues:
|
The router instance is never set up, though it is expected to be inside of the Ember Router at runtime. Related to [emberjs/ember.js#11610](emberjs/ember.js#11610).
#11522 was not targeted for release branch, and we do not want to start routing for integration tests. With the latest beta builds, you should be able to use a {{link-to}} in your ember-qunit integration tests without calling 'startRouting'. |
The answer here can't be "don't use 1.13" or "move directly from 1.12 to 2.0." If 1.13 is going to actually receive first class support for the long term (and is our bridge for deprecations), we need testing of components with I'm game to code up other solutions, this was the minimally-invasive approach. Proposals? (We can consolidate conversation here for all of these things.) |
As I commented in that other PR, we need to vet the changes from #11522 to make sure they do not make matters worse in 1.13. |
Okay, and calling |
Offline conversation summary:
|
Discussed a 'safe' solution (essentially adding a few more guards where we attempt to access 'router.router') with Nathan a few minutes ago. I think we can land those fixes into all branches (along with Tom's fix).
|
While it isn't elegant, I'm OK with a pragmatic approach to returning compatibility to the 1.13 series. I'd like to revisit this entire code path in 2.x. |
Closed by #11639. |
This line interacts very oddly in our 1.13 (release channel edge) testing:
https://github.com/emberjs/ember.js/blob/master/packages/ember-routing-views/lib/views/link.js#L269
The
get
call fails with theobj
in that call beingundefined
(nonsensically, it's clearly being passed in). However, if I change it to:... then it works. This seems counter to failure modes I'm familiar with in Ember. Error message is (since
routing
isn't set for the subsequentget
call): "Assertion Failed: Cannot call get with 'targetState' on an undefined object."(Posting this primarily for search engines.)
The text was updated successfully, but these errors were encountered: