-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsplash-screen_test.html
73 lines (52 loc) · 2.23 KB
/
splash-screen_test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>splash-screen test</title>
<script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script src="../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../splash-screen.html">
</head>
<body>
<test-fixture id="BasicTestFixture">
<template>
<splash-screen align="middle" show="true" background-style="#3498db" destroy="false">
<div slot="content">
<h1>Welcome to splash-screen</h1>
</div>
</splash-screen>
</template>
</test-fixture>
<test-fixture id="ReuseSplashScreen">
<template>
<splash-screen align="middle" show="true" background-style="#3498db" destroy="false">
<div slot="content">
<h1>Welcome to splash-screen</h1>
</div>
</splash-screen>
</template>
</test-fixture>
<script>
suite('splash-screen', function() {
test('instantiating the element with default properties works', function() {
var element = fixture('BasicTestFixture');
assert.equal(element.align, 'middle');
assert.equal(element.show, true);
assert.equal(element.backgroundStyle, "#3498db");
// var elementShadowRoot = element.shadowRoot;
// var elementHeader = elementShadowRoot.querySelector('h2');
// assert.equal(elementHeader.innerHTML, 'Hello splash-screen!');
});
test('reusing the splash screen by not destrying it', function() {
// Create a test fixture
var element = fixture('ReuseSplashScreen');
//assert.equal(element.destroy, false);
// var elementShadowRoot = element.shadowRoot;
// var elementHeader = elementShadowRoot.querySelector('h2');
assert.equal(element.tagName, 'SPLASH-SCREEN');
});
});
</script>
</body>
</html>