on xenial help sign in
Add wait_ makes tests more reliable
6d26097Albert Astals
tests/autopilot/unity8/shell/emulators/dash.py+2−2
@@ -66,7 +66,7 @@ class Dash(emulators.UnityEmulatorBase):
66 return resp_grid.select_single('Tile', text=text)
66 return resp_grid.select_single('Tile', text=text)
67
67
68 def get_scope(self, scope_name='clickscope'):
68 def get_scope(self, scope_name='clickscope'):
69− return self.dash_content_list.select_single(
69+ return self.dash_content_list.wait_select_single(
70 'QQuickLoader', scopeId=scope_name)
70 'QQuickLoader', scopeId=scope_name)
71
71
72 @autopilot_logging.log_action(logger.info)
72 @autopilot_logging.log_action(logger.info)
@@ -86,7 +86,7 @@ class Dash(emulators.UnityEmulatorBase):
86
86
87 def _get_scope_loader(self, scope_id):
87 def _get_scope_loader(self, scope_id):
88 try:
88 try:
89− return self.dash_content_list.select_single(
89+ return self.dash_content_list.wait_select_single(
90 'QQuickLoader', scopeId=scope_id)
90 'QQuickLoader', scopeId=scope_id)
91 except dbus.StateNotFoundError:
91 except dbus.StateNotFoundError:
92 raise emulators.UnityEmulatorException(
92 raise emulators.UnityEmulatorException(