My problem was that how can you test the template of your modal. I’ve checked the unit tests of the modal, and found that if you want to test the DOM, you have an interface for this. For example, you can test the classes of your element like this:
But what about other DOM tests? How can you reach the DOM of your modal? I’ve found that you can get the template through
yourModalInstance.modalEl. But can I get the parsed template of the modal straight, without compiling it?
Fortunately you have a helper method,
yourModalInstance.$el, which you can get the parsed dom through like this:
So the answer is
yourModalInstance.$el, if you’d like to use jquery to test, and
yourModalInstance.modalEl, if you want to test the raw template.