Sha256: 8e4d697a333ed5c98f91652bbe488273f221c908e51fc842dbaffff7aeca481c

Contents?: true

Size: 1.04 KB

Versions: 181

Compression:

Stored size: 1.04 KB

Contents

import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { subscriptionTypeFormatter } from '../SubscriptionTypeFormatter';

describe('subscriptionTypeFormatter', () => {
  const data = rowData => ({
    rowData,
  });

  it('renders physical subscriptions', async () => {
    const formatter = subscriptionTypeFormatter(null, data({ virt_only: false }));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });

  it('renders temporary subscriptions', async () => {
    const formatter = subscriptionTypeFormatter(null, data({ unmapped_guest: true }));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });

  it('renders virtual subscriptions', async () => {
    const formatter = subscriptionTypeFormatter(null, data({}));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });

  it('renders link to a host', async () => {
    const formatter = subscriptionTypeFormatter(null, data({ hypervisor: { name: 'host.example.com', id: 83 } }));

    expect(toJson(shallow(formatter))).toMatchSnapshot();
  });
});

Version data entries

181 entries across 181 versions & 1 rubygems

Version Path
katello-4.14.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.15.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.15.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.15.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.14.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.14.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.14.0.rc3 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.14.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.14.0.rc1.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.14.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.13.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.13.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.12.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.13.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.12.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.12.0.rc3 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.12.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.12.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.11.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js
katello-4.11.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js