diff --git a/packages/react/src/drafts/UnderlinePanels/UnderlinePanels.test.tsx b/packages/react/src/drafts/UnderlinePanels/UnderlinePanels.test.tsx index 3b56e65a611..9a63ac4bec3 100644 --- a/packages/react/src/drafts/UnderlinePanels/UnderlinePanels.test.tsx +++ b/packages/react/src/drafts/UnderlinePanels/UnderlinePanels.test.tsx @@ -2,9 +2,8 @@ import React from 'react' import {render, screen} from '@testing-library/react' -import renderer from 'react-test-renderer' import UnderlinePanels from './UnderlinePanels' -import {checkExports} from '../../utils/testing' +import {behavesAsComponent, checkExports} from '../../utils/testing' import TabContainerElement from '@github/tab-container-element' TabContainerElement.prototype.selectTab = jest.fn() @@ -20,14 +19,19 @@ const UnderlinePanelsMockComponent = (props: {'aria-label'?: string; 'aria-label ) -// const tree = renderer.create().toJSON() -// expect(tree).toMatchSnapshot() - describe('UnderlinePanels', () => { afterEach(() => { jest.restoreAllMocks() }) + checkExports('drafts/UnderlinePanels', { + default: UnderlinePanels, + }) + + behavesAsComponent({Component: UnderlinePanels, options: {skipAs: true}}) + + behavesAsComponent({Component: UnderlinePanels.Tab}) + it('renders without errors', () => { render() }) diff --git a/packages/react/src/internal/components/UnderlineTabbedInterface.tsx b/packages/react/src/internal/components/UnderlineTabbedInterface.tsx index 159f4153b66..2e03ed35cab 100644 --- a/packages/react/src/internal/components/UnderlineTabbedInterface.tsx +++ b/packages/react/src/internal/components/UnderlineTabbedInterface.tsx @@ -212,7 +212,7 @@ export const UnderlineTab = forwardRef( forwardedRef, ) => { return ( - + {iconsVisible && Icon && (