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
1=== modified file 'app/ui/LocationsPage.qml'
2--- app/ui/LocationsPage.qml 2015-10-18 15:50:03 +0000
3+++ app/ui/LocationsPage.qml 2015-10-22 13:04:40 +0000
4@@ -66,7 +66,7 @@
5 anchors {
6 fill: parent
7 // TODO: Fix this offset
8- topMargin: -locationsPage.header.height
9+ topMargin: locationsPage.header ? -locationsPage.header.height : 0
10 }
11 model: ListModel {
12 id: locationsModel
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2015-10-21 02:16:50 +0000
16+++ debian/changelog 2015-10-22 13:04:40 +0000
17@@ -58,6 +58,7 @@
18 * Add support for OWM API keys (LP: #1505848)
19 * Add autopilot test for expanding the today info
20 * Implement extra info expandable for today info (LP: #1496422, LP: #1478255)
21+ * Fix for autopilot tests not using custom back button and for possible flaky test due to expandHeight changing dynamically
22
23 [ Carla Sella ]
24 * Create autopilot test which shows the day delegate (LP: #1452491)
25
26=== modified file 'po/com.ubuntu.weather.pot'
27--- po/com.ubuntu.weather.pot 2015-10-15 10:39:42 +0000
28+++ po/com.ubuntu.weather.pot 2015-10-22 13:04:40 +0000
29@@ -8,7 +8,7 @@
30 msgstr ""
31 "Project-Id-Version: ubuntu-weather-app\n"
32 "Report-Msgid-Bugs-To: \n"
33-"POT-Creation-Date: 2015-10-15 11:39+0100\n"
34+"POT-Creation-Date: 2015-10-22 13:33+0100\n"
35 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
36 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
37 "Language-Team: LANGUAGE <LL@li.org>\n"
38@@ -130,7 +130,7 @@
39 msgid "Locations"
40 msgstr ""
41
42-#: ../app/ui/LocationsPage.qml:106
43+#: ../app/ui/LocationsPage.qml:109
44 msgid "Current Location"
45 msgstr ""
46
47
48=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
49--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-10-15 14:12:37 +0000
50+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-10-22 13:04:40 +0000
51@@ -237,6 +237,9 @@
52 def click_add_location_action(self):
53 self.main_view.get_header().click_action_button("addLocation")
54
55+ def click_back(self):
56+ return self.main_view.get_header().click_custom_back_button()
57+
58 @click_object
59 def click_location(self, index):
60 return self.get_location(index)
61
62=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_home_page.py'
63--- tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-09-29 15:21:55 +0000
64+++ tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-10-22 13:04:40 +0000
65@@ -51,7 +51,9 @@
66 day_delegate = location_pane.get_day_delegate(day)
67
68 # Wait for the height of the delegate to grow
69- day_delegate.height.wait_for(day_delegate.expandedHeight)
70+ # Re-get the delegate in the wait as the expandedHeight changes
71+ day_delegate.height.wait_for(
72+ location_pane.get_day_delegate(day).expandedHeight)
73
74 # Check that the state and height of the delegate have changed
75 self.assertThat(day_delegate.state, Eventually(Equals("expanded")))
76@@ -74,7 +76,9 @@
77 home_temp_info = location_pane.get_home_temp_info()
78
79 # Wait for the height of the HomeTempInfo to grow
80- home_temp_info.height.wait_for(home_temp_info.expandedHeight)
81+ # Re-get the home temp info in the wait as the expandedHeight changes
82+ home_temp_info.height.wait_for(
83+ location_pane.get_home_temp_info().expandedHeight)
84
85 # Check that the state and height of the HomeTempInfo have changed
86 self.assertThat(home_temp_info.state, Eventually(Equals("expanded")))

Subscribers

People subscribed via source and target branches

to all changes: