From db61b9a78aca7794571fc8c525a2f5b18257ccac Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sun, 01 Jul 2012 07:03:09 +0000 Subject: Make the test work for all the activities --- (limited to 'tests') diff --git a/tests/shell.py b/tests/shell.py index 22a325c..2c9b3f5 100644 --- a/tests/shell.py +++ b/tests/shell.py @@ -30,19 +30,17 @@ activities.sort(key=attrgetter("name")) # Launch and close all the activities for activity in activities: - # FIXME these does not work properly yet - if activity.name in ["Image Viewer", "Jukebox", "Pippy"]: - continue - print "Launching %s" % activity.name activity.icon.click() - # Read displays an object chooser, let's close it - if activity.name == "Read": + # Some activities displays an object chooser, let's close it + if activity.name in ["Read", "Image Viewer", "Jukebox"]: close_button = shell.child(name="Close", roleName="push button") close_button.click() activity = tree.root.child(name="sugar-activity", roleName="application") - stop_button = activity.child(name="Stop", roleName="push button") - stop_button.click() + + pred = predicate.GenericPredicate(name="Stop", roleName="push button") + stop_buttons = activity.findChildren(pred) + stop_buttons[-1].click() -- cgit v0.9.1