on xenial help sign in
Reverted the change that returns application cards instead of titles.
48bb475Leo Arias
tests/autopilot/unity8/shell/emulators/dash.py+5−3
@@ -175,11 +175,13 @@ class DashApps(GenericScopeView):
175
175
176 """
176 """
177 category_element = self._get_category_element(category)
177 category_element = self._get_category_element(category)
178− application_tiles = category_element.select_many('Card')
178+ application_cards = category_element.select_many('Card')
179 # TODO return them on the same order they are displayed.
179 # TODO return them on the same order they are displayed.
180 # --elopio - 2014-1-15
180 # --elopio - 2014-1-15
181 result = []
181 result = []
182− for card in application_tiles:
182+ for card in application_cards:
183 if card.objectName != 'cardToolCard':
183 if card.objectName != 'cardToolCard':
184+ card_header = card.select_single('CardHeader')
184− result.append(card)
185+ result.append(card_header.title)
186+
185 return result
187 return result
tests/autopilot/unity8/shell/tests/test_emulators.py+1−5
@@ -172,14 +172,10 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
172 :expected_apps_count]
172 :expected_apps_count]
173
173
174 applications = self.applications_scope.get_applications(category)
174 applications = self.applications_scope.get_applications(category)
175− applications_titles = []
176− for application in applications:
177− cardHeader = application.select_single('CardHeader')
178− applications_titles.append(cardHeader.title)
179
175
180 self.assertThat(applications, HasLength(expected_apps_count))
176 self.assertThat(applications, HasLength(expected_apps_count))
181 for expected in expected_applications:
177 for expected in expected_applications:
182− self.assertThat(applications_titles, Contains(expected))
178+ self.assertThat(applications, Contains(expected))
183
179
184 def _get_number_of_application_slots(self, category):
180 def _get_number_of_application_slots(self, category):
185 category_element = self.applications_scope._get_category_element(
181 category_element = self.applications_scope._get_category_element(