fix(react, vue): do not show back button when replacing to root page (#22750)

resolves #22528
This commit is contained in:
Liam DeBeasi
2021-01-13 10:10:44 -05:00
committed by GitHub
parent 64719f49f9
commit 9e9a372497
5 changed files with 55 additions and 4 deletions

View File

@ -76,4 +76,17 @@ Cypress.Commands.add('routerPush', (path) => {
cy.window().then(win => {
win.debugRouter.push(path);
});
})
});
Cypress.Commands.add('routerReplace', (path) => {
cy.window().then(win => {
win.debugRouter.replace(path);
});
});
Cypress.Commands.add('ionBackButtonHidden', (pageId) => {
cy.get(`div.ion-page[data-pageid=${pageId}]`)
.should('be.visible', true)
.find('ion-back-button')
.should('not.be.visible')
});