File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
test/base/tests/e2e/specs Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,23 @@ export const IonTabs = /*@__PURE__*/ defineComponent({
5050 name : "IonTabs" ,
5151 emits : [ WILL_CHANGE , DID_CHANGE ] ,
5252 setup ( props , { slots, emit } ) {
53- // Define the custom element
54- defineCustomElement ( ) ;
55-
5653 return {
5754 props,
5855 slots,
5956 emit,
6057 } ;
6158 } ,
59+ mounted ( ) {
60+ /**
61+ * `defineCustomElement` must be called in the `mounted` hook
62+ * to ensure that the custom element is defined after the
63+ * component has been fully rendered and initialized.
64+ * This prevents issues with undefined properties, like
65+ * `selectedTab` from core, which may occur if the custom
66+ * element is defined too early in the component's lifecycle.
67+ */
68+ defineCustomElement ( ) ;
69+ } ,
6270 render ( ) {
6371 const { slots, emit, props } = this ;
6472 const slottedContent = slots . default && slots . default ( ) ;
Original file line number Diff line number Diff line change @@ -253,8 +253,7 @@ describe('Tabs', () => {
253253 } ) ;
254254
255255 // Verifies fix for https://github.com/ionic-team/ionic-framework/issues/22597
256- // TODO(ROU-11114): Re-enable this test after investigating and fixing the cause of its failure.
257- it . skip ( 'should deselect old tab button when going to a tab that does not have a tab button' , ( ) => {
256+ it ( 'should deselect old tab button when going to a tab that does not have a tab button' , ( ) => {
258257 cy . visit ( '/tabs/tab1' ) ;
259258 cy . ionPageVisible ( 'tab1' ) ;
260259
@@ -314,8 +313,7 @@ describe('Tabs', () => {
314313 } ) ;
315314
316315 // Verifies fix for https://github.com/ionic-team/ionic-framework/issues/22847
317- // TODO(ROU-11114): Re-enable this test after investigating and fixing the cause of its failure.
318- it . skip ( 'should support dynamic tabs' , ( ) => {
316+ it ( 'should support dynamic tabs' , ( ) => {
319317 cy . visit ( '/tabs/tab1' ) ;
320318 cy . ionPageVisible ( 'tab1' ) ;
321319
You can’t perform that action at this time.
0 commit comments