Sha256: 957539cc54a7dbb227b936433e9b1852bff7becc3bfca7a751ca1956c2c79f8e

Contents?: true

Size: 664 Bytes

Versions: 104

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

104 entries across 104 versions & 2 rubygems

Version Path
foreman_rh_cloud-3.0.26 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.26 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.25.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.25 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.25 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.24.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.24.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.24 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.24 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.23 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.23 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.22 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.22 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-4.0.21.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.21.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.21 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.20 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.19 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-2.0.18.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js
foreman_rh_cloud-3.0.18.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js