Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
bicknellr committed Jun 13, 2018
2 parents a6e1920 + ddb7a48 commit 37784b5
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions test/iron-dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,25 @@
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../iron-test-helpers/mock-interactions.js"></script>
<script src="../../web-animations-js/web-animations-next-lite.min.js"></script>

<script>
// Don't load the web animations polyfill if we're using neon-animations
// 1.x, which loads it itself.
// TODO(bicknellr): Remove when updating to 3.x, bower.json may be removed.
(function() {
const xhr = new XMLHttpRequest();
xhr.open('GET', '../../neon-animation/bower.json', false);
xhr.send();

const bowerJson = JSON.parse(xhr.responseText);
if (typeof bowerJson.version !== 'string' ||
parseInt(bowerJson.version.split('.')[0], 10) !== 1) {
document.write(
'<script src="../../web-animations-js/web-animations-next-lite.min.js"></scr' +
'ipt>');
}
})();
</script>

<link rel="import" href="../iron-dropdown.html">
<link rel="import" href="../../neon-animation/animations/fade-in-animation.html">
Expand Down Expand Up @@ -316,14 +334,14 @@
getComputedStyle(content).pointerEvents,
'none',
'content is interactive');
dropdown.addEventListener('iron-overlay-opened', function() {
assert.notEqual(
getComputedStyle(content).pointerEvents,
'none',
'content is not interactive');
done();
});
}, 150);
dropdown.addEventListener('iron-overlay-opened', function() {
assert.notEqual(
getComputedStyle(content).pointerEvents,
'none',
'content is not interactive');
done();
});
});
});
});
Expand Down

0 comments on commit 37784b5

Please sign in to comment.