@@ -158,9 +158,9 @@ class GenericScopeViewEmulatorTestCase(DashBaseTestCase):
158class DashAppsEmulatorTestCase(DashBaseTestCase):
158class DashAppsEmulatorTestCase(DashBaseTestCase):
160 available_applications = [
160 available_applications = [
161− 'Title.1', 'Title.21', 'Title.41', 'Title.61', 'Title.81',
161+ 'Title.2.0', 'Title.2.1', 'Title.2.2', 'Title.2.3', 'Title.2.4',
162− 'Title.101', 'Title.121', 'Title.141', 'Title.161', 'Title.181',
162+ 'Title.2.5', 'Title.2.6', 'Title.2.7', 'Title.2.8', 'Title.2.9',
163− 'Title.201', 'Title.221', 'Title.241', 'Title.261', 'Title.281']
163+ 'Title.2.9', 'Title.2.10', 'Title.2.11']
165 def setUp(self):
165 def setUp(self):
166 # Set up the fake scopes before launching unity.
166 # Set up the fake scopes before launching unity.
@@ -178,21 +178,25 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
178 'No category found with name unexisting category', str(exception))
178 'No category found with name unexisting category', str(exception))
180 def test_get_applications_should_return_list_with_names(self):
180 def test_get_applications_should_return_list_with_names(self):
181− category = 'installed'
181+ category = '2'
182 expected_apps_count = self._get_number_of_application_slots(category)
182 expected_apps_count = self._get_number_of_application_slots(category)
183 expected_applications = self.available_applications[
183 expected_applications = self.available_applications[
184 :expected_apps_count]
184 :expected_apps_count]
186 applications = self.applications_scope.get_applications(category)
186 applications = self.applications_scope.get_applications(category)
187+ applications_titles = []
188+ for application in applications:
189+ cardHeader = application.select_single('CardHeader')
190+ applications_titles.append(cardHeader.title)
188 self.assertThat(applications, HasLength(expected_apps_count))
192 self.assertThat(applications, HasLength(expected_apps_count))
189 for expected in expected_applications:
193 for expected in expected_applications:
190− self.assertThat(applications, Contains(expected))
194+ self.assertThat(applications_titles, Contains(expected))
192 def _get_number_of_application_slots(self, category):
196 def _get_number_of_application_slots(self, category):
193 category_element = self.applications_scope._get_category_element(
197 category_element = self.applications_scope._get_category_element(
194 category)
198 category)
195− grid = category_element.select_single('GenericFilterGrid')
199+ grid = category_element.select_single('DashFilterGrid')
196 return grid.columns * grid.rows
200 return grid.columns * grid.rows
198 def test_open_preview(self):
202 def test_open_preview(self):