Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'drill-in' of https://github.com/cerner/terra-framework
Browse files Browse the repository at this point in the history
…into drill-in
  • Loading branch information
Sugan G authored and Sugan G committed May 14, 2024
2 parents 0784f7d + 445ee8d commit 25d7f20
Show file tree
Hide file tree
Showing 2 changed files with 682 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,27 @@ describe('Layout', () => {
expect(result).toMatchSnapshot();
});

it('should render a drill-in variant of NavigationSideMenu with selectedKey', () => {
const result = enzymeIntl.mountWithIntl((
<NavigationSideMenu
menuItems={[
{ key: 'menu', text: 'Test Menu', childKeys: ['test1', 'test2', 'test3', 'test4'] },
{ key: 'test1', text: 'Test Menu 1', isDisabled: true },
{ key: 'test2', text: 'Test Menu 2' },
{ key: 'test3', text: 'Test Menu 3' },
{ key: 'test4', text: 'Test Menu 4' },
]}
onChange={() => {}}
routingStackBack={() => {}}
selectedMenuKey="menu"
variant="drill-in"
/>
));
expect(result.prop('variant')).toEqual('drill-in');
expect(result.find('IconDocuments')).toBeDefined();
expect(result).toMatchSnapshot();
});

it('correctly applies the theme context className', () => {
const result = enzymeIntl.mountWithIntl(
<ThemeContextProvider theme={{ className: 'orion-fusion-theme' }}>
Expand Down
Loading

0 comments on commit 25d7f20

Please sign in to comment.