sc/qa/uitest/calc_tests3/tdf139974.py |   26 ++++++++++----------------
 sc/qa/uitest/data/tdf139974.ods       |binary
 2 files changed, 10 insertions(+), 16 deletions(-)

New commits:
commit 2c22c95d41cd67ab865d40292e659abdd04a1b3e
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Jan 24 17:00:31 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Jan 24 20:43:48 2022 +0100

    tdf#139974: sc: fix test
    
    See https://gerrit.libreoffice.org/c/core/+/128651
    
    Change-Id: Ib38890351d7fb83ab4bffebfa9564427c16b6bcd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128874
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/uitest/inputLine/tdf139974.py 
b/sc/qa/uitest/calc_tests3/tdf139974.py
similarity index 65%
rename from sc/qa/uitest/inputLine/tdf139974.py
rename to sc/qa/uitest/calc_tests3/tdf139974.py
index 25f57b3442bf..1e7009b36fce 100644
--- a/sc/qa/uitest/inputLine/tdf139974.py
+++ b/sc/qa/uitest/calc_tests3/tdf139974.py
@@ -17,38 +17,32 @@ class tdf139974(UITestCase):
 
         with self.ui_test.load_file(get_url_for_data_file("tdf139974.ods")) as 
document:
 
-            self.assertEqual(1929753068859.0, get_cell_by_position(document, 
0, 0, 0).getValue())
+            self.assertEqual(1930864179960.0, get_cell_by_position(document, 
0, 0, 0).getValue())
+            self.assertEqual(17204.0, get_cell_by_position(document, 0, 1, 
0).getValue())
 
             xCalcDoc = self.xUITest.getTopFocusWindow()
             gridwin = xCalcDoc.getChild("grid_window")
             gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
 
-            # Move focus to the input line
-            gridwin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+SHIFT+F2"}))
-
-            xInputWin = xCalcDoc.getChild("sc_input_window")
-            self.assertEqual('true', get_state_as_dict(xInputWin)["HasFocus"])
-            self.assertEqual(17204, len(get_state_as_dict(xInputWin)["Text"]))
+            gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F2"}))
 
             self.xUITest.executeCommand(".uno:SelectAll")
             self.xUITest.executeCommand(".uno:Copy")
 
-            gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"}))
+            gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "ESC"}))
 
-            # Move focus to the input line
-            gridwin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+SHIFT+F2"}))
+            gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"}))
 
-            xInputWin = xCalcDoc.getChild("sc_input_window")
-            self.assertEqual('true', get_state_as_dict(xInputWin)["HasFocus"])
+            gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F2"}))
 
             self.xUITest.executeCommand(".uno:Paste")
 
+            gridwin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RETURN"}))
+
             # Without the fix in place, this test would have failed with
             # AssertionError: 17205 != 17204
-            self.assertEqual(17205, len(get_state_as_dict(xInputWin)["Text"]))
-
-            xInputWin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RETURN"}))
+            self.assertEqual(17205.0, get_cell_by_position(document, 0, 1, 
1).getValue())
 
-            self.assertEqual(1929753068859.0, get_cell_by_position(document, 
0, 0, 1).getValue())
+            self.assertEqual(1930864179960.0, get_cell_by_position(document, 
0, 0, 1).getValue())
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf139974.ods b/sc/qa/uitest/data/tdf139974.ods
index bc89066900bc..77ec2524798d 100644
Binary files a/sc/qa/uitest/data/tdf139974.ods and 
b/sc/qa/uitest/data/tdf139974.ods differ

Reply via email to