diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-08 17:00:32 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-08 19:15:16 +0100 |
commit | 6b9175422310d9273ddc3d605ff64855788aae00 (patch) | |
tree | fb4804fcfc04747f80c27798b79cd2c860f6a105 /sc/qa/uitest/calc_tests8 | |
parent | 598ffe47a7f47157d891ad97d1edef032208d9f4 (diff) |
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@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests8')
-rw-r--r-- | sc/qa/uitest/calc_tests8/tdf126248.py | 41 |
1 files changed, 19 insertions, 22 deletions
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() |