text: import React from 'react';
  import ShallowRenderer from 'react-test-renderer/shallow';
  
  import RecentsHeader from './RecentsHeader';
  
  const renderer = new ShallowRenderer();
  
  let props;
  let component;
  
  describe('RecentsHeader component', () => {
    beforeEach(() => {
      props = {
        currentUser: {
          id: 'my-id',
          displayName: 'Snapshot User'
        },
        enableAddButton: true,
        enableSpaceListFilter: true,
        enableUserProfile: true,
        hideBottomBorder: true,
        onAddClick: jest.fn(),
        onFilterChange: jest.fn(),
        onProfileClick: jest.fn()
      };
    });
  
    it('renders correctly', () => {
      renderer.render(
        <RecentsHeader {...props} />
      );
      component = renderer.getRenderOutput();
      expect(component).toMatchSnapshot();
    });
  
    it('renders correctly without add button', () => {
      props.enableAddButton = false;
      renderer.render(
        <RecentsHeader {...props} />
      );
      component = renderer.getRenderOutput();
      expect(component).toMatchSnapshot();
    });
  
    it('renders correctly without search filter', () => {
      props.enableSpaceListFilter = false;
      renderer.render(
        <RecentsHeader {...props} />
      );
      component = renderer.getRenderOutput();
      expect(component).toMatchSnapshot();
    });
  
    it('renders correctly without user profile', () => {
      props.enableUserProfile = false;
      renderer.render(
        <RecentsHeader {...props} />
      );
      component = renderer.getRenderOutput();
      expect(component).toMatchSnapshot();
    });
  
    it('renders correctly without hiding bottom border', () => {
      props.hideBottomBorder = false;
      renderer.render(
        <RecentsHeader {...props} />
      );
      component = renderer.getRenderOutput();
      expect(component).toMatchSnapshot();
    });
  });
  