sw/qa/extras/layout/layout3.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9c7acbc937b3b341c10187b837e09cc20399f04e
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon May 13 08:37:22 2024 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon May 13 12:15:08 2024 +0200

    tdf#160984 sw continuous endnotes: fix CppunitTest_sw_layoutwriter3
    
    These are similar to commit ab3416cad1dd4e706432f9b1a3592cec823c76b0
    (tdf#160984 sw continuous endnotes: fix
    testContinuousEndnotesMoveBackwards, 2024-05-10).
    
    I've manually verified that the use-case still works as intended, so fix
    the failing tests by relaxing the assert a bit: now we accept endnotes
    directly under the page frame or under the column frame as well.
    
    This way these tests won't break when we switch to section-based
    continuous endnotes.
    
    Change-Id: Ib98d6277534cc2e934595f19927836744eec64d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167567
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index e907f6bc8ebf..329c81847313 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -1444,7 +1444,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf124601)
     // i.e. there was a separate endnote page, even when the 
ContinuousEndnotes compat option was
     // on.
     assertXPath(pXmlDoc, "/root/page"_ostr, 2);
-    assertXPath(pXmlDoc, "/root/page[2]/ftncont"_ostr, 1);
+    assertXPath(pXmlDoc, "/root/page[2]//ftncont"_ostr, 1);
 }
 
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf124601b)
@@ -1554,7 +1554,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, 
testContinuousEndnotesInsertPageAtStart)
     // - Expected: 1
     // - Actual  : 0
     // i.e. the footnote container remained on page 2.
-    assertXPath(pXmlDoc, "/root/page[3]/ftncont"_ostr, 1);
+    assertXPath(pXmlDoc, "/root/page[3]//ftncont"_ostr, 1);
 }
 
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testContinuousEndnotesDeletePageAtStart)
@@ -1581,7 +1581,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, 
testContinuousEndnotesDeletePageAtStart)
     // - Actual  : 2
     // i.e. the endnote remained on an (otherwise) empty 2nd page.
     assertXPath(pXmlDoc, "/root/page"_ostr, 1);
-    assertXPath(pXmlDoc, "/root/page[1]/ftncont"_ostr, 1);
+    assertXPath(pXmlDoc, "/root/page[1]//ftncont"_ostr, 1);
 }
 
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf128399)

Reply via email to