mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
merge release-6.2.2
Release 6.2.2
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.2.2](https://github.com/ionic-team/ionic/compare/v6.2.1...v6.2.2) (2022-08-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **vue:** go back to correct view with memory history ([#25732](https://github.com/ionic-team/ionic/issues/25732)) ([8327889](https://github.com/ionic-team/ionic/commit/832788971a7098e52812f66563cbc0a63d3e5df7)), closes [#25705](https://github.com/ionic-team/ionic/issues/25705)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||
|
||||
**Note:** Version bump only for package @ionic/vue
|
||||
|
18
packages/vue/package-lock.json
generated
18
packages/vue/package-lock.json
generated
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.2.1",
|
||||
"version": "6.2.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.2.1",
|
||||
"version": "6.2.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.2.1",
|
||||
"@ionic/core": "^6.2.2",
|
||||
"ionicons": "^6.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -59,9 +59,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@ionic/core": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.2.tgz",
|
||||
"integrity": "sha512-neE+JhtQ7Kb4nGoKR3e55edHQot5BZTw+woV9+pbyCXP1jGeyFeWWPYBYYOkm05TSEkHgh0v6NkV9y31k8GTNw==",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.16.0",
|
||||
"ionicons": "^6.0.2",
|
||||
@ -768,9 +768,9 @@
|
||||
}
|
||||
},
|
||||
"@ionic/core": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.2.tgz",
|
||||
"integrity": "sha512-neE+JhtQ7Kb4nGoKR3e55edHQot5BZTw+woV9+pbyCXP1jGeyFeWWPYBYYOkm05TSEkHgh0v6NkV9y31k8GTNw==",
|
||||
"requires": {
|
||||
"@stencil/core": "^2.16.0",
|
||||
"ionicons": "^6.0.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/vue",
|
||||
"version": "6.2.1",
|
||||
"version": "6.2.2",
|
||||
"description": "Vue specific wrapper for @ionic/core",
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build",
|
||||
@ -61,7 +61,7 @@
|
||||
"vue-router": "^4.0.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.2.1",
|
||||
"@ionic/core": "^6.2.2",
|
||||
"ionicons": "^6.0.2"
|
||||
},
|
||||
"vetur": {
|
||||
|
76
packages/vue/test-app/tests/unit/memory.spec.ts
Normal file
76
packages/vue/test-app/tests/unit/memory.spec.ts
Normal file
@ -0,0 +1,76 @@
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { createRouter, createMemoryHistory } from '@ionic/vue-router';
|
||||
import {
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonBackButton,
|
||||
IonicVue,
|
||||
IonApp,
|
||||
IonRouterOutlet,
|
||||
IonPage,
|
||||
} from '@ionic/vue';
|
||||
import { waitForRouter } from './utils';
|
||||
|
||||
const App = {
|
||||
components: { IonApp, IonRouterOutlet },
|
||||
template: '<ion-app><ion-router-outlet /></ion-app>',
|
||||
}
|
||||
|
||||
describe('createMemoryHistory', () => {
|
||||
beforeAll(() => {
|
||||
(HTMLElement.prototype as HTMLIonRouterOutletElement).commit = jest.fn();
|
||||
});
|
||||
it('should not error when going back with memory router', async () => {
|
||||
const PageTemplate = {
|
||||
template: `
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-back-button></ion-back-button>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content></ion-content>
|
||||
</ion-page>
|
||||
`,
|
||||
components: { IonPage, IonContent, IonHeader, IonToolbar, IonBackButton }
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
history: createMemoryHistory(process.env.BASE_URL),
|
||||
routes: [
|
||||
{ path: '/', component: PageTemplate },
|
||||
{ path: '/page2', component: PageTemplate },
|
||||
{ path: '/page3', component: PageTemplate }
|
||||
]
|
||||
});
|
||||
const push = jest.spyOn(router, 'back')
|
||||
|
||||
router.push('/');
|
||||
await router.isReady();
|
||||
const wrapper = mount(App, {
|
||||
global: {
|
||||
plugins: [router, IonicVue]
|
||||
}
|
||||
});
|
||||
|
||||
router.push('/page2');
|
||||
await waitForRouter();
|
||||
|
||||
router.push('/page3');
|
||||
await waitForRouter();
|
||||
|
||||
|
||||
const backButtons = wrapper.findAllComponents(IonBackButton);
|
||||
const pageTwoButton = backButtons[1];
|
||||
const pageThreeButton = backButtons[2];
|
||||
|
||||
await pageThreeButton.trigger('click');
|
||||
await waitForRouter();
|
||||
|
||||
await pageTwoButton.trigger('click');
|
||||
await waitForRouter();
|
||||
|
||||
expect(push).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
})
|
Reference in New Issue
Block a user