Merge lp:~ahayzen/ubuntu-weather-app/fix-ap-tests-001 into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 149
Merged at revision: 149
Proposed branch: lp:~ahayzen/ubuntu-weather-app/fix-ap-tests-001
Merge into: lp:ubuntu-weather-app
Diff against target: 86 lines (+13/-5)
5 files modified
app/ui/LocationsPage.qml (+1/-1)
debian/changelog (+1/-0)
po/com.ubuntu.weather.pot (+2/-2)
tests/autopilot/ubuntu_weather_app/__init__.py (+3/-0)
tests/autopilot/ubuntu_weather_app/tests/test_home_page.py (+6/-2)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/fix-ap-tests-001
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Review via email: mp+275335@code.launchpad.net

Commit message

* Fix for autopilot tests not using custom back button
* Fix for possible flaky test due to expandHeight changing dynamically
* Fix for null errors as header is undefined

Description of the change

* Fix for autopilot tests not using custom back button
* Fix for possible flaky test due to expandHeight changing dynamically
* Fix for null errors as header is undefined

To post a comment you must log in.
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

LGTM!

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/ui/LocationsPage.qml'
--- app/ui/LocationsPage.qml 2015-10-18 15:50:03 +0000
+++ app/ui/LocationsPage.qml 2015-10-22 13:04:40 +0000
@@ -66,7 +66,7 @@
66 anchors {66 anchors {
67 fill: parent67 fill: parent
68 // TODO: Fix this offset68 // TODO: Fix this offset
69 topMargin: -locationsPage.header.height69 topMargin: locationsPage.header ? -locationsPage.header.height : 0
70 }70 }
71 model: ListModel {71 model: ListModel {
72 id: locationsModel72 id: locationsModel
7373
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-21 02:16:50 +0000
+++ debian/changelog 2015-10-22 13:04:40 +0000
@@ -58,6 +58,7 @@
58 * Add support for OWM API keys (LP: #1505848)58 * Add support for OWM API keys (LP: #1505848)
59 * Add autopilot test for expanding the today info59 * Add autopilot test for expanding the today info
60 * Implement extra info expandable for today info (LP: #1496422, LP: #1478255)60 * Implement extra info expandable for today info (LP: #1496422, LP: #1478255)
61 * Fix for autopilot tests not using custom back button and for possible flaky test due to expandHeight changing dynamically
6162
62 [ Carla Sella ]63 [ Carla Sella ]
63 * Create autopilot test which shows the day delegate (LP: #1452491)64 * Create autopilot test which shows the day delegate (LP: #1452491)
6465
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-10-15 10:39:42 +0000
+++ po/com.ubuntu.weather.pot 2015-10-22 13:04:40 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: ubuntu-weather-app\n"9"Project-Id-Version: ubuntu-weather-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-10-15 11:39+0100\n"11"POT-Creation-Date: 2015-10-22 13:33+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -130,7 +130,7 @@
130msgid "Locations"130msgid "Locations"
131msgstr ""131msgstr ""
132132
133#: ../app/ui/LocationsPage.qml:106133#: ../app/ui/LocationsPage.qml:109
134msgid "Current Location"134msgid "Current Location"
135msgstr ""135msgstr ""
136136
137137
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-10-15 14:12:37 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-10-22 13:04:40 +0000
@@ -237,6 +237,9 @@
237 def click_add_location_action(self):237 def click_add_location_action(self):
238 self.main_view.get_header().click_action_button("addLocation")238 self.main_view.get_header().click_action_button("addLocation")
239239
240 def click_back(self):
241 return self.main_view.get_header().click_custom_back_button()
242
240 @click_object243 @click_object
241 def click_location(self, index):244 def click_location(self, index):
242 return self.get_location(index)245 return self.get_location(index)
243246
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_home_page.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-09-29 15:21:55 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-10-22 13:04:40 +0000
@@ -51,7 +51,9 @@
51 day_delegate = location_pane.get_day_delegate(day)51 day_delegate = location_pane.get_day_delegate(day)
5252
53 # Wait for the height of the delegate to grow53 # Wait for the height of the delegate to grow
54 day_delegate.height.wait_for(day_delegate.expandedHeight)54 # Re-get the delegate in the wait as the expandedHeight changes
55 day_delegate.height.wait_for(
56 location_pane.get_day_delegate(day).expandedHeight)
5557
56 # Check that the state and height of the delegate have changed58 # Check that the state and height of the delegate have changed
57 self.assertThat(day_delegate.state, Eventually(Equals("expanded")))59 self.assertThat(day_delegate.state, Eventually(Equals("expanded")))
@@ -74,7 +76,9 @@
74 home_temp_info = location_pane.get_home_temp_info()76 home_temp_info = location_pane.get_home_temp_info()
7577
76 # Wait for the height of the HomeTempInfo to grow78 # Wait for the height of the HomeTempInfo to grow
77 home_temp_info.height.wait_for(home_temp_info.expandedHeight)79 # Re-get the home temp info in the wait as the expandedHeight changes
80 home_temp_info.height.wait_for(
81 location_pane.get_home_temp_info().expandedHeight)
7882
79 # Check that the state and height of the HomeTempInfo have changed83 # Check that the state and height of the HomeTempInfo have changed
80 self.assertThat(home_temp_info.state, Eventually(Equals("expanded")))84 self.assertThat(home_temp_info.state, Eventually(Equals("expanded")))

Subscribers

People subscribed via source and target branches

to all changes: