File tree 1 file changed +26
-0
lines changed
packages/ember/tests/routing
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -629,6 +629,32 @@ moduleFor(
629
629
} ) ;
630
630
}
631
631
632
+ [ '@test GH#16921 transitioning works if both model and query params are supplied and refreshModel is true' ] ( assert ) {
633
+ assert . expect ( 2 ) ;
634
+
635
+ this . router . map ( function ( ) {
636
+ this . route ( 'target' , { path : 'target/:target_id' } ) ;
637
+ } ) ;
638
+
639
+ this . add (
640
+ 'route:target' ,
641
+ Route . extend ( {
642
+ queryParams : {
643
+ param1 : {
644
+ refreshModel : true ,
645
+ } ,
646
+ } ,
647
+ model ( ) { } ,
648
+ } )
649
+ ) ;
650
+
651
+ return this . visitAndAssert ( '/' ) . then ( ( ) => {
652
+ let model = { id : '123' } ;
653
+ this . transitionTo ( 'target' , model , { queryParams : { param1 : 'new_param_value' } } ) ;
654
+ this . assertCurrentPath ( '/target/123?param1=new_param_value' ) ;
655
+ } ) ;
656
+ }
657
+
632
658
[ '@test multiple QP value changes only cause a single model refresh' ] ( assert ) {
633
659
assert . expect ( 2 ) ;
634
660
You can’t perform that action at this time.
0 commit comments