Kaydet (Commit) ad5416b6 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: convert cell recalculation manual test to automated testing

http://manual-test.libreoffice.org/manage/case/151/

Change-Id: I6b4e857eb949b29b03817058f8fb3a93ace13309
üst c3b36b46
......@@ -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:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment