Sha256: 483e440f210c3c75a6b69689422f36472b715290750e1b3b47fe2aebf98af1af

Contents?: true

Size: 1.25 KB

Versions: 107

Compression:

Stored size: 1.25 KB

Contents

import { testReducerSnapshotWithFixtures } from '@theforeman/test';

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

107 entries across 107 versions & 2 rubygems

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