将鼠标悬停在赛普拉斯和测试工具提示中的 SVG 上



场景:

我有类似的东西

<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- Using g to inherit presentation attributes -->
<g fill="white" stroke="green" stroke-width="5">
<circle cx="40" cy="40" r="25" />
<circle cx="60" cy="60" r="25" />
</g>
</svg>

将鼠标悬停在 svg 上将显示工具提示,我需要测试是否显示工具提示以及内容是否正确。

有什么建议吗?尝试触发器(鼠标悬停(不起作用

cy.get(svg).trigger('focus')

为我工作

最新更新