Sha256: 957539cc54a7dbb227b936433e9b1852bff7becc3bfca7a751ca1956c2c79f8e

Contents?: true

Size: 664 Bytes

Versions: 105

Compression:

Stored size: 664 Bytes

Contents

import React from 'react';
import { shallow, testComponentSnapshotsWithFixtures } from '@theforeman/test';
import Dashboard from '../Dashboard';
import { props } from '../Dashboard.fixtures';

const fixtures = {
  'with props': props,
};

describe('Dashboard', () => {
  describe('rendering', () =>
    testComponentSnapshotsWithFixtures(Dashboard, fixtures));

  it('componentWillUnmount should call "stopPolling"', () => {
    const stopPolling = jest.fn();
    const modifiedProps = {
      ...props,
      stopPolling,
    };
    const wrapper = shallow(<Dashboard {...modifiedProps} />);
    wrapper.unmount();
    expect(stopPolling).toBeCalled();
  });
});

Version data entries

105 entries across 105 versions & 2 rubygems

Version Path
foreman_rh_cloud-3.0.18.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.18 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.18 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.17 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.17 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.16 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.16 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.15 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.15 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.14 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.14 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.13.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.13 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.11 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.10 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.9 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.8 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.7 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.6 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js