mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
test(tabs): re-enable skipped tests (#29813)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
This commit is contained in:
@ -50,15 +50,23 @@ export const IonTabs = /*@__PURE__*/ defineComponent({
|
|||||||
name: "IonTabs",
|
name: "IonTabs",
|
||||||
emits: [WILL_CHANGE, DID_CHANGE],
|
emits: [WILL_CHANGE, DID_CHANGE],
|
||||||
setup(props, { slots, emit }) {
|
setup(props, { slots, emit }) {
|
||||||
// Define the custom element
|
|
||||||
defineCustomElement();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props,
|
props,
|
||||||
slots,
|
slots,
|
||||||
emit,
|
emit,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
/**
|
||||||
|
* `defineCustomElement` must be called in the `mounted` hook
|
||||||
|
* to ensure that the custom element is defined after the
|
||||||
|
* component has been fully rendered and initialized.
|
||||||
|
* This prevents issues with undefined properties, like
|
||||||
|
* `selectedTab` from core, which may occur if the custom
|
||||||
|
* element is defined too early in the component's lifecycle.
|
||||||
|
*/
|
||||||
|
defineCustomElement();
|
||||||
|
},
|
||||||
render() {
|
render() {
|
||||||
const { slots, emit, props } = this;
|
const { slots, emit, props } = this;
|
||||||
const slottedContent = slots.default && slots.default();
|
const slottedContent = slots.default && slots.default();
|
||||||
|
@ -253,8 +253,7 @@ describe('Tabs', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/22597
|
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/22597
|
||||||
// TODO(ROU-11114): Re-enable this test after investigating and fixing the cause of its failure.
|
it('should deselect old tab button when going to a tab that does not have a tab button', () => {
|
||||||
it.skip('should deselect old tab button when going to a tab that does not have a tab button', () => {
|
|
||||||
cy.visit('/tabs/tab1');
|
cy.visit('/tabs/tab1');
|
||||||
cy.ionPageVisible('tab1');
|
cy.ionPageVisible('tab1');
|
||||||
|
|
||||||
@ -314,8 +313,7 @@ describe('Tabs', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/22847
|
// Verifies fix for https://github.com/ionic-team/ionic-framework/issues/22847
|
||||||
// TODO(ROU-11114): Re-enable this test after investigating and fixing the cause of its failure.
|
it('should support dynamic tabs', () => {
|
||||||
it.skip('should support dynamic tabs', () => {
|
|
||||||
cy.visit('/tabs/tab1');
|
cy.visit('/tabs/tab1');
|
||||||
cy.ionPageVisible('tab1');
|
cy.ionPageVisible('tab1');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user