= null;
const { asFragment } = render(
<>
Tab item 1}
tabContentId="refTab1Section"
tabContentRef={contentRef1}
/>
Tab item 2}
tabContentId="refTab2Section"
tabContentRef={contentRef2}
/>
Tab item 3}
tabContentId="refTab3Section"
tabContentRef={contentRef3}
/>
Tab 1 section
Tab 2 section
Tab 3 section with padding
>
);
expect(asFragment()).toMatchSnapshot();
});
test('should render box tabs of light variant', () => {
const { asFragment } = render(
"Tab item 1"}>
Tab 1 section
"Tab item 2"}>
Tab 2 section
"Tab item 3"}>
Tab 3 section
);
expect(asFragment()).toMatchSnapshot();
});
test('should render tabs with no bottom border', () => {
const { asFragment } = render(
"Tab item 1"}>
Tab 1 section
"Tab item 2"}>
Tab 2 section
"Tab item 3"}>
Tab 3 section
);
expect(asFragment()).toMatchSnapshot();
});
test('should render secondary tabs with no bottom border when passed hasNoBorderBottom', () => {
render(
"Tab item 1"}>
Tab 1 section
"Tab item 2"}>
Tab 2 section
"Tab item 3"}>
Tab 3 section
);
const tabsContainer = screen.queryByLabelText('Secondary bottom border');
expect(tabsContainer).toHaveClass('pf-m-no-border-bottom');
});
test('should render secondary tabs with border bottom', () => {
render(
"Tab item 1"}>
Tab 1 section
"Tab item 2"}>
Tab 2 section
"Tab item 3"}>
Tab 3 section
);
const tabsContainer = screen.queryByLabelText('Secondary bottom border');
expect(tabsContainer).not.toHaveClass('pf-m-no-border-bottom');
});
test('should not render scroll buttons by default', () => {
render(
"Tab item 1"}>
Tab 1 section
"Tab item 2"}>
Tab 2 section
"Tab item 3"}>
Tab 3 section
);
expect(screen.queryByLabelText('Scroll left')).not.toBeInTheDocument();
expect(screen.queryByLabelText('Scroll right')).not.toBeInTheDocument();
})
test('should not render scroll buttons when isVertical is true', () => {
render(
"Tab item 1"}>
Tab 1 section
"Tab item 2"}>
Tab 2 section
"Tab item 3"}>
Tab 3 section
);
expect(screen.queryByLabelText('Scroll left')).not.toBeInTheDocument();
expect(screen.queryByLabelText('Scroll right')).not.toBeInTheDocument();
})