You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this deprecation I started to replace some calls to replaceRoute & transitionToRoute by calls on router service on my ember App...
The result was a lot of failing test (mainly test using getCurrentURL helper) because of URL now includes Query Params :
Calling transitionTo from the Router service will cause default query parameter values to be included in the URL.
(see RouterService transitionTo documentation)
On some test, I replaced the getCurrentURL by getCurrentRouteName helper & it works great.
But for some tests, I can't because I need to test the route, but also the dynamic segment value like :
Sorry for the delayed response here, I'm not 100% sure what the goal of the new helper would actually be. Can you give me a couple of example inputs/outputs?
Hi !
According to this deprecation I started to replace some calls to
replaceRoute
&transitionToRoute
by calls onrouter
service on my ember App...The result was a lot of failing test (mainly test using
getCurrentURL
helper) because of URL now includes Query Params :On some test, I replaced the
getCurrentURL
bygetCurrentRouteName
helper & it works great.But for some tests, I can't because I need to test the route, but also the dynamic segment value like :
What I've done to fix this, is create a new helper returning only the pathName of the current URL.
So I'm wonder if a such helper could be implemented here as a part of
ember-test-helpers
?I can create a PR for this, but just want to be sure it's a good idea before working on it 🤔
The text was updated successfully, but these errors were encountered: