diff --git a/packages/components/src/tab-panel/test/index.tsx b/packages/components/src/tab-panel/test/index.tsx index 1ea23c16b602e0..35a818ad1420fa 100644 --- a/packages/components/src/tab-panel/test/index.tsx +++ b/packages/components/src/tab-panel/test/index.tsx @@ -105,6 +105,18 @@ describe( 'TabPanel', () => { expect( selectedTab ).toHaveTextContent( 'Beta' ); } ); + it( 'should render with a tab selected by prop selectedTabName', () => { + render( + undefined } + /> + ); + const selectedTab = screen.getByRole( 'tab', { selected: true } ); + expect( selectedTab ).toHaveTextContent( 'Beta' ); + } ); + it( 'should apply the `activeClass` to the selected tab', async () => { const user = setupUser(); const activeClass = 'my-active-tab';