TrackPanelBar.test.tsx 781 Bytes
Newer Older
1 2 3 4
import React from 'react';
import { mount } from 'enzyme';

import { TrackPanelBar, TrackPanelBarProps } from './TrackPanelBar';
5
import ImageButton from 'src/shared/components/image-button/ImageButton';
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

describe('<TrackPanelBar />', () => {
  afterEach(() => {
    jest.resetAllMocks();
  });

  const defaultProps: TrackPanelBarProps = {
    isTrackPanelModalOpened: true,
    isTrackPanelOpened: true,
    trackPanelModalView: 'bookmarks',
    closeTrackPanelModal: jest.fn(),
    openTrackPanelModal: jest.fn(),
    toggleTrackPanel: jest.fn()
  };

  describe('rendering', () => {
22
    test('displays all track panel bar icons', () => {
23
      const wrapper = mount(<TrackPanelBar {...defaultProps} />);
24
      expect(wrapper.find(ImageButton).length).toBe(6);
25 26 27
    });
  });
});