Files
superset2/superset/assets/spec/javascripts/dashboard/SliceCell_spec.jsx
Maxime Beauchemin 9c6248f3ba [dashboard] add link to export CSV from dashboard (#3280)
* [dashboard] add link to export CSV from dashboard

fixes #1304

* Fix tests
2017-08-14 18:25:36 -07:00

25 lines
641 B
JavaScript

import React from 'react';
import { mount } from 'enzyme';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import { slice } from './fixtures';
import SliceCell from '../../../javascripts/dashboard/components/SliceCell';
describe('SliceCell', () => {
const mockedProps = {
slice,
removeSlice: () => {},
expandedSlices: {},
};
it('is valid', () => {
expect(
React.isValidElement(<SliceCell {...mockedProps} />),
).to.equal(true);
});
it('renders six links', () => {
const wrapper = mount(<SliceCell {...mockedProps} />);
expect(wrapper.find('a')).to.have.length(6);
});
});