summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-11-10 18:19:51 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-11 10:39:20 +0100
commit9f8e4bd8501e9bb9e286cffed5f35d0f0075e9b8 (patch)
tree9ddfe3ef9ee98477a38ac54a6b82ce63a0fe0adc
parent760fc80d167a6bc63305fe3a45dd4df6f87d9f68 (diff)
tdf#143128: sw: Add UItest
Change-Id: Idc9584c856382a4e0f9dbd70dbd45d018f8f83e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125006 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/uitest/findReplace/findReplace.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/uitest/findReplace/findReplace.py b/sw/qa/uitest/findReplace/findReplace.py
index dc44ba0f414f..576c38244fbf 100644
--- a/sw/qa/uitest/findReplace/findReplace.py
+++ b/sw/qa/uitest/findReplace/findReplace.py
@@ -173,4 +173,33 @@ class findReplace(UITestCase):
# Without the fix in place, this test would have failed with AssertionError: '' != 'x'
self.assertEqual(document.Text.String, "x")
+ def test_tdf143128(self):
+ with self.ui_test.create_doc_in_start_center("writer") as document:
+
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ type_text(xWriterEdit, "ß")
+
+ self.assertEqual(document.Text.String, "ß")
+
+ with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog:
+
+ searchterm = xDialog.getChild("searchterm")
+ searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"ẞ"}))
+
+ replaceterm = xDialog.getChild("replaceterm")
+ replaceterm.executeAction("TYPE", mkPropertyValues({"TEXT":"SS"}))
+
+ replaceall = xDialog.getChild("replaceall")
+ replaceall.executeAction("CLICK", tuple())
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: 'ß' != 'SS'
+ self.assertEqual(document.Text.String, "SS")
+
+ self.xUITest.executeCommand(".uno:Undo")
+
+ self.assertEqual(document.Text.String, "ß")
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: