[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 8 18:15:55 UTC 2021
sc/qa/uitest/calc_tests8/tdf126248.py | 41 +++++++++++++++-------------------
1 file changed, 19 insertions(+), 22 deletions(-)
New commits:
commit 6b9175422310d9273ddc3d605ff64855788aae00
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Feb 8 17:00:32 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Feb 8 19:15:16 2021 +0100
uitest: sc: blind fix for failing test (take 2)
Change-Id: Id7bc0bb4552513cdd8a287f6f239ef899c18d143
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110587
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/calc_tests8/tdf126248.py b/sc/qa/uitest/calc_tests8/tdf126248.py
index fad0e3081c43..967e5c027c3e 100644
--- a/sc/qa/uitest/calc_tests8/tdf126248.py
+++ b/sc/qa/uitest/calc_tests8/tdf126248.py
@@ -13,6 +13,21 @@ from uitest.uihelper.common import select_pos
class tdf126248(UITestCase):
+ def assertFontName(self, gridwin, fontName):
+
+ #Open the sidebar
+ self.xUITest.executeCommand(".uno:Sidebar")
+ gridwin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "TextPropertyPanel"}))
+
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+
+ xFontName = xCalcDoc.getChild("fontnamecombobox")
+ self.ui_test.wait_until_property_is_updated(xFontName, "Text", fontName)
+ self.assertEqual(fontName, get_state_as_dict(xFontName)['Text'])
+
+ #Close the sidebar
+ self.xUITest.executeCommand(".uno:Sidebar")
+
def changeLocalSetting(self, language):
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")
xDialog = self.xUITest.getTopFocusWindow()
@@ -58,40 +73,22 @@ class tdf126248(UITestCase):
enter_text_to_cell(gridwin, "A1", "Test")
- self.xUITest.executeCommand(".uno:Sidebar")
- gridwin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "TextPropertyPanel"}))
-
- xCalcDoc = self.xUITest.getTopFocusWindow()
-
- fontName = xCalcDoc.getChild("fontnamecombobox")
- self.ui_test.wait_until_property_is_updated(fontName, "Text", westFontName)
-
# Without the fix in place, this test would have failed here
- self.assertEqual(westFontName, get_state_as_dict(fontName)['Text'])
+ self.assertFontName(gridwin, westFontName)
enter_text_to_cell(gridwin, "B1", "測試")
- self.ui_test.wait_until_property_is_updated(fontName, "Text", eastFontName)
- self.assertEqual(eastFontName, get_state_as_dict(fontName)['Text'])
+ self.assertFontName(gridwin, eastFontName)
self.changeLocalSetting("Default - English (USA)")
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
-
- fontName = xCalcDoc.getChild("fontnamecombobox")
-
enter_text_to_cell(gridwin, "C1", "Test")
- self.ui_test.wait_until_property_is_updated(fontName, "Text", westFontName)
- self.assertEqual(westFontName, get_state_as_dict(fontName)['Text'])
+ self.assertFontName(gridwin, westFontName)
enter_text_to_cell(gridwin, "D1", "測試")
- self.ui_test.wait_until_property_is_updated(fontName, "Text", eastFontName)
- self.assertEqual(eastFontName, get_state_as_dict(fontName)['Text'])
-
- self.xUITest.executeCommand(".uno:Sidebar")
+ self.assertFontName(gridwin, eastFontName)
self.ui_test.close_doc()
More information about the Libreoffice-commits
mailing list