Sha256: 675dfed91ac6d3b21e008082fc41ebd2416697263ebaf0a7e291b3769cf55d6e

Contents?: true

Size: 1.38 KB

Versions: 58

Compression:

Stored size: 1.38 KB

Contents

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

import { StoppedTable } from './StoppedTasksCardTable';
import {
  TASKS_DASHBOARD_AVAILABLE_TIMES,
  TASKS_DASHBOARD_AVAILABLE_QUERY_STATES,
  TASKS_DASHBOARD_AVAILABLE_QUERY_MODES,
  TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS,
} from '../../../../TasksDashboardConstants';

const { STOPPED } = TASKS_DASHBOARD_AVAILABLE_QUERY_STATES;
const { LAST } = TASKS_DASHBOARD_AVAILABLE_QUERY_MODES;
const { WEEK } = TASKS_DASHBOARD_AVAILABLE_TIMES;
const data = {
  error: { total: 9, last: 1 },
  warning: { total: 8, last: 2 },
  success: { total: 7, last: 3 },
};
const fixtures = {
  'render with props': {
    data,
    time: WEEK,
    query: {},
    updateQuery: jest.fn(),
  },
};

Object.values(TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS)
  .filter(result => result !== TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS.OTHER)
  .forEach(result => {
    fixtures[`render ${result}-total selected`] = {
      query: {
        state: STOPPED,
        result,
      },
      updateQuery: jest.fn(),
      data,
      time: WEEK,
    };
    fixtures[`render ${result}-last selected`] = {
      time: WEEK,
      query: {
        state: STOPPED,
        result,
        mode: LAST,
        time: WEEK,
      },
      updateQuery: jest.fn(),
      data,
    };
  });

describe('StoppedTable', () =>
  testComponentSnapshotsWithFixtures(StoppedTable, fixtures));

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
foreman-tasks-8.1.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-8.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-8.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-8.0.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-8.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-8.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-7.2.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-7.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-7.2.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-7.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-6.0.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-7.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-6.0.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-4.1.6 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-5.2.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-6.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-5.2.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-6.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-5.2.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js
foreman-tasks-5.3.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCardTable.test.js