There's now pytest-ipywidgets.
See jupyter-widgets/ipywidgets#2934 (comment). Note that this might still be quite difficult to implement because we need to emulate a GPU as well if we want to render data. I believe deck used some setup with xvfb to emulate the GPU in CI