Fix unit test after commit 98935eef13
Similar to commit cfa9990d47 (Enable
this test on all platforms. 2024-04-20), it seems that 'mask' gets
exported inconsistently. This patch workarouns the problem; a proper
fix would be finding the real cause.
Change-Id: I94c89442aa0385262fba67ec58c9d8d12ffbea27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166573
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -1585,16 +1585,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160773)
|
||||
{
|
||||
xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160773.svg");
|
||||
|
||||
const bool hasMask = countXPathNodes(pDocument, "/primitive2D/transform/mask"_ostr) > 0;
|
||||
const OString aXPath = hasMask ? "/primitive2D/transform/mask/transform"_ostr
|
||||
: "/primitive2D/transform/transform"_ostr;
|
||||
|
||||
// tdf#160773 Check there is a rectangle
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000");
|
||||
assertXPath(pDocument, aXPath + "/polypolygoncolor", "color"_ostr, "#ff0000");
|
||||
|
||||
// tdf#159661 Check there is text in the right position
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, 1);
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "x"_ostr, "0");
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "y"_ostr, "1");
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "width"_ostr, "0");
|
||||
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion"_ostr, "text"_ostr, "Red");
|
||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, 1);
|
||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "x"_ostr, "0");
|
||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "y"_ostr, "1");
|
||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "height"_ostr, "0");
|
||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "width"_ostr, "0");
|
||||
assertXPath(pDocument, aXPath + "/textsimpleportion"_ostr, "text"_ostr, "Red");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf156271)
|
||||
|
||||
Reference in New Issue
Block a user