public void MigrateBasicPageWith2PartLineage_CopiesTextAndImage()
{
SetDom(@"<div class='bloom-page' data-pagelineage='5dcd48df-e9ab-4a07-afd4-6a24d0398382;426e78a9-34d3-47f1-8355-ae737470bb6e' id='thePage'>
<div class='marginBox'>
<div class='bloom-imageContainer bloom-leadingElement'><img data-license='cc-by-nc-sa' data-copyright='Copyright © 2012, LASI' style='width: 608px; height: 471px; margin-left: 199px; margin-top: 0px;' src='erjwx3bl.q3c.png' alt='This picture, erjwx3bl.q3c.png, is missing or was loading too slowly.' height='471' width='608'></img></div>
<div aria-describedby='qtip-1' data-hasqtip='true' class='bloom-translationGroup bloom-trailingElement normal-style'>
<div aria-describedby='qtip-0' data-hasqtip='true' class='bloom-editable normal-style bloom-content1' contenteditable='true' lang='en'>
There was an old man called Bilanga who was very tall and also not yet married.
</div>
<div data-hasqtip='true' class='bloom-editable normal-style' contenteditable='true' lang='pis'>
Wanfala olman nem blong hem Bilanga barava tol an hem no marit tu.
</div>
<div data-hasqtip='true' class='bloom-editable normal-style' contenteditable='true' lang='xyz'>
Translation into xyz, the primary language.
</div>
<div class='bloom-editable' contenteditable='true' lang='z'></div>
</div>
</div>
</div>
");
var book = CreateBook();
var dom = book.RawDom;
var page = (XmlElement)dom.SafeSelectNodes("//div[@id='thePage']")[0];
book.BringPageUpToDate(page);
var newPage = (XmlElement)dom.SafeSelectNodes("//div[@id='thePage']")[0];
CheckPageIsCustomizable(newPage);
CheckPageLineage(page, newPage, "5dcd48df-e9ab-4a07-afd4-6a24d0398382", "adcd48df-e9ab-4a07-afd4-6a24d0398382");
CheckEditableText(newPage, "en", "There was an old man called Bilanga who was very tall and also not yet married.");
CheckEditableText(newPage, "pis", "Wanfala olman nem blong hem Bilanga barava tol an hem no marit tu.");
CheckEditableText(newPage, "xyz", "Translation into xyz, the primary language.");
CheckEditableText(newPage, "z", "");
AssertThatXmlIn.Dom(dom).HasSpecifiedNumberOfMatchesForXpath("//img[@data-license='cc-by-nc-sa' and @data-copyright='Copyright © 2012, LASI' and @src='erjwx3bl.q3c.png']", 1);
AssertThatXmlIn.Dom(dom).HasSpecifiedNumberOfMatchesForXpath("//img", 1);
Assert.That(newPage.SafeSelectNodes("//div[@lang='z' and contains(@class,'bloom-editable')]"), Has.Count.EqualTo(1), "Failed to remove old child element");
}