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