text: import React from 'react';
  import { MemoryRouter } from 'react-router-dom';
  import { mount } from 'enzyme';
  import IconMagicWand from '../../../icons/general/IconMagicWand';
  import IconMetadataThick from '../../../icons/general/IconMetadataThick';
  import IconDocInfo from '../../../icons/general/IconDocInfo';
  import IconChatRound from '../../../icons/general/IconChatRound';
  import SidebarNavButton from '../SidebarNavButton';
  import SidebarNav from '../SidebarNav';
  
  describe('elements/content-sidebar/SidebarNav', () => {
      const getWrapper = (props, active = '') =>
          mount(
              <MemoryRouter initialEntries={[`/${active}`]}>
                  <SidebarNav {...props} />
              </MemoryRouter>,
          ).find('SidebarNav');
  
      test('should render skills tab', () => {
          const props = {
              hasSkills: true,
          };
          const wrapper = getWrapper(props);
          expect(wrapper.find(IconMagicWand)).toHaveLength(1);
          expect(wrapper.find(IconMetadataThick)).toHaveLength(0);
          expect(wrapper.find(IconDocInfo)).toHaveLength(0);
          expect(wrapper.find(IconChatRound)).toHaveLength(0);
      });
  
      test('should render details tab', () => {
          const props = {
              hasDetails: true,
          };
          const wrapper = getWrapper(props);
          expect(wrapper.find(IconMagicWand)).toHaveLength(0);
          expect(wrapper.find(IconMetadataThick)).toHaveLength(0);
          expect(wrapper.find(IconDocInfo)).toHaveLength(1);
          expect(wrapper.find(IconChatRound)).toHaveLength(0);
      });
  
      test('should render activity tab', () => {
          const props = {
              hasActivityFeed: true,
          };
          const wrapper = getWrapper(props);
          expect(wrapper.find(IconMagicWand)).toHaveLength(0);
          expect(wrapper.find(IconMetadataThick)).toHaveLength(0);
          expect(wrapper.find(IconDocInfo)).toHaveLength(0);
          expect(wrapper.find(IconChatRound)).toHaveLength(1);
      });
  
      test('should render metadata tab', () => {
          const props = {
              hasMetadata: true,
          };
          const wrapper = getWrapper(props);
          expect(wrapper.find(IconMagicWand)).toHaveLength(0);
          expect(wrapper.find(IconMetadataThick)).toHaveLength(1);
          expect(wrapper.find(IconDocInfo)).toHaveLength(0);
          expect(wrapper.find(IconChatRound)).toHaveLength(0);
      });
  
      test('should select activity tab', () => {
          const props = {
              hasActivityFeed: true,
              hasMetadata: true,
              hasSkills: true,
          };
          const wrapper = getWrapper(props, 'activity');
          expect(wrapper.find(IconMagicWand)).toHaveLength(1);
          expect(wrapper.find(IconMetadataThick)).toHaveLength(1);
          expect(wrapper.find(IconDocInfo)).toHaveLength(0);
          expect(wrapper.find(IconChatRound)).toHaveLength(1);
          expect(wrapper.find(SidebarNavButton)).toHaveLength(3);
          expect(
              wrapper
                  .find('[data-testid="sidebaractivity"]')
                  .first()
                  .prop('className'),
          ).toContain('bcs-nav-btn-is-selected');
      });
  
      test('should render the additional tabs loading state', () => {
          const props = {
              hasAdditionalTabs: true,
              additionalTabs: [],
          };
          const wrapper = getWrapper(props);
          expect(wrapper).toMatchSnapshot();
      });
  });
  