+ var sectionChildren = cv.doc().children();
+ expect(sectionChildren.length).to.equal(3);
+ expect(sectionChildren[0].wlxmlNode.getTagName()).to.equal('b');
+ expect(sectionChildren[1].wlxmlNode.getTagName()).to.equal('c');
+ expect(sectionChildren[2].wlxmlNode.getTagName()).to.equal('a');
+ });
+
+ it('handles moving text node to another parent', function() {
+ var c = getCanvasFromXML('<section>Alice<div><span>has</span></div>a cat.</section>'),
+ doc = c.wlxmlDocument,
+ text = doc.root.contents()[0],
+ div = doc.root.contents()[1];
+
+ div.append(text);
+