Sha256: e2b0bd85b15538f98aca518162bd12974e8de9749f64e6ac5cac0a75ed384f21

Contents?: true

Size: 1.25 KB

Versions: 69

Compression:

Stored size: 1.25 KB

Contents

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

import {
  TASKS_DASHBOARD_AVAILABLE_TIMES,
  TASKS_DASHBOARD_AVAILABLE_QUERY_MODES,
} from '../../../../TasksDashboardConstants';
import TasksDonutCard from './TasksDonutCard';

const fixtures = {
  'render with minimal props': {},
  'render with props': {
    title: 'some title',
    time: TASKS_DASHBOARD_AVAILABLE_TIMES.WEEK,
    wantedQueryState: 'some-state',
    className: 'some-classname',
    data: { last: 3, older: 5 },
  },
  'render with total selected': {
    wantedQueryState: 'some-state',
    query: { state: 'some-state' },
  },
  'render with last selected': {
    wantedQueryState: 'some-state',
    time: TASKS_DASHBOARD_AVAILABLE_TIMES.WEEK,
    query: {
      state: 'some-state',
      mode: TASKS_DASHBOARD_AVAILABLE_QUERY_MODES.LAST,
      time: TASKS_DASHBOARD_AVAILABLE_TIMES.WEEK,
    },
  },
  'render with older selected': {
    wantedQueryState: 'some-state',
    time: TASKS_DASHBOARD_AVAILABLE_TIMES.WEEK,
    query: {
      state: 'some-state',
      mode: TASKS_DASHBOARD_AVAILABLE_QUERY_MODES.OLDER,
      time: TASKS_DASHBOARD_AVAILABLE_TIMES.WEEK,
    },
  },
};

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

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
foreman-tasks-2.0.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-1.1.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-1.1.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-2.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-2.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-1.2.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-1.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-1.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js
foreman-tasks-1.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js