sc/qa/uitest/inputLine/tdf131326.py | 4 +++- sc/qa/uitest/inputLine/tdf54197.py | 2 ++ sc/qa/uitest/inputLine/tdf67346.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit 3cc6b870c48b23418f65d2c3cd6eab72ef0680de Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 22 20:21:39 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Aug 22 22:30:01 2022 +0200 make an effort to fix the UITest_inputLine intermittent failure debugging what normally happens I see that the EditEngine belonging to this inputbar widget is thrown away by calc when the content of the cell changes and is only recreated on the next "Paint" of the inputbar. It's plausible that throwing processEventsToIdle at the problem solves this. Change-Id: I620bae9eb87b2ff91755da9b8d7821791f0e4240 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138708 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/qa/uitest/inputLine/tdf131326.py b/sc/qa/uitest/inputLine/tdf131326.py index 6fbfe25f02bd..90809ab42c79 100755 --- a/sc/qa/uitest/inputLine/tdf131326.py +++ b/sc/qa/uitest/inputLine/tdf131326.py @@ -17,10 +17,12 @@ class tdf131326(UITestCase): with self.ui_test.create_doc_in_start_center("calc"): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - xInputWin = xCalcDoc.getChild("sc_input_window") enter_text_to_cell(gridwin, "A1", "=1") self.xUITest.executeCommand(".uno:ConvertFormulaToValue") + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.processEventsToIdle() + xInputWin = xCalcDoc.getChild("sc_input_window") self.assertEqual(get_state_as_dict(xInputWin)["Text"], "1") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/inputLine/tdf54197.py b/sc/qa/uitest/inputLine/tdf54197.py index ba86982d91ca..a7a82d5c338f 100644 --- a/sc/qa/uitest/inputLine/tdf54197.py +++ b/sc/qa/uitest/inputLine/tdf54197.py @@ -29,6 +29,8 @@ class tdf54197(UITestCase): # The same text as above is displayed at cell A2, BUT input line is still blank self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "t") self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "t") + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.processEventsToIdle() xInputWin = xCalcDoc.getChild("sc_input_window") self.assertEqual(get_state_as_dict(xInputWin)["Text"], "t") diff --git a/sc/qa/uitest/inputLine/tdf67346.py b/sc/qa/uitest/inputLine/tdf67346.py index 5d5ff32cefb5..cc9dc14d628c 100644 --- a/sc/qa/uitest/inputLine/tdf67346.py +++ b/sc/qa/uitest/inputLine/tdf67346.py @@ -26,6 +26,8 @@ class tdf67346(UITestCase): # Move focus to input window and copy the text from there gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+SHIFT+F2"})) + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.processEventsToIdle() xInputWin = xCalcDoc.getChild("sc_input_window") self.assertEqual('true', get_state_as_dict(xInputWin)["HasFocus"])