Owner's avatar

PolymerElements/iron-test-helpers

Utility classes to make testing easier

Overview

Build status

iron-test-helpers

A set of utility classes to make testing easier. For more details on the methods available, please check the documentation of mock-interactions.js and test-helpers.js

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:

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.tap(button);
});

Download

Download ZIP

Activity

Created 2 years ago

Last updated 13 days ago

Bower Dependencies

polymer ^1.0.0

Made with by a bunch of awesome contributors. Brought to you by Liferay.