Sha256: 2b3238e628e8169e53e755f54759f6778bac5a7960bbc41003a5d6cfd73a415b

Contents?: true

Size: 1.4 KB

Versions: 158

Compression:

Stored size: 1.4 KB

Contents

import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import SubscriptionDetails from '../SubscriptionDetails';
import SubscriptionDetailAssociations from '../SubscriptionDetailAssociations';
import SubscriptionDetailInfo from '../SubscriptionDetailInfo';
import SubscriptionDetailProducts from '../SubscriptionDetailProducts';
import SubscriptionDetailProductContent from '../SubscriptionDetailProductContent';
import { loadSubscriptionDetails } from '../SubscriptionDetailActions';
import { loadProducts } from '../../../Products/ProductActions';
import { successState } from './subscriptionDetails.fixtures';


describe('subscriptions details page', () => {
  it('should render and contain appropiate components', async () => {
    const match = { params: { id: '1' } };
    const noop = () => {};

    const wrapper = shallow(<SubscriptionDetails
      loadSubscriptionDetails={loadSubscriptionDetails}
      loadProducts={loadProducts}
      subscriptionDetails={successState}
      history={{ push: noop }}
      match={match}
    />);
    expect(wrapper.find(SubscriptionDetailAssociations)).toHaveLength(1);
    expect(wrapper.find(SubscriptionDetailInfo)).toHaveLength(1);
    expect(wrapper.find(SubscriptionDetailProducts)).toHaveLength(1);
    expect(wrapper.find(SubscriptionDetailProductContent)).toHaveLength(1);
    expect(toJson(wrapper)).toMatchSnapshot();
  });
});

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
katello-4.2.0.rc1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.2.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.2.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.2 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.2 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-3.18.4 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.0 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.1.2 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-3.18.3.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.0.rc2.2 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.0.rc2.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.1.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-3.18.3 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.0.rc2 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.0.rc1.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.1.0.rc1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.0 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js
katello-4.0.0.rc3.1 webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js