Add universal "New" button (#6670)

* [cosmetic] CRUD's list from 'Add Filter' to 'Filter Results'

* Add global new button

* A better viz type selector

* lint

* Move view to new module, add unit test

* 'Filter Results' -> 'Filter'

* db merge

* Filter -> 'Filter List'
This commit is contained in:
Maxime Beauchemin
2019-01-17 15:48:40 -08:00
committed by GitHub
parent 99d6dc07d6
commit 6718588781
8 changed files with 101 additions and 19 deletions

View File

@@ -20,7 +20,9 @@ import React from 'react';
import { shallow } from 'enzyme';
import { Button } from 'react-bootstrap';
import Select from 'react-virtualized-select';
import AddSliceContainer from '../../../src/addSlice/AddSliceContainer';
import VizTypeControl from '../../../src/explore/components/controls/VizTypeControl';
const defaultProps = {
datasources: [
@@ -40,8 +42,9 @@ describe('AddSliceContainer', () => {
expect(wrapper.state().visType).toBe('table');
});
it('renders 2 selects', () => {
expect(wrapper.find(Select)).toHaveLength(2);
it('renders a select and a VizTypeControl', () => {
expect(wrapper.find(Select)).toHaveLength(1);
expect(wrapper.find(VizTypeControl)).toHaveLength(1);
});
it('renders a button', () => {