mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
merge release-6.1.4
Release 6.1.4
This commit is contained in:
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [6.1.4](https://github.com/ionic-team/ionic/compare/v6.1.3...v6.1.4) (2022-05-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **vue:** switching between tabs and going back resolves to correct route ([#25206](https://github.com/ionic-team/ionic/issues/25206)) ([b4ba70e](https://github.com/ionic-team/ionic/commit/b4ba70ea148d4f8fc7475d3de798b485238470c8)), closes [#24303](https://github.com/ionic-team/ionic/issues/24303)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.1.3](https://github.com/ionic-team/ionic/compare/v6.1.2...v6.1.3) (2022-04-27)
|
||||
|
||||
|
||||
|
739
packages/vue/package-lock.json
generated
739
packages/vue/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.1.3",
|
||||
"version": "6.1.4",
|
||||
"description": "Vue specific wrapper for @ionic/core",
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build",
|
||||
@ -60,7 +60,7 @@
|
||||
"vue-router": "^4.0.0-rc.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.1.3",
|
||||
"@ionic/core": "^6.1.4",
|
||||
"ionicons": "^6.0.0"
|
||||
},
|
||||
"vetur": {
|
||||
|
@ -38,7 +38,7 @@ window.addEventListener('unhandledrejection', (err) => {
|
||||
});
|
||||
|
||||
const app = createApp(App)
|
||||
.use(IonicVue)
|
||||
.use(IonicVue, { hardwareBackButton: true })
|
||||
.use(router);
|
||||
|
||||
router.isReady().then(() => {
|
||||
|
96
packages/vue/test-app/tests/e2e/specs/hbb.js
Normal file
96
packages/vue/test-app/tests/e2e/specs/hbb.js
Normal file
@ -0,0 +1,96 @@
|
||||
describe('Hardware Back Button', () => {
|
||||
it('should correctly go back to Tab 1', () => {
|
||||
cy.visit('http://localhost:8080/tabs');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab2').click();
|
||||
cy.ionPageHidden('tab1');
|
||||
cy.ionPageVisible('tab2');
|
||||
|
||||
cy.get('#add-tab').click();
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab4').click();
|
||||
cy.ionPageHidden('tab2');
|
||||
cy.ionPageVisible('tab4');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab1').click();
|
||||
cy.ionPageHidden('tab4');
|
||||
cy.ionPageVisible('tab1');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageHidden('tab1');
|
||||
cy.ionPageVisible('tab4');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageHidden('tab4');
|
||||
cy.ionPageVisible('tab2');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageHidden('tab2');
|
||||
cy.ionPageVisible('tab1');
|
||||
});
|
||||
|
||||
it('should correctly go back to the root tab from child pages', () => {
|
||||
cy.visit('http://localhost:8080');
|
||||
|
||||
cy.routerPush('/tabs');
|
||||
cy.ionPageHidden('home');
|
||||
cy.ionPageVisible('tab1');
|
||||
|
||||
cy.routerPush('/tabs/tab1/childone');
|
||||
cy.ionPageHidden('tab1');
|
||||
cy.ionPageVisible('tab1childone');
|
||||
|
||||
cy.routerPush('/tabs/tab1/childtwo');
|
||||
cy.ionPageHidden('tab1childone');
|
||||
cy.ionPageVisible('tab1childtwo');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageDoesNotExist('tab1childtwo');
|
||||
cy.ionPageVisible('tab1childone');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageDoesNotExist('tab1childone');
|
||||
cy.ionPageVisible('tab1');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageDoesNotExist('tab1');
|
||||
cy.ionPageVisible('home');
|
||||
});
|
||||
|
||||
// TODO FW-1389
|
||||
it.skip('should correctly go back to the root tab after switching pages', () => {
|
||||
cy.visit('http://localhost:8080');
|
||||
|
||||
cy.routerPush('/tabs');
|
||||
cy.ionPageHidden('home');
|
||||
cy.ionPageVisible('tab1');
|
||||
|
||||
cy.routerPush('/tabs/tab1/childone');
|
||||
cy.ionPageHidden('tab1');
|
||||
cy.ionPageVisible('tab1childone');
|
||||
|
||||
cy.routerPush('/tabs/tab1/childtwo');
|
||||
cy.ionPageHidden('tab1childone');
|
||||
cy.ionPageVisible('tab1childtwo');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab2').click();
|
||||
cy.ionPageHidden('tab1childtwo');
|
||||
cy.ionPageVisible('tab2');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab1').click();
|
||||
cy.ionPageHidden('tab2');
|
||||
cy.ionPageVisible('tab1childtwo');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageDoesNotExist('tab1childtwo');
|
||||
cy.ionPageVisible('tab1childone');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageDoesNotExist('tab1childone');
|
||||
cy.ionPageVisible('tab1');
|
||||
|
||||
cy.hardwareBackButton();
|
||||
cy.ionPageDoesNotExist('tab1');
|
||||
cy.ionPageVisible('home');
|
||||
});
|
||||
})
|
@ -476,6 +476,64 @@ describe('Tabs', () => {
|
||||
cy.ionPageVisible('home');
|
||||
cy.ionPageDoesNotExist('tabs');
|
||||
});
|
||||
|
||||
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/24936
|
||||
it('should correctly go back after changing tabs', () => {
|
||||
cy.visit('http://localhost:8080/tabs/tab1');
|
||||
|
||||
cy.routerPush('/tabs/tab1/childone');
|
||||
cy.ionPageVisible('tab1childone');
|
||||
cy.ionPageHidden('tab1');
|
||||
|
||||
cy.routerPush('/tabs/tab1/childtwo');
|
||||
cy.ionPageVisible('tab1childtwo');
|
||||
cy.ionPageHidden('tab1childone');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab2').click();
|
||||
cy.ionPageHidden('tab1childtwo');
|
||||
cy.ionPageVisible('tab2');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab1').click();
|
||||
cy.ionPageHidden('tab2');
|
||||
cy.ionPageVisible('tab1childtwo');
|
||||
|
||||
cy.ionBackClick('tab1childtwo');
|
||||
cy.ionPageVisible('tab1childone');
|
||||
cy.ionPageDoesNotExist('tab1childtwo');
|
||||
|
||||
cy.ionBackClick('tab1childone');
|
||||
cy.ionPageVisible('tab1');
|
||||
cy.ionPageDoesNotExist('tab1childone');
|
||||
});
|
||||
|
||||
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/24303
|
||||
it('should correctly perform router.go without errors after navigating into tabs', () => {
|
||||
cy.visit('http://localhost:8080/');
|
||||
|
||||
cy.routerPush('/inputs');
|
||||
cy.ionPageVisible('inputs');
|
||||
cy.ionPageHidden('home');
|
||||
|
||||
cy.routerPush('/routing');
|
||||
cy.ionPageVisible('routing');
|
||||
cy.ionPageHidden('inputs');
|
||||
|
||||
cy.routerPush('/tabs/tab1');
|
||||
cy.ionPageVisible('tab1');
|
||||
cy.ionPageHidden('routing');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab2').click();
|
||||
cy.ionPageHidden('tab1');
|
||||
cy.ionPageVisible('tab2');
|
||||
|
||||
cy.get('ion-tab-button#tab-button-tab1').click();
|
||||
cy.ionPageHidden('tab2');
|
||||
cy.ionPageVisible('tab1');
|
||||
|
||||
cy.routerGo(-1);
|
||||
cy.ionPageVisible('tab2');
|
||||
cy.ionPageHidden('tab1');
|
||||
});
|
||||
})
|
||||
|
||||
describe('Tabs - Swipe to Go Back', () => {
|
||||
|
@ -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