February 2019
Beginner
694 pages
18h 4m
English
Unfortunately, Aurelia does not provide a testing mechanism to test DOM events. This means that we cannot easily create a test that enters data into an input field, and then clicks on the Form submit button, as we did with Backbone. Consider the following HTML snippet:
<button id="submit-button-button" class="submit-button" click.delegate="nSubmitClicked()">Submit </button>
Here, we have the HTML snippet that renders our Submit button. We have already seen tests that make sure that this button is rendered onto the screen, and that the name of the button is, in fact, Submit. But take a closer look at the function name for the click.delegate attribute. It contains a very subtle misspelling of the onSubmitClicked function ...
Read now
Unlock full access