[Bug] 3.26: Router is not setup in a non-application test
See original GitHub issue🐞 Describe the Bug
Ember 3.24 included a change that meant the router service automatically worked in non-application tests (i.e. no need for this.owner.setupRouter()
) - this worked great in 3.25, but seems to have regressed in 3.26.
🔬 Minimal Reproduction
Run the tests in this repo: https://github.com/grayt0r/ember-router-setup-in-tests.
Relevant code changes are here.
😕 Actual Behavior
The router is not setup and the test fails with an error (the exact error depends on which router method the component calls):
Cannot read property 'generate' of undefined
🤔 Expected Behavior
The router is setup, the link is correctly rendered and the test passes.
🌍 Environment
- Ember: - v3.26.1
➕ Additional Context
The test passes if I downgrade to 3.25.4 or if I add this.owner.setupRouter()
to the test setup.
I think it might be related to this change: https://github.com/emberjs/ember.js/pull/19405.
/cc @Ravenstine @rwjblue
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
CSCvs42498 - NAT Alias not created for some ... - Cisco Bug
Symptom: A pair of IOS-XE routers are configured for application redundancy with NAT. When the primary device is failed to the secondary ...
Read more >Test Your Router - RouterSecurity.org
There are, however, three instances where the firewall tests are not communicating ... The writeup of a bug in some Cisco routers, by...
Read more >Speed Test Bug in RBKE963 Router UI?
Opened a ticket. Tier 2 not calling me back. WAN Network configuration is as follows: Orbi Router -> WAN port -> CAT 8....
Read more >No provider for router" while writing Karma-Jasmine unit test ...
After creating the set up and all components, we ran ng test command from cmd inside angular2test folder. The below file is our...
Read more >How to Fix Internet Connection Problem on ASUS Router?
When you found out your devices (E.g. use a phone, computer, etc. ) which couldn't get Wi-Fi internet access after connecting to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Chatted with @Ravenstine about this today, they are going to work on a failing test reproduction first so we can figure out the right way to fix…
@chriskrycho sorry for the delay, but that fix appears to solve our issues, thank you very much! 🙌