Last active
August 29, 2015 14:27
-
-
Save Granze/ebbfa5ab07183a1f4e22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="../../webcomponentsjs/webcomponents.min.js"></script> | |
<script src="../../web-component-tester/browser.js"></script> | |
<script src="../../test-fixture/test-fixture-mocha.js"></script> | |
<link rel="import" href="../flip-clock.html"> | |
<link rel="import" href="../../test-fixture/test-fixture.html"> | |
</head> | |
<body> | |
<test-fixture id="clock"> | |
<template> | |
<flip-clock></flip-clock> | |
</template> | |
</test-fixture> | |
<script> | |
describe('<flip-clock>', function() { | |
var clock; | |
beforeEach(function() { | |
clock = fixture('clock'); | |
}); | |
context('common tests', function() { | |
it('should display the command buttons', function() { | |
clock.setAttribute('show-buttons', 'true'); | |
expect(clock.showButtons).to.be.equal(true); | |
expect(clock.querySelector('.buttons').attributes).to.have.ownProperty('visible'); | |
}); | |
it('should not display the command buttons', function() { | |
expect(clock.showButtons).to.be.equal(false); | |
expect(clock.querySelector('.buttons').attributes).to.not.have.ownProperty('visible'); | |
}); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment