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

uitest: convert validation manual test to automated test

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

Change-Id: I5aa3dfd87e3de66f12b2a73a8c67cb01cbb56244
üst ffd3a782
...@@ -100,4 +100,35 @@ class ManualCalcTests(UITestCase): ...@@ -100,4 +100,35 @@ class ManualCalcTests(UITestCase):
time.sleep(2) time.sleep(2)
self.ui_test.close_doc() self.ui_test.close_doc()
def test_validation(self):
self.ui_test.create_doc_in_start_center("calc")
xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C10"}))
self.ui_test.execute_dialog_through_command(".uno:Validation")
xValidationDlg = self.xUITest.getTopFocusWindow()
xAllowList = xValidationDlg.getChild("allow")
xAllowList.executeAction("SELECT", mkPropertyValues({"POS": "1"}))
xData = xValidationDlg.getChild("data")
xData.executeAction("SELECT", mkPropertyValues({"POS": "5"}))
xVal = xValidationDlg.getChild("max")
xVal.executeAction("TYPE", mkPropertyValues({"TEXT":"0"}))
xOkBtn = xValidationDlg.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
def enter_text(cell, text):
enter_text_to_cell(xGridWin, cell, text)
self.ui_test.execute_blocking_action(enter_text, "ok", args=("A1", "abc"))
self.ui_test.execute_blocking_action(enter_text, "ok", args=("B6", "2.18"))
enter_text_to_cell(xGridWin, "C2", "24")
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: # 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