ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04952
[Merge] lp:~nskaggs/ubuntu-clock-app/fix-ap-mainview into lp:ubuntu-clock-app
Nicholas Skaggs has proposed merging lp:~nskaggs/ubuntu-clock-app/fix-ap-mainview into lp:ubuntu-clock-app.
Commit message:
Fix Mainview12 issue
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
Bug #1490205 in Ubuntu Clock App: "[Autopilot] Fix failing autopilot tests due to MainView12"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1490205
For more details, see:
https://code.launchpad.net/~nskaggs/ubuntu-clock-app/fix-ap-mainview/+merge/271029
Probably should at least land this change so anyone can work off of it.
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~nskaggs/ubuntu-clock-app/fix-ap-mainview into lp:ubuntu-clock-app.
=== modified file 'app/ubuntu-clock-app.qml'
--- app/ubuntu-clock-app.qml 2015-08-26 23:35:50 +0000
+++ app/ubuntu-clock-app.qml 2015-09-14 20:48:06 +0000
@@ -30,7 +30,7 @@
property bool applicationState: Qt.application.active
// objectName for functional testing purposes (autopilot-qt5)
- objectName: "clock"
+ objectName: "clockMainView"
// applicationName for click packages (used as an unique app identifier)
applicationName: "com.ubuntu.clock"
=== modified file 'tests/autopilot/ubuntu_clock_app/__init__.py'
--- tests/autopilot/ubuntu_clock_app/__init__.py 2015-06-17 21:03:43 +0000
+++ tests/autopilot/ubuntu_clock_app/__init__.py 2015-09-14 20:48:06 +0000
@@ -22,6 +22,16 @@
from autopilot.introspection import dbus
from testtools.matchers import GreaterThan
+
+from autopilot import introspection
+
+from ubuntuuitoolkit._custom_proxy_objects import (
+ _common,
+ popups,
+ _tabs,
+ _toolbar,
+)
+
from ubuntuuitoolkit import pickers
import ubuntuuitoolkit
@@ -49,6 +59,11 @@
class MainView(ubuntuuitoolkit.MainView):
+ # bug 1341671 means AP sees this as MainView12
+ @classmethod
+ def get_type_query_name(cls):
+ return 'MainView12'
+
@autopilot_logging.log_action(logger.info)
def open_clock(self):
"""Open the Clock Page.
@@ -68,7 +83,7 @@
clockPage = self.open_clock()
clockPage.reveal_bottom_edge_page()
self.get_header().visible.wait_for(True)
- return self.wait_select_single(Page11)
+ return self.wait_select_single(AlarmPage)
def get_AlarmList(self):
""" Get the AlarmList object. """
@@ -92,11 +107,12 @@
self.main_view = self.get_root_instance().select_single(MainView)
-class PageWithBottomEdge(MainView):
+class PageWithBottomEdge(Page):
"""
An emulator class that makes it easy to interact with the bottom edge
swipe page
"""
+
def __init__(self, *args):
super(PageWithBottomEdge, self).__init__(*args)
@@ -191,7 +207,7 @@
self.pointing_device.click_object(deleteButton)
-class Page11(Page):
+class AlarmPage(Page):
"""Autopilot helper for the Alarm page."""
@autopilot_logging.log_action(logger.info)
=== modified file 'tests/autopilot/ubuntu_clock_app/fixture_setup.py'
--- tests/autopilot/ubuntu_clock_app/fixture_setup.py 2015-08-14 05:34:49 +0000
+++ tests/autopilot/ubuntu_clock_app/fixture_setup.py 2015-09-14 20:48:06 +0000
@@ -25,8 +25,8 @@
def setUp(self):
super(LocationServiceTestEnvironment, self).setUp()
- self._set_location_service_testing(True)
- self.addCleanup(self._set_location_service_testing, False)
+ #self._set_location_service_testing(True)
+ #self.addCleanup(self._set_location_service_testing, False)
def _set_location_service_testing(self, test_mode):
test = 'true' if test_mode else 'false'
Follow ups