Commit 490042f 1 parent 56c3520 commit 490042f Copy full SHA for 490042f
File tree 1 file changed +32
-0
lines changed
packages/ember/tests/routing
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,38 @@ 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 ( 'application_loading' , `
278
+ <div id="toplevel-loading">TOPLEVEL LOADING</div>
279
+ ` ) ;
280
+ this . add ( 'route:application' , Route . extend ( {
281
+ model ( ) {
282
+ return appDeferred . promise ;
283
+ }
284
+ } ) ) ;
285
+
286
+ this . add ( 'route:dummy' , Route . extend ( {
287
+ redirect ( ) {
288
+ return RSVP . resolve ( )
289
+ . then ( ( ) => this . replaceWith ( 'index' ) ) ;
290
+ }
291
+ } ) ) ;
292
+
293
+ let promise = this . visit ( '/dummy' ) . then ( ( ) => {
294
+ assert . ok ( true ) ;
295
+ } ) ;
296
+
297
+ appDeferred . resolve ( ) ;
298
+
299
+ return promise ;
300
+ }
301
+
270
302
[ '@test Enter child-loading route with correct query parameters' ] ( assert ) {
271
303
assert . expect ( 9 ) ;
272
304
let deferred = RSVP . defer ( ) ;
You can’t perform that action at this time.
0 commit comments