mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
@ -172,7 +172,41 @@ describe('Tabs', () => {
|
||||
cy.ionPageVisible('tab1');
|
||||
cy.ionPageHidden('routing');
|
||||
cy.ionPageHidden('tab2');
|
||||
})
|
||||
});
|
||||
|
||||
// Verifies 1 of 2 fixes for https://github.com/ionic-team/ionic-framework/issues/22519
|
||||
it('should not create a new tabs instance when switching between tabbed and non-tabbed contexts', () => {
|
||||
cy.visit('http://localhost:8080/tabs/tab1');
|
||||
|
||||
cy.routerPush('/');
|
||||
cy.ionPageHidden('tabs');
|
||||
cy.ionPageVisible('home');
|
||||
|
||||
cy.routerPush('/tabs/tab2');
|
||||
cy.ionPageHidden('tab1');
|
||||
|
||||
cy.ionPageHidden('home');
|
||||
|
||||
cy.ionPageVisible('tab2');
|
||||
cy.ionPageVisible('tabs');
|
||||
});
|
||||
|
||||
// Verifies 1 of 2 fixes for https://github.com/ionic-team/ionic-framework/issues/22519
|
||||
it('should not create a new tabs instance when switching between tabbed and non-tabbed contexts - new tabs setup', () => {
|
||||
cy.visit('http://localhost:8080/tabs-new/tab1');
|
||||
|
||||
cy.routerPush('/');
|
||||
cy.ionPageHidden('tabs');
|
||||
cy.ionPageVisible('home');
|
||||
|
||||
cy.routerPush('/tabs-new/tab2');
|
||||
cy.ionPageHidden('tab1');
|
||||
|
||||
cy.ionPageHidden('home');
|
||||
|
||||
cy.ionPageVisible('tab2');
|
||||
cy.ionPageVisible('tabs');
|
||||
});
|
||||
})
|
||||
|
||||
describe('Tabs - Swipe to Go Back', () => {
|
||||
|
@ -68,6 +68,7 @@ describe('ion-tab-bar', () => {
|
||||
});
|
||||
|
||||
const innerHTML = wrapper.find('ion-tabs').html();
|
||||
// TODO: Remove tabs="true" in Ionic Vue v6.0
|
||||
expect(innerHTML).toContain(`<div class="tabs-inner" style="position: relative; flex: 1; contain: layout size style;"><ion-router-outlet tabs="true"></ion-router-outlet></div><ion-tab-bar slot="bottom"></ion-tab-bar>`);
|
||||
|
||||
});
|
||||
@ -100,6 +101,7 @@ describe('ion-tab-bar', () => {
|
||||
});
|
||||
|
||||
const innerHTML = wrapper.find('ion-tabs').html();
|
||||
// TODO: Remove tabs="true" in Ionic Vue v6.0
|
||||
expect(innerHTML).toContain(`<div class="tabs-inner" style="position: relative; flex: 1; contain: layout size style;"><ion-router-outlet tabs="true"></ion-router-outlet></div><ion-tab-bar></ion-tab-bar></ion-tabs>`)
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user