on xenial help sign in
make autopilot work *again*
commit8ed8c76c78e720678242cfae1bea68d3e2e0db6a authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 28 Mar 2014, 13:58 (13 years ago) parente7358c1
2 files changed+10−2
tests/autopilot/unity8/shell/emulators/dash.py+10−1 tests/autopilot/unity8/shell/tests/test_emulators.py−1
tests/autopilot/unity8/shell/emulators/dash.py+10−1
@@ -80,7 +80,7 @@ class Dash(emulators.UnityEmulatorBase):
8080 'No scope found with id {0}'.format(scope_id))
8181
8282 def _get_scope_from_loader(self, loader):
83− return loader.select_single(GenericScopeView)
83+ return loader.get_children()[0]
8484
8585 def _open_scope_scrolling(self, scope_loader):
8686 scroll = self._get_scroll_direction(scope_loader)
@@ -161,6 +161,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
161161 raise emulators.UnityEmulatorException(
162162 'No category found with name {}'.format(category))
163163
164+class DashApps(emulators.UnityEmulatorBase):
164165 def get_applications(self, category):
165166 """Return the list of applications on a category.
166167
@@ -176,3 +177,11 @@ class GenericScopeView(emulators.UnityEmulatorBase):
176177 if card.objectName != 'cardToolCard':
177178 result.append(card)
178179 return result
180+
181+ def _get_category_element(self, category):
182+ try:
183+ return self.wait_select_single(
184+ 'Base', objectName='dashCategory{}'.format(category))
185+ except dbus.StateNotFoundError:
186+ raise emulators.UnityEmulatorException(
187+ 'No category found with name {}'.format(category))
tests/autopilot/unity8/shell/tests/test_emulators.py−1
@@ -128,7 +128,6 @@ class DashEmulatorTestCase(DashBaseTestCase):
128128 scope_id = 'clickscope'
129129 scope = self.dash.open_scope(scope_id)
130130 self._assert_scope_is_opened(scope, scope_id)
131− self.assertIsInstance(scope, dash_emulators.GenericScopeView)
132131
133132
134133class GenericScopeViewEmulatorTestCase(DashBaseTestCase):