-
Notifications
You must be signed in to change notification settings - Fork 13.5k
fix(angular): transition animation plays when using browser back and forward buttons #28188
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
Changes from 3 commits
9b00e20
64e0b44
9846503
b7d25ea
887bad1
c36494b
bb91eb8
e36e541
45ae7d3
0f51294
b5f487c
9f2ea5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ describe('Router Link', () => { | |
describe('back', () => { | ||
it('should go back with ion-button[routerLink][routerDirection=back]', () => { | ||
cy.get('#routerLink-back').click(); | ||
testBack(); | ||
}); | ||
|
||
it('should go back with a[routerLink][routerDirection=back]', () => { | ||
|
@@ -138,6 +139,7 @@ function testForward() { | |
cy.get('app-router-link-page #canGoBack').should('have.text', 'true'); | ||
|
||
cy.go('back'); | ||
cy.wait(500); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the timeout changes here necessary? If not, could we revert them? (Sorry, I meant to comment on this with my last round of reviews, but it slipped my mind) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also if possible, could you allow me to push changes to your branch? I can resolve the merge conflicts for you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think, it is necessary. Before, the back transition was instant and now it takes the time for the animation which is why we need the additional |
||
cy.testStack('ion-router-outlet', ['app-router-link']); | ||
cy.testLifeCycle('app-router-link', { | ||
ionViewWillEnter: 2, | ||
|
@@ -159,7 +161,7 @@ function testRoot() { | |
cy.get('app-router-link-page #canGoBack').should('have.text', 'false'); | ||
|
||
cy.go('back'); | ||
cy.wait(100); | ||
cy.wait(500); | ||
cy.testStack('ion-router-outlet', ['app-router-link']); | ||
cy.testLifeCycle('app-router-link', { | ||
ionViewWillEnter: 1, | ||
|
@@ -181,7 +183,7 @@ function testBack() { | |
cy.get('app-router-link-page #canGoBack').should('have.text', 'false'); | ||
|
||
cy.go('back'); | ||
cy.wait(100); | ||
cy.wait(500); | ||
cy.testStack('ion-router-outlet', ['app-router-link']); | ||
cy.testLifeCycle('app-router-link', { | ||
ionViewWillEnter: 1, | ||
|
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 don't understand the test change here. The fix modifies whether or not an animation is used, but
testBack
does not verify this.Uh oh!
There was an error while loading. Please reload this page.
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.
This was just an issue I fixed where the test executed the back navigation, but did not call
testBack
like the other test cases. I assumed it was missed originally when writing the test.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.
Thanks for the clarification. Is this change necessary to validate the bug you fixed? If not, could we remove it from the PR?
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.
Sure :)