-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransitionAborted on a visit()
#373
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to run prettier on your changes, to make Travis happy! :)
await visit('/purgatory'); | ||
await visit('/'); | ||
|
||
assert.equal(currentURL(), '/purgatory'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might miss something obvious, but why is the current URL expected to be /purgatory
here, after having visited /
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the transition out of /purgatory
is aborted in the willTransition
action
Sorry for the super long delay here, I'd love to resurrect this PR would you have any time to rebase it? |
e214dd5
to
653801b
Compare
@rwjblue — just rebased. However, this test is now failing for me in Safari :-P Chrome seems fine. I wasn't able to dig too far into it, but when I disable the Ember 3.4 check in Something something RSVP and Native Promises commingling === Unhappy Safari? This type of error feels like there's a new promise getting created somewhere that rejects that ends up not being a part of the promise chain where the catch is added in this PR...maybe? |
Yes, sounds like exactly what is happening. I'll try to poke at it in the morning, and see if I can fix it up. Generally speaking, the fix here is correct we just need to entangle things properly to absorb the async in the redirect... |
653801b
to
1d4643f
Compare
Cool beans. I just made a change to get the Does For what it's worth, the |
Yes, aborting a transition is essentially the same as rejecting a promise. |
We're running into this, any updates on this or workarounds for now? |
Fwiw using |
We ran into this issue where an aborted transition (which was the behavior we expected) was causing the
visit()
helper to reject failing our test prematurely.I don't think this was the case before when writing Acceptance Tests before (it may just be the nature of awaiting promises now); but this also feels unexpected or broken.
I'm not sure of the implications of this fix to suppress the error if it's message is
TransitionAborted
.Are there times when we would want that promise to reject when a transition aborts? Should this be configurable instead?
Something like: