summaryrefslogtreecommitdiff
path: root/uitest/manual_tests
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-21 23:42:24 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-22 01:17:44 +0100
commite69d4c2f9294e11572ad76c59ddc55f286fbe77d (patch)
treec53d6a0a2beb05622534c55e7a48b4dea042105f /uitest/manual_tests
parentffd3a78206ae66bacd35bedc548d3d923ac070d0 (diff)
uitest: convert validation manual test to automated test
http://manual-test.libreoffice.org/manage/case/191/ Change-Id: I5aa3dfd87e3de66f12b2a73a8c67cb01cbb56244
Diffstat (limited to 'uitest/manual_tests')
-rw-r--r--uitest/manual_tests/calc.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py
index 5feadb53af0a..b0d7b2e2d29b 100644
--- a/uitest/manual_tests/calc.py
+++ b/uitest/manual_tests/calc.py
@@ -100,4 +100,35 @@ class ManualCalcTests(UITestCase):
time.sleep(2)
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: