@@ -16,6 +16,7 @@
1616# You should have received a copy of the GNU General Public License
1717# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818#
19+from unity8.shell.emulators.dash import ListViewWithPageHeader
1920
2021"""Tests for the Dash autopilot emulators.
2122
@@ -182,9 +183,18 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
182183
183184 def test_get_applications_should_return_correct_applications(self):
184185 category = '2'
186+ category_element = self.applications_scope._get_category_element(
187+ category)
188+ list_view = self.dash.get_scope('clickscope')\
189+ .select_single(ListViewWithPageHeader)
185190 expected_apps_count = self._get_number_of_application_slots(category)
186191 expected_applications = self.available_applications[
187192 :expected_apps_count]
193+ x_center = list_view.globalRect.x + list_view.width / 2
194+ y_center = list_view.globalRect.y + list_view.height / 2
195+ y_diff = category_element.y - list_view.height + category_element.height
196+ list_view._slow_drag(x_center, x_center,
197+ y_center, y_center - y_diff)
188198 applications = self.applications_scope.get_applications(category)
189199 self.assertEqual(expected_applications, applications)
190200