From 9f8e4bd8501e9bb9e286cffed5f35d0f0075e9b8 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 10 Nov 2021 18:19:51 +0100 Subject: tdf#143128: sw: Add UItest Change-Id: Idc9584c856382a4e0f9dbd70dbd45d018f8f83e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125006 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/qa/uitest/findReplace/findReplace.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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: -- cgit