@@ -1,7 +1,7 @@
11# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
22#
33# Unity Autopilot Test Suite
4−# Copyright (C) 2012, 2013, 2014 Canonical
4+# Copyright (C) 2012, 2013, 2014, 2015 Canonical
55#
66# This program is free software: you can redistribute it and/or modify
77# it under the terms of the GNU General Public License as published by
@@ -19,14 +19,12 @@
1919
2020import logging
2121
22−import ubuntuuitoolkit
2322from autopilot import logging as autopilot_logging
2423from autopilot import input
2524
2625from unity8.shell import emulators
2726from unity8.shell.emulators.greeter import Greeter
2827from unity8.shell.emulators.launcher import Launcher
29−import unity8.indicators
3028
3129logger = logging.getLogger(__name__)
3230
@@ -90,6 +88,16 @@ class QQuickView(emulators.UnityEmulatorBase):
9088 self.wait_select_single('IndicatorsMenu', fullyOpened=True)
9189 return self._get_indicator_page(indicator_name)
9290
91+ @autopilot_logging.log_action(logger.info)
92+ def close_indicator_page(self):
93+ """Swipe to close the opened indicator, wait until it's closed."""
94+ indicators_menu = self.wait_select_single('IndicatorsMenu')
95+ end_x, end_y = input.get_center_point(indicators_menu)
96+ start_x = end_x
97+ start_y = self.height
98+ self.pointing_device.drag(start_x, start_y, end_x, end_y)
99+ indicators_menu.fullyClosed.wait_for(True)
100+
93101 @autopilot_logging.log_action(logger.info)
94102 def show_dash_swiping(self):
95103 """Show the dash swiping from the left."""