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({
50
50
name : "IonTabs" ,
51
51
emits : [ WILL_CHANGE , DID_CHANGE ] ,
52
52
setup ( props , { slots, emit } ) {
53
- // Define the custom element
54
- defineCustomElement ( ) ;
55
-
56
53
return {
57
54
props,
58
55
slots,
59
56
emit,
60
57
} ;
61
58
} ,
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
+ } ,
62
70
render ( ) {
63
71
const { slots, emit, props } = this ;
64
72
const slottedContent = slots . default && slots . default ( ) ;
Original file line number Diff line number Diff line change @@ -253,8 +253,7 @@ describe('Tabs', () => {
253
253
} ) ;
254
254
255
255
// 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' , ( ) => {
258
257
cy . visit ( '/tabs/tab1' ) ;
259
258
cy . ionPageVisible ( 'tab1' ) ;
260
259
@@ -314,8 +313,7 @@ describe('Tabs', () => {
314
313
} ) ;
315
314
316
315
// 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' , ( ) => {
319
317
cy . visit ( '/tabs/tab1' ) ;
320
318
cy . ionPageVisible ( 'tab1' ) ;
321
319
You can’t perform that action at this time.
0 commit comments