diff options
author | Oliver Specht <oliver.specht@cib.de> | 2024-02-28 11:49:59 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-03-01 11:07:29 +0100 |
commit | 173a79365b110cf70f628a602a22049562a477f5 (patch) | |
tree | bd5bf88cbcc2ed3d6eb4af09752fc74b5bea707f /sw/qa/uitest/writer_tests8 | |
parent | 4edcd840aef4d1b594beecb44a0edbc0cdf5e5aa (diff) |
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.stahl@allotropia.de>
Diffstat (limited to 'sw/qa/uitest/writer_tests8')
-rw-r--r-- | sw/qa/uitest/writer_tests8/tdf159797.py | 29 |
1 files changed, 29 insertions, 0 deletions
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: |