summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-22 00:47:54 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-22 01:17:44 +0100
commitad5416b663ef647c289eb290195c1350242038fa (patch)
tree7006807e2aa291822dc83e268c37e9ac9d439f14 /uitest
parentc3b36b460e71c4e3e0cd5eefcdc7b2b5340b502e (diff)
uitest: convert cell recalculation manual test to automated testing
http://manual-test.libreoffice.org/manage/case/151/ Change-Id: I6b4e857eb949b29b03817058f8fb3a93ace13309
Diffstat (limited to 'uitest')
-rw-r--r--uitest/manual_tests/calc.py23
-rw-r--r--uitest/manual_tests/data/cell_recalc.odsbin0 -> 34064 bytes
2 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:
diff --git a/uitest/manual_tests/data/cell_recalc.ods b/uitest/manual_tests/data/cell_recalc.ods
new file mode 100644
index 000000000000..4b125fd2e2e6
--- /dev/null
+++ b/uitest/manual_tests/data/cell_recalc.ods
Binary files differ