mirror of
https://github.com/apache/superset.git
synced 2026-04-09 03:16:07 +00:00
* [WiP] adding a new "Time Series - Table" viz * Adding drag-n-drop to collection * Using keys in arrays * tests
34 lines
949 B
JavaScript
34 lines
949 B
JavaScript
/* eslint-disable no-unused-expressions */
|
|
import React from 'react';
|
|
import { FormControl, OverlayTrigger } from 'react-bootstrap';
|
|
import sinon from 'sinon';
|
|
import { expect } from 'chai';
|
|
import { describe, it, beforeEach } from 'mocha';
|
|
import { shallow } from 'enzyme';
|
|
|
|
import TimeSeriesColumnControl from '../../../../javascripts/explore/components/controls/TimeSeriesColumnControl';
|
|
|
|
const defaultProps = {
|
|
name: 'x_axis_label',
|
|
label: 'X Axis Label',
|
|
onChange: sinon.spy(),
|
|
};
|
|
|
|
describe('SelectControl', () => {
|
|
let wrapper;
|
|
let inst;
|
|
beforeEach(() => {
|
|
wrapper = shallow(<TimeSeriesColumnControl {...defaultProps} />);
|
|
inst = wrapper.instance();
|
|
});
|
|
|
|
it('renders an OverlayTrigger', () => {
|
|
expect(wrapper.find(OverlayTrigger)).to.have.lengthOf(1);
|
|
});
|
|
|
|
it('renders an Popover', () => {
|
|
const popOver = shallow(inst.renderPopover());
|
|
expect(popOver.find(FormControl)).to.have.lengthOf(3);
|
|
});
|
|
});
|