mirror of
https://github.com/apache/superset.git
synced 2026-04-10 03:45:22 +00:00
* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues * [lint] fix undefined var in TimeTable.jsx
32 lines
845 B
JavaScript
32 lines
845 B
JavaScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import { expect } from 'chai';
|
|
|
|
import InfoTooltipWithTrigger from '../../../src/components/InfoTooltipWithTrigger';
|
|
import OptionDescription from '../../../src/components/OptionDescription';
|
|
|
|
const defaultProps = {
|
|
option: {
|
|
label: 'Some option',
|
|
description: 'Description for some option',
|
|
},
|
|
};
|
|
|
|
describe('OptionDescription', () => {
|
|
let wrapper;
|
|
let props;
|
|
|
|
beforeEach(() => {
|
|
props = { option: Object.assign({}, defaultProps.option) };
|
|
wrapper = shallow(<OptionDescription {...props} />);
|
|
});
|
|
|
|
it('renders an InfoTooltipWithTrigger', () => {
|
|
expect(wrapper.find(InfoTooltipWithTrigger)).to.have.lengthOf(1);
|
|
});
|
|
|
|
it('renders a span with the label', () => {
|
|
expect(wrapper.find('.option-label').text()).to.equal('Some option');
|
|
});
|
|
});
|