Write unit test for MaterialColumnLayout

master
Alexander Surma 2015-03-17 14:39:07 +00:00
parent 925c7f821b
commit 5557881a0f
2 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,7 @@
<script src="../src/wskComponentHandler.js"></script>
<script src="../src/button/button.js"></script>
<script src="../src/checkbox/checkbox.js"></script>
<script src="../src/column-layout/column-layout.js"></script>
<script src="../src/radio/radio.js"></script>
<script src="../src/spinner/spinner.js"></script>
<script src="../src/menu/menu.js"></script>
@ -58,6 +59,7 @@
<!--<script src="test.spec.js"></script>-->
<script src="unit/button.js"></script>
<script src="unit/checkbox.js"></script>
<script src="unit/column-layout.js"></script>
<script src="unit/radio.js"></script>
<script src="unit/spinner.js"></script>
<script src="unit/menu.js"></script>

View File

@ -0,0 +1,14 @@
describe('column-layout tests', function () {
it('Should have MaterialColumnLayout globally available', function () {
expect(MaterialColumnLayout).to.be.a('function');
});
it('Should be upgraded to a MaterialColumnLayout successfully', function () {
var el = document.createElement('div');
componentHandler.upgradeElement(el, 'MaterialColumnLayout');
var upgraded = el.getAttribute('data-upgraded');
expect(upgraded).to.contain('MaterialColumnLayout');
});
});