tdf#160984 sw continuous endnotes: fix testContinuousEndnotesMoveBackwards

Once continuous endnotes are in a section, this failed, even if the
generated layout is an improvement.

The layout will put the endnotes to a section, which will be directly
after the end of the body text, which is closer to what Word does, but
makes the test fail, since the foot/endnote container is no longer
directly under the page frame (the new tree is page -> body -> section
-> column -> ftncont).

Fix the problem by relaxing the assert to only check which pages have
footnote containers, which passes with and without the move to
section-based continuous endnotes, but still fails if endnotes go to
their own page, which was the original problem to be tested (endnotes
remained on page 3 and didn't move backwards).

The assert for the number of pages can remain unchanged.

Change-Id: I9a46803463c82dac317c303721de30fae48c6924
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167425
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Jenkins
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 5971e87..9cae825 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -179,9 +179,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testContinuousEndnotesMoveBackwards)
    // - Expected: 0
    // - Actual  : 1
    // i.e. there were unexpected endnotes on page 1.
    assertXPath(pLayout, "/root/page[1]/ftncont"_ostr, 0);
    assertXPath(pLayout, "/root/page[1]//ftncont"_ostr, 0);
    // All endnotes are in a container on page 2.
    assertXPath(pLayout, "/root/page[2]/ftncont"_ostr, 1);
    assertXPath(pLayout, "/root/page[2]//ftncont"_ostr, 1);
}

CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testAnchorPositionBasedOnParagraph)