mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
* DECKGL integration Adding a new set of geospatial visualizations building on top of the awesome deck.gl library. https://github.com/uber/deck.gl While the end goal it to expose all types of layers and let users bind their data to control most props exposed by the deck.gl API, this PR focusses on a first set of visualizations and props: * ScatterLayer * HexagonLayer * GridLayer * ScreenGridLayer * Addressing comments * lint * Linting * Addressing chri's comments
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
/* eslint-disable no-unused-expressions */
|
|
import React from 'react';
|
|
import { expect } from 'chai';
|
|
import { describe, it, beforeEach } from 'mocha';
|
|
import { shallow } from 'enzyme';
|
|
import { OverlayTrigger } from 'react-bootstrap';
|
|
|
|
import FixedOrMetricControl from
|
|
'../../../../javascripts/explore/components/controls/FixedOrMetricControl';
|
|
import SelectControl from
|
|
'../../../../javascripts/explore/components/controls/SelectControl';
|
|
import TextControl from
|
|
'../../../../javascripts/explore/components/controls/TextControl';
|
|
import ControlHeader from '../../../../javascripts/explore/components/ControlHeader';
|
|
|
|
const defaultProps = {
|
|
value: { },
|
|
};
|
|
|
|
describe('FixedOrMetricControl', () => {
|
|
let wrapper;
|
|
let inst;
|
|
beforeEach(() => {
|
|
wrapper = shallow(<FixedOrMetricControl {...defaultProps} />);
|
|
inst = wrapper.instance();
|
|
});
|
|
|
|
it('renders a OverlayTrigger', () => {
|
|
const controlHeader = wrapper.find(ControlHeader);
|
|
expect(controlHeader).to.have.lengthOf(1);
|
|
expect(wrapper.find(OverlayTrigger)).to.have.length(1);
|
|
});
|
|
|
|
it('renders a TextControl and a SelectControl', () => {
|
|
const popOver = shallow(inst.renderPopover());
|
|
expect(popOver.find(TextControl)).to.have.lengthOf(1);
|
|
expect(popOver.find(SelectControl)).to.have.lengthOf(1);
|
|
});
|
|
});
|