mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(vue): switching between tabs and going back resolves to correct route (#25206)
resolves #24303
This commit is contained in:
@ -106,3 +106,15 @@ Cypress.Commands.add('ionBackButtonHidden', (pageId) => {
|
||||
.find('ion-back-button')
|
||||
.should('not.be.visible')
|
||||
});
|
||||
|
||||
/**
|
||||
* If running in a browser, hardwareBackButton: true
|
||||
* must be set in Ionic config for this to work.
|
||||
*/
|
||||
Cypress.Commands.add('hardwareBackButton', () => {
|
||||
cy.document().then(doc => {
|
||||
const ev = new CustomEvent('backbutton');
|
||||
|
||||
doc.dispatchEvent(ev);
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user