mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Adding column type label to dropdowns (#4566)
* Adding column type label to dropdowns * Changing the style of column type label * Adding tests for ColumnTypeLabel * Adding tests for time and fixing if statement order * Changing location of ColumnTypeLabel tests * Updating ColumnTypeLabel structure
This commit is contained in:
committed by
Chris Williams
parent
6875868cf6
commit
3f1dfb3173
@@ -4,6 +4,7 @@ import { describe, it } from 'mocha';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import MetricOption from '../../../javascripts/components/MetricOption';
|
||||
import ColumnTypeLabel from '../../../javascripts/components/ColumnTypeLabel';
|
||||
import InfoTooltipWithTrigger from '../../../javascripts/components/InfoTooltipWithTrigger';
|
||||
|
||||
describe('MetricOption', () => {
|
||||
@@ -15,6 +16,7 @@ describe('MetricOption', () => {
|
||||
description: 'Foo is the greatest metric of all',
|
||||
warning_text: 'Be careful when using foo',
|
||||
},
|
||||
showType: false,
|
||||
};
|
||||
|
||||
let wrapper;
|
||||
@@ -59,4 +61,9 @@ describe('MetricOption', () => {
|
||||
wrapper = shallow(factory(props));
|
||||
expect(wrapper.find('a').prop('target')).to.equal('_blank');
|
||||
});
|
||||
it('shows a metric type label when showType is true', () => {
|
||||
props.showType = true;
|
||||
wrapper = shallow(factory(props));
|
||||
expect(wrapper.find(ColumnTypeLabel)).to.have.length(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user