Sha256: 9838de991c17edcf722176aab1178fdf394221a5d165715178584fa272ade954

Contents?: true

Size: 1.82 KB

Versions: 2

Compression:

Stored size: 1.82 KB

Contents

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

import {
  selectLoading,
  selectEditMode,
  selectParamData,
  selectParameterTypes,
  selectParameters,
  selectSortingColumns,
  selectColumns,
  selectParamDefinition,
  selectHostgroupId,
} from '../ParameterSelectionSelectors';

import {
  parameterSelectionData_1,
} from '../__fixtures__/parameterSelectionData_1.fixtures';

const stateFactory = obj => ({
  foremanAcd: {
    parameterSelectionParameters: obj,
  },
});

const fixtures = {
  'should return loading from parameterSelectionData_1 fixtures': () =>
    selectLoading(stateFactory(parameterSelectionData_1)),
  'should return editMode from parameterSelectionData_1 fixtures': () =>
    selectEditMode(stateFactory(parameterSelectionData_1)),
  'should return paramData from parameterSelectionData_1 fixtures': () =>
    selectParamData(stateFactory(parameterSelectionData_1)),
  'should return parameterTypes from parameterSelectionData_1 fixtures': () =>
    selectParameterTypes(stateFactory(parameterSelectionData_1)),
  'should return parameters from parameterSelectionData_1 fixtures': () =>
    selectParameters(stateFactory(parameterSelectionData_1)),
  'should return sortingColumns from parameterSelectionData_1 fixtures': () =>
    selectSortingColumns(stateFactory(parameterSelectionData_1)),
  'should return columns from parameterSelectionData_1 fixtures': () =>
    selectColumns(stateFactory(parameterSelectionData_1)),
  'should return ParamDefinition from parameterSelectionData_1 fixtures': () =>
    selectParamDefinition(stateFactory(parameterSelectionData_1)),
  'should return hostgroupId from parameterSelectionData_1 fixtures': () =>
    selectHostgroupId(stateFactory(parameterSelectionData_1)),
};

describe('ParameterSelectionSelectors', () =>
  testSelectorsSnapshotWithFixtures(fixtures));

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_acd-0.9.0 webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js
foreman_acd-0.7.0 webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js