Sha256: e2397b91c35fd7312a5b2ccb535ffaf4cc206af8908cfb31bd39fd3554dcc2e3

Contents?: true

Size: 1.58 KB

Versions: 74

Compression:

Stored size: 1.58 KB

Contents

export const correctTime = 'H24';
export const wrongTime = 'H25';
export const parentTaskID = 7;
export const taskSummary = {
  tasksSummary: {
    running: {
      recent: 0,
      total: 3,
    },
    paused: {
      recent: 0,
      total: 54,
    },
    stopped: {
      recent: 0,
      total: 768,
      by_result: {
        success: {
          recent: 0,
          total: 532,
        },
        error: {
          recent: 0,
          total: 121,
        },
        warning: {
          recent: 0,
          total: 10,
        },
        cancelled: {
          recent: 0,
          total: 105,
        },
      },
    },
    scheduled: {
      recent: 0,
      total: 7,
    },
  },
};

export const subtaskSummary = {
  tasksSummary: {
    running: {
      recent: 0,
      total: 3,
    },
    paused: {
      recent: 0,
      total: 7,
    },
    stopped: {
      recent: 0,
      total: 0,
      by_result: {
        success: {
          recent: 0,
          total: 0,
        },
        error: {
          recent: 0,
          total: 0,
        },
        warning: {
          recent: 0,
          total: 0,
        },
        cancelled: {
          recent: 0,
          total: 0,
        },
      },
    },
    scheduled: {
      recent: 0,
      total: 7,
    },
  },
};

export const apiGetMock = async path => {
  if (path === `/foreman_tasks/tasks/summary/${correctTime}`) {
    return { data: taskSummary };
  } else if (
    path ===
    `/foreman_tasks/tasks/summary/${parentTaskID}/sub_tasks/${correctTime}`
  ) {
    return { data: subtaskSummary };
  }

  throw new Error('wrong time');
};

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
foreman-tasks-10.0.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-10.0.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.2.3 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.2.2 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.2.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.2.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.1.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.0.4 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.1.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.0.2 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.0.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.3.3 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-9.0.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.2.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.1.4 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.3.2 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.3.1 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.1.3 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.3.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js
foreman-tasks-8.2.0 webpack/ForemanTasks/Components/TasksDashboard/__tests__/TaskDashboard.fixtures.js