Skip to content

Commit

Permalink
Capture hybridDomRepeat.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Apr 17, 2017
1 parent 2722532 commit ee3b9a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/unit/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -3905,20 +3905,21 @@ <h4>x-repeat-chunked</h4>
});

test('remove & re-add works correctly', function() {
var domRepeat = hybridDomRepeat;
var wrapper = hybridDomRepeatWrapper;
Polymer.dom(document.body).removeChild(wrapper);
CustomElements.takeRecords();
hybridDomRepeat.render();
domRepeat.render();
var stamped = Array.from(document.querySelectorAll('[hybrid-stamped]'));
assert.equal(stamped.length, 0);
Polymer.dom(document.body).appendChild(wrapper);
CustomElements.takeRecords();
hybridDomRepeat.render();
domRepeat.render();
stamped = Array.from(document.querySelectorAll('[hybrid-stamped]'));
assert.equal(stamped.length, 3);
stamped.forEach(function(el, i) {
assert.equal(el.parentNode, document.body);
assert.equal(el.textContent, hybridDomRepeat.items[i].prop);
assert.equal(el.textContent, domRepeat.items[i].prop);
});
});

Expand Down

0 comments on commit ee3b9a6

Please sign in to comment.