fix: show label for filters in filter box in explore (#10412)

* fix: show label for filters in filter box in explore

* test: add test for label in filter box

* test: add test / fix lint

* fix: fix CR notes

* refactor: add label propType to FilterBoxItemControl.jsx
This commit is contained in:
simchaNielsen
2020-08-05 09:23:11 +03:00
committed by GitHub
parent 3d74c3ce56
commit 57dc7622b4
3 changed files with 38 additions and 27 deletions

View File

@@ -27,6 +27,7 @@ import FormRow from 'src/components/FormRow';
import datasources from '../../../fixtures/mockDatasource';
const defaultProps = {
label: 'some label',
datasource: datasources['7__table'],
onChange: sinon.spy(),
};
@@ -51,6 +52,9 @@ describe('FilterBoxItemControl', () => {
it('renderForms does the job', () => {
const popover = shallow(inst.renderForm());
expect(popover.find(FormRow)).toHaveLength(8);
expect(popover.find(FormRow).get(1).props.control.props.value).toEqual(
'some label',
);
});
it('convert type for single value filter_box', () => {