diff --git a/demo/index.html b/demo/index.html index fc72496..27df8c2 100644 --- a/demo/index.html +++ b/demo/index.html @@ -32,6 +32,12 @@

Pre-assigned rating demo

+

Readonly demo

+ + +

Custom icon demo

- + + + + + @@ -30,19 +36,18 @@ test('instantiating the element with default properties works', function() { var element = fixture('BasicTestFixture'); - assert.equal(element.prop1, 'iron-star-rating'); - var elementShadowRoot = element.shadowRoot; - var elementHeader = elementShadowRoot.querySelector('h2'); - assert.equal(elementHeader.innerHTML, 'Hello iron-star-rating!'); + assert.equal(element.value, 0); + assert.equal(element.readonly, false); + }); + + test('setting a value on the element works', function() { + var element = fixture('InitialValueTestFixture'); + assert.equal(element.value, 3); }); - 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!'); + test('setting readonly on the element works', function() { + var element = fixture('ReadonlyTestFixture'); + assert.equal(element.readonly, true); }); });