mirror of
https://github.com/apache/superset.git
synced 2026-04-13 13:18:25 +00:00
New "Time Series - Table" visualization (#3543)
* [WiP] adding a new "Time Series - Table" viz * Adding drag-n-drop to collection * Using keys in arrays * tests
This commit is contained in:
committed by
GitHub
parent
645de384e3
commit
bb0f69d074
@@ -0,0 +1,33 @@
|
||||
/* 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user