Project

General

Profile

« Previous | Next » 

Revision 5e7343ec

Added by Maria Agaphontzev 12 months ago

Fixes #36439 - remove storybook and update ui docs

View differences:

webpack/assets/javascripts/react_app/components/common/charts/DonutChart/DonutChart.test.js
import { shallow } from '@theforeman/test';
import React from 'react';
import { mockStoryData, emptyData } from './DonutChart.fixtures';
import { mockData, emptyData } from './DonutChart.fixtures';
import DonutChart from './';
import * as chartService from '../../../../../services/charts/DonutChartService';
jest.unmock('./');
describe('renders DonutChart', () => {
it('render donut chart', () => {
chartService.getDonutChartConfig = jest.fn(() => mockStoryData);
const wrapper = shallow(<DonutChart data={mockStoryData} />);
chartService.getDonutChartConfig = jest.fn(() => mockData);
const wrapper = shallow(<DonutChart data={mockData} />);
expect(wrapper).toMatchSnapshot();
});

Also available in: Unified diff