How to reach to a popover from Enzyme in full DOM (mount) rendering test
samphan last edited by
My React/Meteor project use Enzyme for unit testing. In a full DOM rendering test which I mount() the top-level App component, it is rendered correctly. However, when I try to navigate, using Enzyme’s simulate(‘click’), down to a popover. I realize that the popover is created elsewhere, not in the same DOM, its shadow-dom, I guess. However, I need to click on a list-item inside the popover.
Is it possible to reach to the popover using Enzyme or web api?
mbessieres last edited by
Sam, were you ever able to get this all working? I’m having a hard time getting jest/enzyme to even run with onsen. Curious to hear what you did to even get tests to run.
I’m not sure why this didn’t originally get a response. I haven’t used Enzyme, so I can’t be sure of what’s going on, but it seems to relate more generally to Web Components rather than Onsen UI. Perhaps look into whether Enzyme supports accessing a Web Component’s shadow DOM.