test(tabs): re-enable skipped tests (#29813)

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
This commit is contained in:
Maria Hutt
2024-08-29 14:44:50 -07:00
committed by GitHub
parent 33fd894b84
commit bc973e79a5
2 changed files with 13 additions and 7 deletions

View File

@ -50,15 +50,23 @@ export const IonTabs = /*@__PURE__*/ defineComponent({
name: "IonTabs",
emits: [WILL_CHANGE, DID_CHANGE],
setup(props, { slots, emit }) {
// Define the custom element
defineCustomElement();
return {
props,
slots,
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() {
const { slots, emit, props } = this;
const slottedContent = slots.default && slots.default();

View File

@ -253,8 +253,7 @@ describe('Tabs', () => {
});
// 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.skip('should deselect old tab button when going to a tab that does not have a tab button', () => {
it('should deselect old tab button when going to a tab that does not have a tab button', () => {
cy.visit('/tabs/tab1');
cy.ionPageVisible('tab1');
@ -314,8 +313,7 @@ describe('Tabs', () => {
});
// 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.skip('should support dynamic tabs', () => {
it('should support dynamic tabs', () => {
cy.visit('/tabs/tab1');
cy.ionPageVisible('tab1');