Sha256: d20eb14c9e77d461b449e6c3ede60f4f2234cae090b46866edd885f1a11055bd

Contents?: true

Size: 606 Bytes

Versions: 66

Compression:

Stored size: 606 Bytes

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { mock as mockApi } from '../../mockRequest';

import Search from '../Search';

describe('Search component', () => {
  const getBaseProps = () => ({
    onSearch: () => {},
    getAutoCompleteParams: () => ({ endpoint: '/fake' }),
  });

  describe('rendering', () => {
    it('renders correctly', () => {
      mockApi.onGet('/katello/api/v2/fake').reply(200, []);
      const component = shallow(<Search {...getBaseProps()} />);

      expect(toJson(component)).toMatchSnapshot();
    });
  });
});

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
katello-3.16.2 webpack/components/Search/Search.test.js
katello-3.16.1.2 webpack/components/Search/Search.test.js
katello-3.16.1.1 webpack/components/Search/Search.test.js
katello-3.16.1 webpack/components/Search/Search.test.js
katello-3.16.0 webpack/components/Search/Search.test.js
katello-3.16.0.rc5.1 webpack/components/Search/Search.test.js
katello-3.16.0.rc5 webpack/components/Search/Search.test.js
katello-3.16.0.rc4.1 webpack/components/Search/Search.test.js
katello-3.15.3.1 webpack/components/Search/Search.test.js
katello-3.15.3 webpack/components/Search/Search.test.js
katello-3.16.0.rc4 webpack/components/Search/Search.test.js
katello-3.16.0.rc3.1 webpack/components/Search/Search.test.js
katello-3.15.2 webpack/components/Search/Search.test.js
katello-3.16.0.rc3 webpack/components/Search/Search.test.js
katello-3.16.0.rc2.1 webpack/components/Search/Search.test.js
katello-3.16.0.rc2 webpack/components/Search/Search.test.js
katello-3.15.1.1 webpack/components/Search/Search.test.js
katello-3.16.0.rc1.1 webpack/components/Search/Search.test.js
katello-3.15.1 webpack/components/Search/Search.test.js
katello-3.16.0.rc1 webpack/components/Search/Search.test.js