on xenial help sign in
Use the header border instead of the bottom panel.
55f8a31Leo Arias
tests/autopilot/unity8/shell/emulators/dash.py+14−14
@@ -117,28 +117,28 @@ class Dash(emulators.UnityEmulatorBase):
117 @autopilot_logging.log_action(logger.info)
117 @autopilot_logging.log_action(logger.info)
118 def _scroll_to_left_scope(self):
118 def _scroll_to_left_scope(self):
119 original_index = self.dash_content_list.currentIndex
119 original_index = self.dash_content_list.currentIndex
120− # Scroll on the dash bar, because some scopes have contents that can be
120+ # Scroll on the border of the page header panel, because some scopes
121− # scrolled horizontally.
121+ # have contents that can be scrolled horizontally.
122− panel = self.select_single('DashBar').select_single('Panel')
122+ page_header = self.select_single('PageHeader')
123+ border = page_header.select_single('QQuickBorderImage')
123− start_x = panel.width / 3
124+ start_x = border.width / 3
124− stop_x = panel.width / 3 * 2
125+ stop_x = border.width / 3 * 2
125− start_y = stop_y = panel.globalRect.y + panel.height / 2
126+ start_y = stop_y = border.globalRect.y + border.height / 2
126 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
127 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
127 self.dash_content_list.currentIndex.wait_for(original_index - 1)
128 self.dash_content_list.currentIndex.wait_for(original_index - 1)
128− panel.opened.wait_for(False)
129
129
130 @autopilot_logging.log_action(logger.info)
130 @autopilot_logging.log_action(logger.info)
131 def _scroll_to_right_scope(self):
131 def _scroll_to_right_scope(self):
132 original_index = self.dash_content_list.currentIndex
132 original_index = self.dash_content_list.currentIndex
133− # Scroll on the dash bar panel, because some scopes have contents that
133+ # Scroll on the border of the page header panel, because some scopes
134− # can be scrolled horizontally.
134+ # have contents that can be scrolled horizontally.
135− panel = self.select_single('DashBar').select_single('Panel')
135+ page_header = self.select_single('PageHeader')
136+ border = page_header.select_single('QQuickBorderImage')
136− start_x = panel.width / 3 * 2
137+ start_x = border.width / 3 * 2
137− stop_x = panel.width / 3
138+ stop_x = border.width / 3
138− start_y = stop_y = panel.globalRect.y + panel.height / 2
139+ start_y = stop_y = border.globalRect.y + border.height / 2
139 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
140 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
140 self.dash_content_list.currentIndex.wait_for(original_index + 1)
141 self.dash_content_list.currentIndex.wait_for(original_index + 1)
141− panel.opened.wait_for(False)
142
142
143
143
144class GenericScopeView(emulators.UnityEmulatorBase):
144class GenericScopeView(emulators.UnityEmulatorBase):