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/tabdialog.py | |
parent | d8b376adba93a48e77ec9e81c96744d1e4997d88 (diff) |
uitest: move the demo ui tests to the new unittest approach
Change-Id: I70222d701191f28f9dffb3bfdfbb7510d64d0251
Diffstat (limited to 'uitest/demo_ui/tabdialog.py')
-rw-r--r-- | uitest/demo_ui/tabdialog.py | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/uitest/demo_ui/tabdialog.py b/uitest/demo_ui/tabdialog.py index 09bf600424cf..99e7b9f327d4 100644 --- a/uitest/demo_ui/tabdialog.py +++ b/uitest/demo_ui/tabdialog.py @@ -11,44 +11,40 @@ from helper import mkPropertyValues import time -def select_tab_page_pos(xContext): - xUITest = xContext.ServiceManager.createInstanceWithContext( - "org.libreoffice.uitest.UITest", xContext) +from UITestCase import UITestCase - ui_test = UITest(xUITest, xContext) +class TabDialogTest(UITestCase): - ui_test.create_doc_in_start_center("calc") + def test_select_tab_page_pos(self): - ui_test.execute_dialog_through_command(".uno:FormatCellDialog") - xCellsDlg = xUITest.getTopFocusWindow() + self.ui_test.create_doc_in_start_center("calc") - props = {"POS": "1"} - propsUNO = mkPropertyValues(props) - xCellsDlg.executeAction("SELECT", propsUNO) + self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") + xCellsDlg = self.xUITest.getTopFocusWindow() - xOkBtn = xCellsDlg.getChild("ok") - xOkBtn.executeAction("CLICK", tuple()) + props = {"POS": "1"} + propsUNO = mkPropertyValues(props) + xCellsDlg.executeAction("SELECT", propsUNO) - ui_test.close_doc() + xOkBtn = xCellsDlg.getChild("ok") + xOkBtn.executeAction("CLICK", tuple()) -def select_tab_page_name(xContext): - xUITest = xContext.ServiceManager.createInstanceWithContext( - "org.libreoffice.uitest.UITest", xContext) + self.ui_test.close_doc() - ui_test = UITest(xUITest, xContext) + def test_select_tab_page_name(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() + self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") + xCellsDlg = self.xUITest.getTopFocusWindow() - props = {"NAME": "Borders"} - propsUNO = mkPropertyValues(props) - xCellsDlg.executeAction("SELECT", propsUNO) + props = {"NAME": "Borders"} + propsUNO = mkPropertyValues(props) + xCellsDlg.executeAction("SELECT", propsUNO) - xOkBtn = xCellsDlg.getChild("ok") - xOkBtn.executeAction("CLICK", tuple()) + xOkBtn = xCellsDlg.getChild("ok") + xOkBtn.executeAction("CLICK", tuple()) - ui_test.close_doc() + self.ui_test.close_doc() # vim:set shiftwidth=4 softtabstop=4 expandtab: */ |