text: define(["tests/utils","chai","jquery","text!static/ignoreButRetain/case-with-update.xml","text!static/ignoreButRetain/common.xml","text!static/ignoreButRetain/common-ignored.xml","text!static/ignoreButRetain/delete-bug-after.xml","text!static/ignoreButRetain/delete-bug-before.xml","text!static/ignoreButRetain/empty-parent.xml","text!static/ignoreButRetain/ignore-in-head.xml","text!static/ignoreButRetain/ignored-binds-with-extra-path.xml","text!static/ignoreButRetain/ignored-control-node.xml","text!static/ignoreButRetain/ignored-data-node.xml","text!static/ignoreButRetain/ignored-tag-first.xml","text!static/ignoreButRetain/multiple-ignores.xml","text!static/ignoreButRetain/multi-match.xml","text!static/ignoreButRetain/nested-ignored-nodes.xml","text!static/ignoreButRetain/referenced-renamed.xml","text!static/ignoreButRetain/referenced-unrenamed.xml","text!static/ignoreButRetain/renamed.xml","text!static/ignoreButRetain/unknown-element.xml","text!static/ignoreButRetain/unrenamed.xml"],function(a,b,f,e,p,v,l,d,k,s,o,r,w,n,i,x,h,j,m,u,c,g){var q=a.assertXmlEqual,t=a.call;describe("The Ignore-But-Retain plugin",function(){before(function(z){a.init({javaRosa:{langs:["en"]},core:{onReady:z}})});var y=function(A,z){a.loadXML(A);q(t("createXML"),A);t("getData").ignore.ignoredNodes=[];q(t("createXML"),z)};it("ignores data, bind, body, and setvalue nodes with various edge cases (see XML)",function(){y(p,v)});it("can insert ignored element into empty parent",function(){a.loadXML(k);q(t("createXML"),k)});it("does not insert multiple copies of ignored nodes",function(){a.loadXML(x);q(t("createXML"),x)});it("can ignore elements in <head>",function(){a.loadXML(s);q(t("createXML"),s)});it("preserves position when first tag in <HEAD> is ignored",function(){a.loadXML(n);q(t("createXML"),n)});it("handles multiple ignore nodes in a row",function(){y(i,i)});it("handles an ignore node's reference node being renamed",function(){a.loadXML(g);t("getMugByPath","/data/question9").p.nodeID="question9a";q(t("createXML"),u)});it("handles a node being renamed that's referenced in an ignore node's XML",function(){a.loadXML(m);t("getMugByPath","/data/question1").p.nodeID="foobar";q(t("createXML"),j)});it("keeps relative position on delete sibling of ignored element",function(){a.loadXML(d);a.deleteQuestion("delete-me");q(t("createXML"),l)});it("should not duplicate nested ignored nodes",function(){a.loadXML(h);q(t("createXML"),h)});it("should preserve data node children",function(){a.loadXML(e);q(t("createXML"),e)});it("should ignore binds and controls associated with ignored data node",function(){a.loadXML(w);a.assertJSTreeState("question");q(t("createXML"),w)});it("should ignore bind nodes with extra path elements",function(){a.loadXML(o);a.assertJSTreeState("question","question2");q(t("createXML"),o)});it("should ignore control node",function(){a.loadXML(r);a.assertJSTreeState("question","ignored--1");q(t("createXML"),r)});it("should load form with unknown/un-ignored element",function(){a.loadXML(c);q(t("createXML"),c)})})});