v3.6.0-beta.1: redirect causes `visit` test helper to fail
I have a test case like:
test('visiting `/retirement`', async assert => {
await visit('/retirement');
assert.strictEqual(
currentURL(),
'/retirement-check',
'redirects to `/retirement-check`'
);
});
Prior to v3.6.0-beta.1 (v3.5.0 to be precise) this test worked.
Now it fails with a TransitionAborted error. Adding a noop catch clause fixes it:
test('visiting `/retirement`', async assert => {
await visit('/retirement').catch(() => {});
assert.strictEqual(
currentURL(),
'/retirement-check',
'redirects to `/retirement-check`'
);
});
Is this expected behavior? Do we want redirects to bubble up to the visit helper as a TransitionAborted error?
Possibly related https://github.com/emberjs/ember-test-helpers/issues/332
What I find weird, is that it used to work before. But yeah, possibly related. ☺️
Related to https://github.com/emberjs/ember.js/issues/17152...
Looks like the same as #17152.
See https://github.com/wagenet/ember-transition-abort-test which passes on latest and beta, but fails on canary, as visible here: https://travis-ci.com/wagenet/ember-transition-abort-test.
The commit that causes issues is 9b7e0f5, though on the face of it, it should be unobjectionable.
I submitted https://github.com/emberjs/ember.js/pull/17155 to revert https://github.com/emberjs/ember.js/commit/9b7e0f58542bb3bccbfdbb6cc2da1890b7ee4f06 while we work through some timing issues.
Hmm, the fix above definitely addressed the reproduction that @wagenet shared but I'm not 100% sure it will fix the issue @buschtoens has. The commit that I reverted (https://github.com/emberjs/ember.js/commit/9b7e0f58542bb3bccbfdbb6cc2da1890b7ee4f06) doesn't exist in the current beta branch...
@buschtoens - Can you help us track this down with a reproduction?