Sha256: 6a4a514277899ab71834d0e1d3378af0548f58ad3e2222e7d05309ac82bd8eb2

Contents?: true

Size: 1.75 KB

Versions: 22

Compression:

Stored size: 1.75 KB

Contents

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

import {
  FOREMAN_TASKS_DASHBOARD_INIT,
  FOREMAN_TASKS_DASHBOARD_UPDATE_TIME,
  FOREMAN_TASKS_DASHBOARD_UPDATE_QUERY,
  FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_REQUEST,
  FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_SUCCESS,
  FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_FAILURE,
} from '../TasksDashboardConstants';
import reducer from '../TasksDashboardReducer';

const fixtures = {
  'should return the initial state': {},
  'should handle FOREMAN_TASKS_DASHBOARD_INIT': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_INIT,
    },
  },
  'should handle FOREMAN_TASKS_DASHBOARD_INIT with data': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_INIT,
      payload: { time: 'some-time', query: 'some-query' },
    },
  },
  'should handle FOREMAN_TASKS_DASHBOARD_UPDATE_TIME': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_UPDATE_TIME,
      payload: 'some-time',
    },
  },
  'should handle FOREMAN_TASKS_DASHBOARD_UPDATE_QUERY': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_UPDATE_QUERY,
      payload: 'some-query',
    },
  },
  'should handle FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_REQUEST': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_REQUEST,
    },
  },
  'should handle FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_SUCCESS': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_SUCCESS,
      payload: 'some-payload',
    },
  },
  'should handle FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_FAILURE': {
    action: {
      type: FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_FAILURE,
      payload: new Error('some error'),
    },
  },
};

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
foreman-tasks-0.17.6 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-1.0.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.17.5 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.17.4 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.17.3 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.17.2 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.16.3 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.17.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.11 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.16.2 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.10 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.16.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.17.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.9 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.8 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.7 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.16.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.6 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.5 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
foreman-tasks-0.15.4 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js