Skip to content

Commit

Permalink
more ddl coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lasky committed Aug 18, 2016
1 parent 435be8c commit e530499
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/strand-dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@

<strand-dropdown id="ddlData" max-items="10" placeholder="Some Longer Label"></strand-dropdown>

<strand-dropdown id="ddlFit1" placeholder="some longer label" value="item01" max-items="4">
<strand-list-item value="item01">strand-list-item 01 and things and stuff and whatnot what yes no what</strand-list-item>
<strand-list-item value="item02">strand-list-item 02</strand-list-item>
<strand-list-item value="item03">strand-list-item 03</strand-list-item>
<strand-list-item value="item04">strand-list-item 04</strand-list-item>
<strand-list-item value="item05">strand-list-item 05</strand-list-item>
</strand-dropdown>

<script type="text/javascript">

describe("strand-dropdown", function() {
Expand Down Expand Up @@ -251,6 +259,22 @@
});
});

it("should set the title attribute for long names", function(done) {
var ddl = document.querySelector('#ddlFit1');
Polymer.RenderStatus.afterNextRender(ddl, function() {
ddl.$.target.getAttribute('title').should.equal('strand-list-item 01 and things and stuff and whatnot what yes no what');
done();
});
});

it("should return the value correctly", function(done) {
var ddl = document.querySelector('#ddlFit1');
Polymer.RenderStatus.afterNextRender(ddl, function() {
ddl.value.should.equal('item01');
done();
});
});

});

</script>
Expand Down

0 comments on commit e530499

Please sign in to comment.