[time table] add tooltip to sparkline (#3767)

* [time table] add tooltip to sparkline

* [time table] open link in new tab

* [time table] add back Mustache
This commit is contained in:
Chris Williams
2017-11-03 12:37:15 -07:00
committed by Grace Guo
parent 7fd9c82ae8
commit 7f3edad119
6 changed files with 58 additions and 32 deletions

View File

@@ -50,4 +50,13 @@ describe('MetricOption', () => {
wrapper = shallow(factory(props));
expect(wrapper.find(InfoTooltipWithTrigger)).to.have.length(1);
});
it('sets target="_blank" when openInNewWindow is true', () => {
props.url = 'https://github.com/apache/incubator-superset';
wrapper = shallow(factory(props));
expect(wrapper.find('a').prop('target')).to.equal(null);
props.openInNewWindow = true;
wrapper = shallow(factory(props));
expect(wrapper.find('a').prop('target')).to.equal('_blank');
});
});