jellyfin-web/dashboard-ui/bower_components/iron-collapse/test/horizontal.html
Luke Pulverenti 8996ae4eab update jqm
2015-09-05 12:58:27 -04:00

92 lines
3.3 KiB
HTML

<!doctype html>
<!--
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>iron-collapse-horizontal</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../iron-collapse.html">
</head>
<body>
<test-fixture id="test">
<template>
<iron-collapse id="collapse" opened horizontal>
<div>
Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem
</div>
</iron-collapse>
</template>
</test-fixture>
<script>
suite('horizontal', function() {
var collapse;
var delay = 500;
var collapseHeight;
setup(function () {
collapse = fixture('test');
});
test('opened attribute', function() {
assert.equal(collapse.opened, true);
});
test('horizontal attribute', function() {
assert.equal(collapse.horizontal, true);
});
test('default opened width', function(done) {
setTimeout(function() {
// store actual width
width = getComputedStyle(collapse).width;
// verify width not 0px
assert.notEqual(width, '0px');
done();
}, delay);
});
test('set opened to false', function(done) {
collapse.opened = false;
setTimeout(function() {
var h = getComputedStyle(collapse).width;
// verify width is 0px
assert.equal(h, '0px');
done();
}, delay);
});
test('set opened to true', function(done) {
collapse.opened = true;
setTimeout(function() {
var h = getComputedStyle(collapse).width;
// verify width
assert.equal(h, width);
done();
}, delay);
});
});
</script>
</body>
</html>