Skip to content

Instantly share code, notes, and snippets.

@Granze
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Granze/ebbfa5ab07183a1f4e22 to your computer and use it in GitHub Desktop.
Save Granze/ebbfa5ab07183a1f4e22 to your computer and use it in GitHub Desktop.
<!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