plastic-map-info
Version:
A more flexible infowindow for google maps
53 lines (42 loc) • 1.74 kB
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>plastic-map-info test</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../plastic-map-info.html">
</head>
<body>
<test-fixture id="BasicTestFixture">
<template>
<plastic-map-info></plastic-map-info>
</template>
</test-fixture>
<test-fixture id="ChangedPropertyTestFixture">
<template>
<plastic-map-info prop1="new-prop1"></plastic-map-info>
</template>
</test-fixture>
<script>
suite('plastic-map-info', function() {
test('instantiating the element with default properties works', function() {
var element = fixture('BasicTestFixture');
assert.equal(element.prop1, 'plastic-map-info');
var elementShadowRoot = element.shadowRoot;
var elementHeader = elementShadowRoot.querySelector('h2');
assert.equal(elementHeader.innerHTML, 'Hello plastic-map-info!');
});
test('setting a property on the element works', function() {
// Create a test fixture
var element = fixture('ChangedPropertyTestFixture');
assert.equal(element.prop1, 'new-prop1');
var elementShadowRoot = element.shadowRoot;
var elementHeader = elementShadowRoot.querySelector('h2');
assert.equal(elementHeader.innerHTML, 'Hello new-prop1!');
});
});
</script>
</body>
</html>