Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

How to reach to a popover from Enzyme in full DOM (mount) rendering test

  • 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?


  • 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.

  • Onsen UI

    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.