Sha256: 5db38053a49b3f38c7eb8f35b3e3dbfd40d6883c85ccf93690f9cda6ca51d6cb

Contents?: true

Size: 830 Bytes

Versions: 12

Compression:

Stored size: 830 Bytes

Contents

import React from 'react';
import { renderWithRedux } from 'react-testing-lib-wrapper';
import ActivationKeysSearch from './index';

describe('ActivationKeysSearch', () => {
  const mockQuerySelector = jest.spyOn(document, 'querySelector');
  mockQuerySelector.mockImplementation((selector) => {
    if (selector === '#hostgroup_lifecycle_environment_id') {
      return {
        options: [{}],
        selectedIndex: 0,
        value: '1',
      };
    }
    if (selector === '#hostgroup_content_view_id') {
      return {
        options: [{}],
        selectedIndex: 0,
        value: '2 ',
      };
    }
    return null;
  });
  it('renders without crashing', () => {
    const { getByText } = renderWithRedux(<ActivationKeysSearch />, {});
    expect(getByText('Activation Key information')).toBeInTheDocument();
  });
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.15.0.rc1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.14.1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.14.0 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.14.0.rc3 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.14.0.rc2 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.14.0.rc1.1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.14.0.rc1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.13.1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.13.0 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.12.1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js
katello-4.13.0.rc1 webpack/components/ActivationKeysSearch/ActivationKeysSearch.test.js