Sha256: 32d6775c30bb1d219ddea4e5ff0a5f582df7f66c32c9c124157fe4048cdf7a29

Contents?: true

Size: 1.05 KB

Versions: 14

Compression:

Stored size: 1.05 KB

Contents

import { testReducerSnapshotWithFixtures } from '@theforeman/test';
import {
  LAYOUT_CHANGE_ORG,
  LAYOUT_INITIALIZE,
} from 'foremanReact/components/Layout/LayoutConstants';
import reducer from '../InventoryFilterReducer';
import { filterTerm, org } from '../InventoryFilter.fixtures';
import {
  INVENTORY_FILTER_UPDATE,
  INVENTORY_FILTER_CLEAR,
} from '../InventoryFilterConstants';

const fixtures = {
  'should return the initial state': {},
  'should handle INVENTORY_FILTER_UPDATE': {
    action: {
      type: INVENTORY_FILTER_UPDATE,
      payload: {
        filterTerm,
      },
    },
  },
  'should handle INVENTORY_FILTER_CLEAR': {
    action: {
      type: INVENTORY_FILTER_CLEAR,
      payload: {},
    },
  },
  'should handle LAYOUT_CHANGE_ORG': {
    action: {
      type: LAYOUT_CHANGE_ORG,
      payload: { org },
    },
  },
  'should handle LAYOUT_INITIALIZE': {
    action: {
      type: LAYOUT_INITIALIZE,
      payload: { organization: org },
    },
  },
};

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.18 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.17 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-3.0.17 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.16 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-3.0.16 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.15 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-3.0.15 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-3.0.14 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.14 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.13.1 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.13 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js
foreman_rh_cloud-2.0.11 webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/InventoryFilterReducer.test.js