diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-01-24 17:00:31 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-01-24 20:43:48 +0100 |
commit | 2c22c95d41cd67ab865d40292e659abdd04a1b3e (patch) | |
tree | 11bb83dbd143107616ab5de8a4ee7c2d9715ad5c | |
parent | 6c5c6ede0103e15b8e8ac432f0ca7f6e00c9dcb4 (diff) |
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 <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/uitest/calc_tests3/tdf139974.py (renamed from sc/qa/uitest/inputLine/tdf139974.py) | 26 | ||||
-rw-r--r-- | sc/qa/uitest/data/tdf139974.ods | bin | 8699 -> 9523 bytes |
2 files changed, 10 insertions, 16 deletions
diff --git a/sc/qa/uitest/inputLine/tdf139974.py b/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 Binary files differindex bc89066900bc..77ec2524798d 100644 --- a/sc/qa/uitest/data/tdf139974.ods +++ b/sc/qa/uitest/data/tdf139974.ods |