Sha256: 40dd4c6a931507834a09dab1a055681c913eaa63147d1257dad64d60e490f76f

Contents?: true

Size: 1.25 KB

Versions: 43

Compression:

Stored size: 1.25 KB

Contents

import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';

import {
  INVENTORY_POLLING_START,
  INVENTORY_POLLING,
  INVENTORY_TAB_CHANGED,
  INVENTORY_POLLING_ERROR,
} from '../DashboardConstants';
import reducer from '../DashboardReducer';
import {
  pollingProcessID,
  logs,
  initialState,
  activeTab,
  error,
  accountID,
  scheduled,
} from '../Dashboard.fixtures';

const fixtures = {
  'should return the initial state': initialState,
  'should handle INVENTORY_POLLING_START': {
    action: {
      type: INVENTORY_POLLING_START,
      payload: {
        pollingProcessID,
        accountID,
      },
    },
  },
  'should handle INVENTORY_POLLING': {
    action: {
      type: INVENTORY_POLLING,
      payload: {
        logs,
        accountID,
        activeTab,
        scheduled,
      },
    },
  },
  'should handle INVENTORY_TAB_CHANGED': {
    action: {
      type: INVENTORY_TAB_CHANGED,
      payload: {
        activeTab,
        accountID,
      },
    },
  },
  'should handle INVENTORY_POLLING_ERROR': {
    action: {
      type: INVENTORY_POLLING_ERROR,
      payload: {
        error,
        accountID,
        activeTab,
      },
    },
  },
};

describe('Dashboard reducer', () =>
  testReducerSnapshotWithFixtures(reducer, fixtures));

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
foreman_rh_cloud-1.0.18 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.17 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.16 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.15 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.14 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.14 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.13.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.13.1 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.13 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.13 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.12 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.11 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.10 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.10 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.9 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.9 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-0.9.8 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js
foreman_rh_cloud-1.0.8 webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js