diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-01-08 12:47:52 -0500 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-01-08 12:47:52 -0500 |
commit | f25b2c9f2fb6448506decd9bd89052d3eb94ab4e (patch) | |
tree | dcf63a656d2fb0e26068e800672a00e1c079818d /tests/dbusmenu-gtk/mago_tests/dbusmenu.py | |
parent | 0ab4e0cd4974e8f2a963b16f9abed2bd6c7eac12 (diff) | |
parent | 214b29a5e3a400b8180bca7f079fbc89ab683644 (diff) | |
download | libdbusmenu-f25b2c9f2fb6448506decd9bd89052d3eb94ab4e.tar.gz libdbusmenu-f25b2c9f2fb6448506decd9bd89052d3eb94ab4e.tar.bz2 libdbusmenu-f25b2c9f2fb6448506decd9bd89052d3eb94ab4e.zip |
* Upstream release 0.2.0
- Remove unused libdbusmenu-qt
- Changing API to be V0.2 for reals
- Adding underline support
- Test suite fixes and automation support
- dbus-dumper tool
- Switch to org.ayatana
- Fixing the handling of typed properties, especially bools.
- Adding GetChildren function for getting a single submenu
- Starting to watch DBus if the proxy builds fail.
- Test suite fixes
- Fixing the consistency between the #defines and what
was used in the code.
* debian/control, debian/libdbusmenu-tools.install: Setting
up a package for the new dbusmenu-dumper tool.
* debian/control: Mentioning nicely that this will cause
indicator-messages << 0.3 and indicator-session << 0.2 to
break.
Diffstat (limited to 'tests/dbusmenu-gtk/mago_tests/dbusmenu.py')
-rw-r--r-- | tests/dbusmenu-gtk/mago_tests/dbusmenu.py | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/dbusmenu-gtk/mago_tests/dbusmenu.py b/tests/dbusmenu-gtk/mago_tests/dbusmenu.py new file mode 100644 index 0000000..5e9f691 --- /dev/null +++ b/tests/dbusmenu-gtk/mago_tests/dbusmenu.py @@ -0,0 +1,71 @@ +from mago.test_suite.main import SingleApplicationTestSuite +from mago.application.main import Application + +import ldtp, ooldtp, ldtputils, os.path + +class DbusMenuGtkApp(): + LAUNCHER = os.path.join(os.path.dirname(__file__), "..", "dbusMenuTest") + WINDOW = "frmlibdbusmenu-gtktest" + + def open(self, menu_schema=''): + ldtp.launchapp(self.LAUNCHER, [menu_schema]) + + def menu_exists(self, menu=''): + app = ooldtp.context(self.WINDOW) + + if menu == '': + menu = "mnu1" + + try: + component = app.getchild(menu) + except ldtp.LdtpExecutionError: + return False + + return True + + def get_submenus(self, menu=''): + app = ooldtp.context(self.WINDOW) + + if menu == '': + menu = "mnu1" + + component = app.getchild(menu) + + try: + submenus = component.listsubmenus() + except ldtp.LdtpExecutionError: + return "" + + return submenus + +class DbusMenuGtkTest(SingleApplicationTestSuite): + APPLICATION_FACTORY = DbusMenuGtkApp + + def cleanup(self): + ldtp.waittillguinotexist(self.application.WINDOW, guiTimeOut=70) + + def teardown(self): + ldtp.waittillguinotexist(self.application.WINDOW, guiTimeOut=70) + + def testStaticMenu(self, menu_schema, menu_item='', notexists=''): + self.application.open(menu_schema) + ldtp.waittillguiexist(self.application.WINDOW) + + if notexists == "True": + if self.application.menu_exists(menu_item): + raise AssertionError("The menu item exists") + else: + if not self.application.menu_exists(menu_item): + raise AssertionError("The menu item does not exists") + + + def testSubmenus(self, menu_schema, menu_item='', submenus=''): + self.application.open(menu_schema) + ldtp.waittillguiexist(self.application.WINDOW) + + if submenus != self.application.get_submenus(menu_item): + raise AssertionError("The submenus are different") + + + + |