summaryrefslogtreecommitdiff
path: root/uitest/manual_tests/calc.py
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/manual_tests/calc.py')
-rw-r--r--uitest/manual_tests/calc.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py
index cbe2f8fd41c2..bcc8f3c17370 100644
--- a/uitest/manual_tests/calc.py
+++ b/uitest/manual_tests/calc.py
@@ -12,9 +12,13 @@ from libreoffice.calc.document import get_cell_by_position
from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.calc import enter_text_to_cell
+from uitest.path import get_srcdir_url
import time
+def get_url_for_data_file(file_name):
+ return get_srcdir_url() + "/uitest/manual_tests/data/" + file_name
+
class ManualCalcTests(UITestCase):
# http://manual-test.libreoffice.org/manage/case/189/
@@ -169,4 +173,23 @@ class ManualCalcTests(UITestCase):
self.ui_test.close_doc()
+ # http://manual-test.libreoffice.org/manage/case/151/
+ def test_cell_recalc(self):
+ doc = self.ui_test.load_file(get_url_for_data_file("cell_recalc.ods"))
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "D2:D9"}))
+ self.xUITest.executeCommand(".uno:Cut")
+
+ self.assertEqual(get_cell_by_position(doc, 0, 3, 15).getValue(), 0)
+
+ self.xUITest.executeCommand(".uno:Undo")
+
+ for i in range(1, 9):
+ self.assertTrue(get_cell_by_position(doc, 0, 3, i).getValue() != 0)
+
+ self.assertEqual(get_cell_by_position(doc, 0, 3, 15).getValue(), 195)
+
+ self.ui_test.close_doc()
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: