-
Notifications
You must be signed in to change notification settings - Fork 86
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
Recognizing routes with queryParams #53
Comments
@CamonZ can you share some code, or a failing test case? Curious to learn more about this use case. |
Failing test as an Ember app: https://github.com/nathanhammond/rrtest-app |
Is there any update on this issue ? I encounter the same problem while using pretender.js : I'd like to use different stubs for the same route but different query parameters with no luck. |
@jmeas it's been a while, I'd have to dig, and see if I have the failing code somewhere. From my original description, it looks like the issue was that
Were both being recognized simply as: |
@CamonZ @jmeas : @nathanhammond wrote a failing test as an Ember app few comments above, not sure if this is still relevant. Anyway, I did not dig into the When I try to stub a request on Pretender.js which includes query params (see code below), the request is not handled :
From what is said on this Pretender issue, Pretender needs some changes on |
I just got into this trap. This either needs to be supported or clearly documented under some sort of caveats section. |
I've also just come across this issue while trying to use Pretender.js with query params in my URL. Was there any progress made on a fix or is there anything that I can do to help it along? |
I came across this issue recently too while working with Pretender. I would be happy to move this forward with a PR but wanted to ask if this is something that would be ok for route recognizer to support before doing the work? |
Bumping this as I've also encountered it while using Pretender.js. Is there any update on this? |
I feel query params should not be a part of a route definition. At least I can't recall any MVC Framework which allows you to map routes to something other than URL |
Hi, over at @stackbuilders/all we're using
route-recognizer
as part of pretender.js to test an Ember app.We have a complex scenario we're we are calling a backend endpoint with different query params to get a filtered collection of items leaving us with very complex test code where we map the params to what the responses should be.
From looking at the code of the library you guys are already adding the endpoint with the query params but when recognizing it you guys are dropping the query params leaving the
recognize
without viable solutions because it can't find any handlers for the route without the query paramsIs this the intended behaviour, would making a patch for it to match the url with the queryParams make sense to you?
EDIT: Updated the code references to
v0.1.9
which was the version used at the time I reported this.The text was updated successfully, but these errors were encountered: