diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-22 05:57:06 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-22 18:19:34 +0200 |
commit | 19e380cfd980233b71915f34a1ba83d24bd5303e (patch) | |
tree | 8f70893172995635f070830baab037eb6622deb4 /uitest/demo_ui/checkbox.py | |
parent | d8b376adba93a48e77ec9e81c96744d1e4997d88 (diff) |
uitest: move the demo ui tests to the new unittest approach
Change-Id: I70222d701191f28f9dffb3bfdfbb7510d64d0251
Diffstat (limited to 'uitest/demo_ui/checkbox.py')
-rw-r--r-- | uitest/demo_ui/checkbox.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/uitest/demo_ui/checkbox.py b/uitest/demo_ui/checkbox.py index 5cc456bc4f19..a15d686471ab 100644 --- a/uitest/demo_ui/checkbox.py +++ b/uitest/demo_ui/checkbox.py @@ -9,6 +9,8 @@ from uitest_helper import UITest from helper import mkPropertyValues +from UITestCase import UITestCase + import time try: @@ -21,22 +23,20 @@ except ImportError: print("URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc") raise -def toggle_checkbox(xContext): - xUITest = xContext.ServiceManager.createInstanceWithContext( - "org.libreoffice.uitest.UITest", xContext) +class CheckBoxTest(UITestCase): - ui_test = UITest(xUITest, xContext) + def test_toggle_checkbox(self): - ui_test.create_doc_in_start_center("calc") + self.ui_test.create_doc_in_start_center("calc") - ui_test.execute_dialog_through_command(".uno:FormatCellDialog") - xCellsDlg = xUITest.getTopFocusWindow() - xNegativeNumRedCB = xCellsDlg.getChild("negnumred") - xNegativeNumRedCB.executeAction("CLICK",tuple()) + self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") + xCellsDlg = self.xUITest.getTopFocusWindow() + xNegativeNumRedCB = xCellsDlg.getChild("negnumred") + xNegativeNumRedCB.executeAction("CLICK",tuple()) - okBtn = xCellsDlg.getChild("ok") - okBtn.executeAction("CLICK", tuple()) + okBtn = xCellsDlg.getChild("ok") + okBtn.executeAction("CLICK", tuple()) - ui_test.close_doc() + self.ui_test.close_doc() # vim:set shiftwidth=4 softtabstop=4 expandtab: */ |