Add regression tests for RouterService transitionTo#21409
Open
olenderhub wants to merge 2 commits into
Open
Conversation
| this.add( | ||
| 'controller:parent.child', | ||
| Controller.extend({ | ||
| queryParams: { |
Contributor
There was a problem hiding this comment.
doesn't this config go on the route?
Contributor
Author
There was a problem hiding this comment.
@NullVoxPopuli Thank you for this comment. I am sorry, I didn't reproduce this properly, so these tests passed. I pushed code with I believe proper reproduction of your twiddle code #19497 (comment), then I noticed this issue still exit, so I also pushed proposition of fix to this problem. After this pnpm run test:wip passing. Please check it again
…params Add two tests verifying that RouterService#transitionTo does not re-run the application model hook when transitioning with unchanged query params - one using route name, the other using URL string.
- Skip model refresh when query param serialized value matches the last finalized value, preventing spurious refreshes during sticky QP hydration or URL transitions with unchanged default values - Fixes regression where transitionTo with same-valued application query params and refreshModel: true would abort the transition
5855634 to
a065381
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds regression coverage for the behavior described in #19497.
The tests cover both route-name transitions and URL-string transitions with
RouterService#transitionTo, and verify that the parent route'smodelhook is not re-run when transitioning to a child route with unchanged query params.This contributes to the routing test coverage work tracked in #19609.
Refs #19497
Refs #19609