Sha256: 756f3a91047904b8f753b47db8e43e1cb502641203d3c9ab288880f87c872ccb
Contents?: true
Size: 1.23 KB
Versions: 11
Compression:
Stored size: 1.23 KB
Contents
import { testComponentSnapshotsWithFixtures } from '@theforeman/test'; import { TASKS_DASHBOARD_AVAILABLE_TIMES, TASKS_DASHBOARD_AVAILABLE_QUERY_STATES, TASKS_DASHBOARD_AVAILABLE_QUERY_MODES, TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS, } from '../../../../TasksDashboardConstants'; import StoppedTasksCard from './StoppedTasksCard'; const { STOPPED } = TASKS_DASHBOARD_AVAILABLE_QUERY_STATES; const { LAST } = TASKS_DASHBOARD_AVAILABLE_QUERY_MODES; const { WEEK } = TASKS_DASHBOARD_AVAILABLE_TIMES; const fixtures = { 'render with minimal props': {}, 'render with props': { data: { error: { total: 9, last: 1 }, warning: { total: 8, last: 2 }, success: { total: 7, last: 3 }, }, time: WEEK, }, 'render selected': { query: { state: STOPPED }, }, }; Object.values(TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS).forEach(result => { fixtures[`render ${result}-total selected`] = { query: { state: STOPPED, result, }, }; fixtures[`render ${result}-last selected`] = { time: WEEK, query: { state: STOPPED, result, mode: LAST, time: WEEK, }, }; }); describe('StoppedTasksCard', () => testComponentSnapshotsWithFixtures(StoppedTasksCard, fixtures));
Version data entries
11 entries across 11 versions & 1 rubygems