I am currently trying to test the 'onOk' and 'onCancel' methods following snippet of code with jest and enzyme:
Modal.confirm({
title: 'Role Change',
content: `Change?`,
okText: 'Change',
onOk: method1,
onCancel: method2
})
This is within a helper method called in a component. I've tried waiting for the component to update and then query the OK button but enzyme can't seem to find it. When I do a debug() on the component, the modal doesn't show up either. Is there a good way to spy on these methods or even invoke them in the first place? Thanks!