Skip to content
Snippets Groups Projects
Select Git revision
  • 2-gitlab-deploy
  • main default protected
  • add-tat-sample
  • 15-choses-a-faire-css
  • macao3-export
  • gitlab-ci-debug
  • 3-qcu-features
  • 1-navigation
  • test
9 results

README.md

Blame
  • Forked from MACAO / MACAO Hugo
    Source project has a limited visibility.
    WindowTopMenuButton.test.js 689 B
    import React from 'react';
    import { shallow } from 'enzyme';
    import WindowTopMenuButton from '../../../src/components/WindowTopMenuButton';
    
    describe('WindowTopMenuButton', () => {
      let wrapper;
      beforeEach(() => {
        wrapper = shallow(
          <WindowTopMenuButton classes={{}} windowId="xyz" />,
        ).dive();
      });
    
      it('renders without an error', () => {
        expect(wrapper.find('WithStyles(IconButton)').length).toBe(1);
      });
      it('when clicked, updates the state', () => {
        wrapper.find('WithStyles(IconButton)').simulate('click', { currentTarget: 'x' });
        expect(wrapper.find('Connect(miradorWithPlugins(WithStyles(WindowTopMenu)))').props().anchorEl).toBe('x');
      });
    });