starmath/source/edit.cxx | 1 uitest/Module_uitest.mk | 1 uitest/UITest_math_demo.mk | 15 +++++++++++ uitest/math_tests/start.py | 53 +++++++++++++++++++++++++++++++++++++++++ vcl/source/uitest/uiobject.cxx | 2 + 5 files changed, 72 insertions(+)
New commits: commit d0d2580c47ab134019dfde06df6222035b7acfc1 Author: Markus Mohrhard <[email protected]> Date: Sun Jul 17 01:22:24 2016 +0200 uitest: add makefile part for new math tests Change-Id: I90adb3bf9eefcf687e4a76d58aefb9a5775e5e88 diff --git a/uitest/Module_uitest.mk b/uitest/Module_uitest.mk index 7246bd1..63bd596 100644 --- a/uitest/Module_uitest.mk +++ b/uitest/Module_uitest.mk @@ -15,4 +15,5 @@ $(eval $(call gb_Module_add_uicheck_targets,uitest,\ UITest_writer_demo \ UITest_impress_demo \ UITest_demo_ui \ + UITest_math_demo \ )) diff --git a/uitest/UITest_math_demo.mk b/uitest/UITest_math_demo.mk new file mode 100644 index 0000000..5c1a6db --- /dev/null +++ b/uitest/UITest_math_demo.mk @@ -0,0 +1,15 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UITest_UITest,math_demo)) + +$(eval $(call gb_UITest_add_modules,math_demo,$(SRCDIR)/uitest,\ + math_tests/ \ +)) +# vim: set noet sw=4 ts=4: commit e646286c306fc92867641cc399f640b69c0ec62a Author: Markus Mohrhard <[email protected]> Date: Sun Jul 17 01:11:19 2016 +0200 uitest: add initial demo for math edit window Change-Id: I4fe1dc7fe2f5179dc97fc80a80604d54ae3ad333 diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py index 10d3450..39b3111 100644 --- a/uitest/math_tests/start.py +++ b/uitest/math_tests/start.py @@ -39,5 +39,15 @@ class SimpleMathTest(UITestCase): self.ui_test.close_doc() + def test_math_edit(self): + self.ui_test.create_doc_in_start_center("math") + + xMathDoc = self.xUITest.getTopFocusWindow() + + xMathEdit = xMathDoc.getChild("math_edit") + + xMathEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "E=mc^2"})) + + self.ui_test.close_doc() # vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit bf5110d0704ba95d9a080f7dea64162c346317a9 Author: Markus Mohrhard <[email protected]> Date: Sun Jul 17 01:10:36 2016 +0200 uitest: annotate the math edit window Change-Id: Ic902ba191d632d6a9e399c6809a8e88fdfc26301 diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index bf1af9a..f4400fc 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -88,6 +88,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) : aModifyIdle ("SmEditWindow ModifyIdle"), aCursorMoveIdle ("SmEditWindow CursorMoveIdle") { + set_id("math_edit"); SetHelpId(HID_SMA_COMMAND_WIN_EDIT); SetMapMode(MAP_PIXEL); commit d66e284151105dfea4e8b7eeae3166c510964919 Author: Markus Mohrhard <[email protected]> Date: Sun Jul 17 00:53:39 2016 +0200 uitest: add some initial math ui tests Change-Id: Iad02a40b683d7b3bbbad0214c82ad4b5b6878ea9 diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py new file mode 100644 index 0000000..10d3450 --- /dev/null +++ b/uitest/math_tests/start.py @@ -0,0 +1,43 @@ +# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from uitest.uihelper.common import get_state_as_dict + +from libreoffice.uno.propertyvalue import mkPropertyValues + +from uitest.framework import UITestCase + +import time +import unittest + +class SimpleMathTest(UITestCase): + + def test_start_math(self): + + self.ui_test.create_doc_in_start_center("math") + + xMathDoc = self.xUITest.getTopFocusWindow() + + self.ui_test.close_doc() + + def test_docking_window_listbox(self): + + self.ui_test.create_doc_in_start_center("math") + + xMathDoc = self.xUITest.getTopFocusWindow() + + xList = xMathDoc.getChild("listbox") + state = get_state_as_dict(xList) + self.assertEqual(state["SelectEntryText"], "Unary/Binary Operators") + xList.executeAction("SELECT", mkPropertyValues({"POS": "1"})) + state = get_state_as_dict(xList) + self.assertEqual(state["SelectEntryText"], "Relations") + + self.ui_test.close_doc() + + +# vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 72dd364fa9fca9b8668878517df8489f1fb1f8ba Author: Markus Mohrhard <[email protected]> Date: Sun Jul 17 00:53:17 2016 +0200 uitest: add 2 more properties for listboxes Change-Id: Id8fb7973f868c12f920051ef3719ed0ff0712828 diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index c7c6035..7ded8dc 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -722,6 +722,8 @@ StringMap ListBoxUIObject::get_state() aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled()); aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount()); aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectEntryCount()); + aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectEntryPos()); + aMap["SelectEntryText"] = mxListBox->GetSelectEntry(); return aMap; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
