Skip to content

Commit

Permalink
fix tabs test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuwen Qian committed May 6, 2016
1 parent a067c2e commit 619d65b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/imports/test-strand-tabs-aux.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<template preserve-content>
<div id="aux">It works</div>
<div id="aux2">It works</div>
<div id="aux"><h1>It works (external content)</h1></div>
<div id="aux2"><h2>It works</h2></div>
</template>
14 changes: 6 additions & 8 deletions test/strand-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<script>
describe("strand-tabs", function() {

it("should have an element constructor", function() {
var a = new Strand.Tabs();
a.nodeName.should.equal("STRAND-TABS");
Expand Down Expand Up @@ -71,9 +71,8 @@

it("should load external content", function() {
var a = document.querySelector('#testTab1'),
tabContent = a.$.view,
nodes = Polymer.dom(a.$.view).children;
nodes[0].id.should.equal('aux');
nodes = a.getContentChildren('#view');
nodes[0].querySelector('#aux').should.exist;
});

it("should fire a `loaded` event", function(done) {
Expand All @@ -88,9 +87,8 @@
var a = document.querySelector('#testTab3');
a.loadExternal('imports/test-strand-tabs-aux.html', function() {
// flush(function() {
var tabContent = a.$.view,
nodes = Polymer.dom(a.$.view).children;
nodes[1].id.should.equal('aux2');
var nodes = a.getContentChildren('#view');
nodes[0].querySelector('#aux2').should.exist;
done();
// });
});
Expand All @@ -100,4 +98,4 @@
</script>

</body>
</html>
</html>

0 comments on commit 619d65b

Please sign in to comment.