mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
Creates storybook and tests for Tooltip component (#13184)
This commit is contained in:
committed by
GitHub
parent
d48b894573
commit
fcd443d366
@@ -22,7 +22,7 @@ import { getChartControlPanelRegistry } from '@superset-ui/core';
|
||||
|
||||
import AlteredSliceTag from 'src/components/AlteredSliceTag';
|
||||
import ModalTrigger from 'src/components/ModalTrigger';
|
||||
import TooltipWrapper from 'src/components/TooltipWrapper';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import TableCollection from 'src/components/dataViewCommon/TableCollection';
|
||||
import TableView from 'src/components/TableView';
|
||||
|
||||
@@ -97,11 +97,11 @@ describe('AlteredSliceTag', () => {
|
||||
});
|
||||
|
||||
describe('renderTriggerNode', () => {
|
||||
it('renders a TooltipWrapper', () => {
|
||||
it('renders a Tooltip', () => {
|
||||
const triggerNode = mount(
|
||||
<div>{wrapper.instance().renderTriggerNode()}</div>,
|
||||
);
|
||||
expect(triggerNode.find(TooltipWrapper)).toHaveLength(1);
|
||||
expect(triggerNode.find(Tooltip)).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
import TooltipWrapper from 'src/components/TooltipWrapper';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import RowCountLabel from 'src/explore/components/RowCountLabel';
|
||||
|
||||
describe('RowCountLabel', () => {
|
||||
@@ -34,10 +34,10 @@ describe('RowCountLabel', () => {
|
||||
true,
|
||||
);
|
||||
});
|
||||
it('renders a Label and a TooltipWrapper', () => {
|
||||
it('renders a Label and a Tooltip', () => {
|
||||
const wrapper = shallow(<RowCountLabel {...defaultProps} />);
|
||||
expect(wrapper.find(Label)).toExist();
|
||||
expect(wrapper.find(TooltipWrapper)).toExist();
|
||||
expect(wrapper.find(Tooltip)).toExist();
|
||||
});
|
||||
it('renders a danger when limit is reached', () => {
|
||||
const props = {
|
||||
|
||||
Reference in New Issue
Block a user