Skip to content
Snippets Groups Projects
Select Git revision
  • main
  • export
  • 28-conversion-tests
  • extraction
  • exploration
  • exploration-old
  • 2-encoding-fix
  • main-old
8 results

mcli

Blame
  • WindowSideBarPanel.test.js 946 B
    import React from 'react';
    import { shallow } from 'enzyme';
    import WindowSideBarPanel from '../../../src/components/WindowSideBarPanel';
    import WindowSideBarInfoPanel from '../../../src/containers/WindowSideBarInfoPanel';
    
    describe('WindowSideBarPanel', () => {
      let wrapper;
    
      describe('when the sideBarPanel is set to "info"', () => {
        beforeEach(() => {
          wrapper = shallow(<WindowSideBarPanel windowId="abc123" sideBarPanel="info" />);
        });
    
        it('renders the WindowSideBarInfoPanel', () => {
          expect(wrapper.find(WindowSideBarInfoPanel).length).toBe(1);
        });
      });
    
      describe('when the sideBarPanel is set to "closed" (or any other unknown value)', () => {
        beforeEach(() => {
          wrapper = shallow(<WindowSideBarPanel windowId="abc123" sideBarPanel="closed" />);
        });
    
        it('does not render any panel component', () => {
          expect(wrapper.find(WindowSideBarInfoPanel).length).toBe(0);
        });
      });
    });