fix Tooltip test case

This commit is contained in:
afc163 2020-05-01 15:03:27 +08:00
parent df1555c6c7
commit 7d3cb95f17
2 changed files with 6 additions and 9 deletions

View File

@ -61,9 +61,3 @@ exports[`Tooltip should hide when mouse leave antd disabled component Switch 1`]
</button>
</span>
`;
exports[`Tooltip should works for mismatch placement 1`] = `
<span>
Hello world!
</span>
`;

View File

@ -303,13 +303,16 @@ describe('Tooltip', () => {
<Tooltip
title="xxxxx"
align={{
points: ['aa', 'bb'],
points: ['bc', 'tl'],
}}
mouseEnterDelay={0}
>
<span>Hello world!</span>
</Tooltip>,
);
expect(wrapper.render()).toMatchSnapshot();
const button = wrapper.find('span').at(0);
button.simulate('mouseenter');
await sleep(600);
expect(wrapper.instance().getPopupDomNode().className).toContain('ant-tooltip');
});
});