From 8265fab93f5b818a33edf5b952c0764be3b93a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= Date: Wed, 26 Feb 2020 20:17:12 +0100 Subject: [PATCH] test: remove redundant shape related C++ test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test case is covered by cypress tests. See shape_properties_spec.js. Those tests will fail if SVG rendering is broken. Change-Id: I1a3434f9696c6a323a23ded0b1b2816d74373c7a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89590 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai --- test/UnitRenderShape.cpp | 38 ---------------------------- test/data/shapes_writer.svg | 49 ------------------------------------- 2 files changed, 87 deletions(-) delete mode 100644 test/data/shapes_writer.svg diff --git a/test/UnitRenderShape.cpp b/test/UnitRenderShape.cpp index b15e94358..9167ec5af 100644 --- a/test/UnitRenderShape.cpp +++ b/test/UnitRenderShape.cpp @@ -71,7 +71,6 @@ void stripDescriptions(std::vector& svg) class UnitRenderShape : public UnitWSD { TestResult testRenderShapeSelectionImpress(); - TestResult testRenderShapeSelectionWriter(); TestResult testRenderShapeSelectionWriterImage(); public: @@ -121,39 +120,6 @@ UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionImpress() return TestResult::Ok; } -UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionWriter() -{ - const char* testname = "testRenderShapeSelectionWriter "; - try - { - std::string documentPath, documentURL; - helpers::getDocumentPathAndURL("shape.odt", documentPath, documentURL, testname); - - std::shared_ptr socket = helpers::loadDocAndGetSocket( - Poco::URI(helpers::getTestServerURI()), documentURL, testname); - - // Select the shape with SHIFT + F4 - helpers::sendKeyPress(socket, 0, 771 | helpers::SpecialKey::skShift, testname); - std::this_thread::sleep_for(std::chrono::milliseconds(250)); - helpers::sendTextFrame(socket, "rendershapeselection mimetype=image/svg+xml", testname); - std::vector responseSVG - = helpers::getResponseMessage(socket, "shapeselectioncontent:", testname); - CPPUNIT_ASSERT(!responseSVG.empty()); - auto it = std::find(responseSVG.begin(), responseSVG.end(), '\n'); - if (it != responseSVG.end()) - responseSVG.erase(responseSVG.begin(), ++it); - - stripDescriptions(responseSVG); - - CPPUNIT_ASSERT(helpers::svgMatch(testname, responseSVG, "shapes_writer.svg")); - } - catch (const Poco::Exception& exc) - { - CPPUNIT_FAIL(exc.displayText()); - } - return TestResult::Ok; -} - UnitBase::TestResult UnitRenderShape::testRenderShapeSelectionWriterImage() { const char* testname = "testRenderShapeSelectionWriterImage "; @@ -194,10 +160,6 @@ void UnitRenderShape::invokeTest() if (result != TestResult::Ok) exitTest(result); - result = testRenderShapeSelectionWriter(); - if (result != TestResult::Ok) - exitTest(result); - result = testRenderShapeSelectionWriterImage(); if (result != TestResult::Ok) exitTest(result); diff --git a/test/data/shapes_writer.svg b/test/data/shapes_writer.svg deleted file mode 100644 index e5764d969..000000000 --- a/test/data/shapes_writer.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file