@@ -136,24 +136,9 @@ class Dash(emulators.UnityEmulatorBase):
136136 self.dash_content_list.currentIndex.wait_for(original_index + 1)
137137
138138
139−class DashPreview(emulators.UnityEmulatorBase):
140− """Autopilot emulator for the generic preview."""
141−
142− def get_details(self):
143− """Return the details of the open preview."""
144− title = self.select_single('Label', objectName='titleLabel').text
145− subtitle = self.select_single(
146− 'Label', objectName='subtitleLabel').text
147− description = self.select_single(
148− 'Label', objectName='descriptionLabel').text
149− return dict(title=title, subtitle=subtitle, description=description)
150−
151−
152139class GenericScopeView(emulators.UnityEmulatorBase):
153140 """Autopilot emulator for generic scopes."""
154141
155− preview_class = DashPreview
156−
157142 @autopilot_logging.log_action(logger.info)
158143 def open_preview(self, category, app_name):
159144 """Open the preview of an application.
@@ -163,15 +148,13 @@ class GenericScopeView(emulators.UnityEmulatorBase):
163148
164149 """
165150 category_element = self._get_category_element(category)
166− icon = category_element.select_single('Tile', text=app_name)
151+ icon = category_element.select_single('Card', title=app_name)
167152 # FIXME some categories need a long press in order to see the preview.
168153 # Some categories do not show previews, like recent apps.
169154 # --elopio - 2014-1-14
170155 self.pointing_device.click_object(icon)
171− preview = self.get_root_instance().wait_select_single(
172− self.preview_class, isCurrent=True)
173− preview.showProcessingAction.wait_for(False)
174− return preview
156+ return self.get_root_instance().wait_select_single(
157+ 'PreviewListView', objectName='dashContentPreviewList')
175158
176159 def _get_category_element(self, category):
177160 try:
@@ -182,24 +165,9 @@ class GenericScopeView(emulators.UnityEmulatorBase):
182165 'No category found with name {}'.format(category))
183166
184167
185−class AppPreview(DashPreview):
186− """Autopilot emulator for the application preview."""
187−
188− def get_details(self):
189− """Return the details of the application showed in its preview."""
190− details = super(AppPreview, self).get_details()
191− # TODO return screenshots, icon, rating and reviews.
192− # --elopio - 2014-1-15
193− return dict(
194− title=details.get('title'), publisher=details.get('subtitle'),
195− description=details.get('description'))
196−
197−
198168class DashApps(GenericScopeView):
199169 """Autopilot emulator for the applications scope."""
200170
201− preview_class = AppPreview
202−
203171 def get_applications(self, category):
204172 """Return the list of applications on a category.
205173