sw/qa/uitest/writer_tests3/specialCharacter.py |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit e38374b15be9ea4ced36a9b5954de1dc18ba2943
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Mon Apr 11 17:40:57 2022 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Tue Apr 12 08:06:40 2022 +0200

    tdf#56363 - UI test fails if the selected font is not present
    Change-Id: Ic8ff99464b435169460d678590896decc91f5152
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132712
    Tested-by: Andreas Heinisch <andreas.heini...@yahoo.de>
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/sw/qa/uitest/writer_tests3/specialCharacter.py 
b/sw/qa/uitest/writer_tests3/specialCharacter.py
index 494875024c1e..c9e4299f2c1d 100644
--- a/sw/qa/uitest/writer_tests3/specialCharacter.py
+++ b/sw/qa/uitest/writer_tests3/specialCharacter.py
@@ -21,15 +21,16 @@ class specialCharacter(UITestCase):
 
             # Insert a font including a font feature into the font name 
combobox
             xFontName = xWriterDoc.getChild("fontnamecombobox")
-            xFontName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
-            xFontName.executeAction("TYPE", 
mkPropertyValues({"TEXT":"Liberation Sans:smcp"}))
+            fontName = get_state_as_dict(xFontName)["Text"]
+            xFontName.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"CTRL+A"}))
+            xFontName.executeAction("TYPE", mkPropertyValues({"TEXT": fontName 
+ ":smcp"}))
             xFontName.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
 
             # Open special character dialog and check selected font name
             with 
self.ui_test.execute_dialog_through_command(".uno:InsertSymbol", 
close_button="cancel") as xDialog:
                 xComboFont = xDialog.getChild("fontlb")
                 # Without the fix in place, no font would be selected
-                self.assertEqual(get_state_as_dict(xComboFont)["Text"], 
"Liberation Sans")
+                self.assertEqual(get_state_as_dict(xComboFont)["Text"], 
fontName)
 
     def test_special_character(self):
         with self.ui_test.create_doc_in_start_center("writer") as document:

Reply via email to