1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Add web-component-tester tests (#255)

* Use travis.yml from polymer

* Update .travis.yml

* Try wct tests

* Encrypt Sauce env

* More test config

* Update2

* try to remove souce_connect

* Try another config

* More browsers

* Clean tabs, test shadow dom.
This commit is contained in:
Andrey
2017-04-04 08:51:20 +03:00
committed by Paulus Schoutsen
parent e4fe4ec812
commit 57512211d7
5 changed files with 90 additions and 3 deletions

16
test/index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'state-info-test.html',
'state-info-test.html?dom=shadow',
]);
</script>
</body></html>

29
test/state-info-test.html Normal file
View File

@@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../src/components/entity/state-info.html">
</head>
<body>
<test-fixture id="state-info">
<template>
<state-info></state-info>
</template>
</test-fixture>
<script>
suite('state-info', function() {
var si;
setup(function() {
si = fixture('state-info');
});
test('default stateObj', function() {
assert.equal(si.stateObj, undefined);
});
});
</script>
</body>
</html>