I'm currently experiencing an issue in karma with unit testing. I'm having an it and I want to simulate a click on a button with the id id.
I tried to write $('#id').trigger("click"), and I was wondering why its not working.
Then I outputed the content of $('#id') and realzied that the whole html (so from the starting html tag to the ending html tag) is returned.
In Chrome Developer Tools Console, $('#id') delivers back the right DOM element. Does anybody have an idea, what the issue could be about?
Aucun commentaire:
Enregistrer un commentaire