Skip to content

Commit c003bf5

Browse files
committed
Bad timing routing issue, failing test
1 parent f19f186 commit c003bf5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

packages/ember/tests/routing/substates_test.js

+37
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,43 @@ moduleFor('Loading/Error Substates', class extends ApplicationTestCase {
219219
return promise;
220220
}
221221

222+
['@test Bad timing issue ☠️'](assert) {
223+
let appDeferred = RSVP.defer();
224+
225+
this.router.map(function() {
226+
this.route('dummy');
227+
});
228+
229+
this.addTemplate('application_loading', `
230+
<div id="toplevel-loading">TOPLEVEL LOADING</div>
231+
`);
232+
this.add('route:application', Route.extend({
233+
model() {
234+
return appDeferred.promise;
235+
}
236+
}));
237+
238+
this.add('route:dummy', Route.extend({
239+
beforeModel() {
240+
// step(assert, 1, 'DummyRoute#model');
241+
return RSVP.resolve();
242+
},
243+
244+
redirect() {
245+
RSVP.resolve()
246+
.then(() => this.replaceWith('index'));
247+
}
248+
}));
249+
250+
let promise = this.visit('/dummy').then(() => {
251+
assert.ok(true);
252+
});
253+
254+
appDeferred.resolve();
255+
256+
return promise;
257+
}
258+
222259
['@test Prioritized substate entry works with preserved-namespace nested routes'](assert) {
223260
let deferred = RSVP.defer();
224261

0 commit comments

Comments
 (0)