sw/qa/uitest/data/tdf159797.odt |binary sw/qa/uitest/writer_tests8/tdf159797.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+)
New commits: commit 173a79365b110cf70f628a602a22049562a477f5 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Wed Feb 28 11:49:59 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Mar 1 11:07:29 2024 +0100 Unit test to tdf159797 checks replacement of dash to endash after sentence Change-Id: I61843825faaf212eb5560797f1b6a2fdad5efce9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164086 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/qa/uitest/data/tdf159797.odt b/sw/qa/uitest/data/tdf159797.odt new file mode 100755 index 000000000000..437b6fc0cf7a Binary files /dev/null and b/sw/qa/uitest/data/tdf159797.odt differ diff --git a/sw/qa/uitest/writer_tests8/tdf159797.py b/sw/qa/uitest/writer_tests8/tdf159797.py new file mode 100644 index 000000000000..a29a1f517890 --- /dev/null +++ b/sw/qa/uitest/writer_tests8/tdf159797.py @@ -0,0 +1,29 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +from uitest.framework import UITestCase +from uitest.uihelper.common import get_url_for_data_file +from libreoffice.uno.propertyvalue import mkPropertyValues +from com.sun.star.text.TextContentAnchorType import AT_PAGE, AT_PARAGRAPH + +class tdf159797(UITestCase): + + def test_tdf159797(self): + + with self.ui_test.load_file(get_url_for_data_file("tdf159797.odt")) as document: + + xWriterDoc = self.xUITest.getTopFocusWindow() + xWriterEdit = xWriterDoc.getChild("writer_edit") + xWriterEdit.executeAction("CLICK", mkPropertyValues({"START_POS": "26", "END_POS": "26"})) + xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": " "})) + xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "31"})) + windowState = xWriterEdit.getState(); + self.assertEqual(windowState[14].Value, "This is a sentence. \u2013 Here") + + +# vim: set shiftwidth=4 softtabstop=4 expandtab: