| Index: third_party/polymer/v0_8/components/iron-test-helpers/README.md
|
| diff --git a/third_party/polymer/v0_8/components/iron-test-helpers/README.md b/third_party/polymer/v0_8/components/iron-test-helpers/README.md
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dbc5318e24a8705c33d3549056ecac9df732d4fb
|
| --- /dev/null
|
| +++ b/third_party/polymer/v0_8/components/iron-test-helpers/README.md
|
| @@ -0,0 +1,23 @@
|
| +# iron-test-helpers
|
| +
|
| +Utility classes to make testing easier.
|
| +
|
| +## Mock Interactions
|
| +
|
| +This is a set of methods to simulate mouse or keyboard interaction with an element. Include `mock-interactions.js` and then use them like so:
|
| +
|
| +```javascript
|
| +test('can be triggered with space', function(done) {
|
| + button.addEventListener('keydown', function() {
|
| + done();
|
| + });
|
| + MockInteractions.pressSpace(button);
|
| +});
|
| +
|
| +test('can be clicked', function(done) {
|
| + button.addEventListener('click', function() {
|
| + done();
|
| + });
|
| + MockInteractions.down(button);
|
| +});
|
| +```
|
|
|