summaryrefslogtreecommitdiffstats
path: root/uitest/demo_ui/listbox.py
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-22 05:57:06 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-22 18:19:34 +0200
commit19e380cfd980233b71915f34a1ba83d24bd5303e (patch)
tree8f70893172995635f070830baab037eb6622deb4 /uitest/demo_ui/listbox.py
parentuitest: convert all calc demos to the unittest based approach (diff)
downloadcore-19e380cfd980233b71915f34a1ba83d24bd5303e.tar.gz
core-19e380cfd980233b71915f34a1ba83d24bd5303e.zip
uitest: move the demo ui tests to the new unittest approach
Change-Id: I70222d701191f28f9dffb3bfdfbb7510d64d0251
Diffstat (limited to 'uitest/demo_ui/listbox.py')
-rw-r--r--uitest/demo_ui/listbox.py52
1 files changed, 24 insertions, 28 deletions
diff --git a/uitest/demo_ui/listbox.py b/uitest/demo_ui/listbox.py
index 03a4c9e0a9ed..f6857c2f01d2 100644
--- a/uitest/demo_ui/listbox.py
+++ b/uitest/demo_ui/listbox.py
@@ -9,47 +9,43 @@ from uitest_helper import UITest
from helper import mkPropertyValues
-def select_entry_pos(xContext):
- xUITest = xContext.ServiceManager.createInstanceWithContext(
- "org.libreoffice.uitest.UITest", xContext)
+from UITestCase import UITestCase
- ui_test = UITest(xUITest, xContext)
+class ListBoxTest(UITestCase):
- ui_test.create_doc_in_start_center("calc")
+ def test_select_entry_pos(self):
- ui_test.execute_dialog_through_command(".uno:FormatCellDialog")
- xCellsDlg = xUITest.getTopFocusWindow()
+ self.ui_test.create_doc_in_start_center("calc")
- categoryLB = xCellsDlg.getChild("categorylb")
- props = {"POS": "4"}
- actionProps = mkPropertyValues(props)
- categoryLB.executeAction("SELECT", actionProps)
+ self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog")
+ xCellsDlg = self.xUITest.getTopFocusWindow()
- xOkBtn = xCellsDlg.getChild("ok")
- xOkBtn.executeAction("CLICK", tuple())
+ categoryLB = xCellsDlg.getChild("categorylb")
+ props = {"POS": "4"}
+ actionProps = mkPropertyValues(props)
+ categoryLB.executeAction("SELECT", actionProps)
- ui_test.close_doc()
+ xOkBtn = xCellsDlg.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
-def select_entry_text(xContext):
- xUITest = xContext.ServiceManager.createInstanceWithContext(
- "org.libreoffice.uitest.UITest", xContext)
+ self.ui_test.close_doc()
- ui_test = UITest(xUITest, xContext)
+ def test_select_entry_text(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()
- categoryLB = xCellsDlg.getChild("categorylb")
- props = {"TEXT": "Time"}
+ categoryLB = xCellsDlg.getChild("categorylb")
+ props = {"TEXT": "Time"}
- actionProps = mkPropertyValues(props)
- categoryLB.executeAction("SELECT", actionProps)
+ actionProps = mkPropertyValues(props)
+ categoryLB.executeAction("SELECT", actionProps)
- 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: */