Commit e5564cc 1 parent 14b3d81 commit e5564cc Copy full SHA for e5564cc
File tree 1 file changed +44
-0
lines changed
packages/ember/tests/routing
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,50 @@ moduleFor(
267
267
} ) ;
268
268
}
269
269
270
+ [ '@test Bad timing issue ☠️' ] ( assert ) {
271
+ let appDeferred = RSVP . defer ( ) ;
272
+
273
+ this . router . map ( function ( ) {
274
+ this . route ( 'dummy' ) ;
275
+ } ) ;
276
+
277
+ this . addTemplate (
278
+ 'application_loading' ,
279
+ `
280
+ <div id="toplevel-loading">TOPLEVEL LOADING</div>
281
+ `
282
+ ) ;
283
+ this . add (
284
+ 'route:application' ,
285
+ Route . extend ( {
286
+ model ( ) {
287
+ return appDeferred . promise ;
288
+ } ,
289
+ } )
290
+ ) ;
291
+
292
+ this . add (
293
+ 'route:dummy' ,
294
+ Route . extend ( {
295
+ redirect ( ) {
296
+ return RSVP . resolve ( ) . then ( ( ) => {
297
+ expectDeprecation ( ( ) => {
298
+ this . replaceWith ( 'index' ) ;
299
+ } , 'Calling replaceWith on a route is deprecated. Use the RouterService instead.' ) ;
300
+ } ) ;
301
+ } ,
302
+ } )
303
+ ) ;
304
+
305
+ let promise = this . visit ( '/dummy' ) . then ( ( ) => {
306
+ assert . ok ( true ) ;
307
+ } ) ;
308
+
309
+ appDeferred . resolve ( ) ;
310
+
311
+ return promise ;
312
+ }
313
+
270
314
[ '@test Enter child-loading route with correct query parameters' ] ( assert ) {
271
315
assert . expect ( 8 ) ;
272
316
let deferred = RSVP . defer ( ) ;
You can’t perform that action at this time.
0 commit comments