import { render, mockMatchMedia } from '../test-utils';

import Logo, { LogoType } from '.';

mockMatchMedia();

describe('Logo', () => {
  it('renders wise logo', () => {
    expect(render(<Logo className="class" type={LogoType.WISE} />).container).toMatchSnapshot();
  });

  it('renders wise logo by default', () => {
    expect(render(<Logo className="class" />).container).toMatchSnapshot();
  });

  it('renders wise business logo', () => {
    expect(
      render(<Logo className="class" type={LogoType.WISE_BUSINESS} />).container,
    ).toMatchSnapshot();
  });

  it('renders wise platform logo', () => {
    expect(
      render(<Logo className="class" type={LogoType.WISE_PLATFORM} />).container,
    ).toMatchSnapshot();
  });

  it('renders wise logo inversed', () => {
    expect(
      render(<Logo className="class" type={LogoType.WISE} inverse />).container,
    ).toMatchSnapshot();
  });

  it('renders wise business logo inversed', () => {
    expect(
      render(<Logo className="class" type={LogoType.WISE_BUSINESS} inverse />).container,
    ).toMatchSnapshot();
  });

  it('renders wise platform logo inversed', () => {
    expect(
      render(<Logo className="class" type={LogoType.WISE_PLATFORM} inverse />).container,
    ).toMatchSnapshot();
  });

  describe('on mobile', () => {
    beforeEach(() => {
      window.innerWidth = 500;
    });

    it('renders only fast flag', () => {
      expect(render(<Logo className="class" type={LogoType.WISE} />).container).toMatchSnapshot();
    });
  });
});
