/**
* Copyright 2017 Red Hat Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
import { FormattedMessage, IntlProvider } from 'react-intl';
import React from 'react';
import ReactShallowRenderer from 'react-test-renderer/shallow';
import DataTable from '../../../../js/components/ui/tables/DataTable';
import {
DataTableHeaderCell,
DataTableDataFieldCell
} from '../../../../js/components/ui/tables/DataTableCells';
import DataTableColumn from '../../../../js/components/ui/tables/DataTableColumn';
const data = [
{ uuid: 1, provision_state: 'failed' },
{ uuid: 2, provision_state: 'success' }
];
const mockNoRowsRenderer = function() {
return 'There are no items in data';
};
const mockOnFilter = () => 'Filtering Happened';
describe('DataTable component', () => {
let DataTableVdom, DataTableInstance;
beforeEach(() => {
let shallowRenderer = new ReactShallowRenderer();
const intlProvider = new IntlProvider({ locale: 'en' }, {});
const { intl } = intlProvider.getChildContext();
shallowRenderer.render(