Sha256: 0b33d28e3ac48839280a77e6b626afb075e415999d9ea08077adb0dbf1d5ee5b

Contents?: true

Size: 1.43 KB

Versions: 81

Compression:

Stored size: 1.43 KB

Contents

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

import {
  INVENTORY_ACCOUNT_STATUS_POLLING,
  INVENTORY_ACCOUNT_STATUS_POLLING_START,
  INVENTORY_ACCOUNT_STATUS_POLLING_STOP,
  INVENTORY_ACCOUNT_STATUS_POLLING_ERROR,
  INVENTORY_PROCESS_RESTART,
} from '../AccountListConstants';
import reducer from '../AccountListReducer';
import {
  error,
  pollingProcessID,
  accountID,
  processStatusName,
  pollingResponse,
} from '../AccountList.fixtures';

const fixtures = {
  'should return the initial state': {},
  'should handle INVENTORY_ACCOUNT_STATUS_POLLING': {
    action: {
      type: INVENTORY_ACCOUNT_STATUS_POLLING,
      payload: pollingResponse,
    },
  },
  'should handle INVENTORY_ACCOUNT_STATUS_POLLING_ERROR': {
    action: {
      type: INVENTORY_ACCOUNT_STATUS_POLLING_ERROR,
      payload: { error },
    },
  },
  'should handle INVENTORY_ACCOUNT_STATUS_POLLING_START': {
    action: {
      type: INVENTORY_ACCOUNT_STATUS_POLLING_START,
      payload: {
        pollingProcessID,
      },
    },
  },
  'should handle INVENTORY_ACCOUNT_STATUS_POLLING_STOP': {
    action: {
      type: INVENTORY_ACCOUNT_STATUS_POLLING_STOP,
    },
  },
  'should handle INVENTORY_PROCESS_RESTART': {
    action: {
      type: INVENTORY_PROCESS_RESTART,
      payload: {
        accountID,
        processStatusName,
      },
    },
  },
};

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

Version data entries

81 entries across 81 versions & 1 rubygems

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