3
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
Code distributed by Google as part of the polymer project is also
8
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
14
<title>paper-header-panel tests</title>
16
<meta charset="utf-8">
17
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
18
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
20
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
22
<script src="../../web-component-tester/browser.js"></script>
23
<script src="../../test-fixture/test-fixture-mocha.js"></script>
25
<link rel="import" href="../../test-fixture/test-fixture.html">
26
<link rel="import" href="../paper-header-panel.html">
39
<test-fixture id="standard">
41
<paper-header-panel mode="standard">
42
<div class="paper-header">header</div>
48
<test-fixture id="seamed">
50
<paper-header-panel mode="seamed">
51
<div class="paper-header">header</div>
57
<test-fixture id="seamed-shadow">
59
<paper-header-panel mode="seamed" shadow>
60
<div class="paper-header">header</div>
66
<test-fixture id="waterfall">
68
<paper-header-panel mode="waterfall">
69
<div class="paper-header">header</div>
75
<test-fixture id="waterfall-tall">
77
<paper-header-panel mode="waterfall-tall">
78
<div class="paper-header">header</div>
84
<test-fixture id="scroll">
86
<paper-header-panel mode="scroll">
87
<div class="paper-header">header</div>
93
<test-fixture id="cover">
95
<paper-header-panel mode="cover">
96
<div class="paper-header">header</div>
104
suite('shadow', function() {
105
var standard, seamed, waterfall, waterfallTall, scroll, cover;
107
setup(function(done) {
108
standard = fixture('standard');
109
seamed = fixture('seamed');
110
seamedShadow = fixture('seamed-shadow');
111
waterfall = fixture('waterfall');
112
waterfallTall = fixture('waterfall-tall');
113
scroll = fixture('scroll');
114
cover = fixture('cover');
115
// async to let change handlers fire
119
function hasShadow(panel) {
120
return panel.visibleShadow;
123
test('has shadow in standard mode', function() {
124
assert.isTrue(hasShadow(standard), 'shadow has display');
127
test('no shadow in seamed mode', function() {
128
assert.isFalse(hasShadow(seamed), 'shadow is display:none');
131
test('no shadow in waterfall mode', function() {
132
assert.isFalse(hasShadow(waterfall), 'shadow is display:none');
135
test('no shadow in waterfall-tall mode', function() {
136
assert.isFalse(hasShadow(waterfallTall), 'shadow is display:none');
139
test('no shadow in scroll mode', function() {
140
assert.isFalse(hasShadow(scroll), 'shadow is display:none');
143
test('no shadow in cover mode', function() {
144
assert.isFalse(hasShadow(cover), 'shadow is display:none');
147
test('shadow property forces shadow to show', function() {
148
assert.isTrue(hasShadow(seamedShadow), 'shadow has display');