Sha256: 957539cc54a7dbb227b936433e9b1852bff7becc3bfca7a751ca1956c2c79f8e

Contents?: true

Size: 664 Bytes

Versions: 110

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

110 entries across 110 versions & 2 rubygems

Version Path
foreman_rh_cloud-11.2.0 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.60 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-10.0.4 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-11.1.0 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-10.0.3 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-11.0.3 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.59 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-11.0.2 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-11.0.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-11.0.0 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.58 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-10.0.2 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.57 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-10.0.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.56 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.55 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.54 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.53 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-9.0.52 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-8.0.52 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js