Merge lp:~vthompson/ubuntu-weather-app/fix-1452498 into lp:ubuntu-weather-app

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 88
Merged at revision: 93
Proposed branch: lp:~vthompson/ubuntu-weather-app/fix-1452498
Merge into: lp:ubuntu-weather-app
Diff against target: 61 lines (+23/-2)
3 files modified
debian/changelog (+3/-0)
tests/autopilot/ubuntu_weather_app/__init__.py (+4/-2)
tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py (+16/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/fix-1452498
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+267421@code.launchpad.net

Commit message

* Create autopilot test which cancels adding a location
* Make the tests grab the top of the minimized bottom edge hint to avoid resizing the app

Description of the change

* Create autopilot test which cancels adding a location
* Make the tests grab the top of the minimized bottom edge hint to avoid resizing the app

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Looking good so far, 1 inline comment

review: Needs Fixing
86. By Victor Thompson

Merge of reboot and resolve conflicts

87. By Victor Thompson

Create click_back() method

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

One inline comment from a bad merge conflict resolution, otherwise looking good.

review: Needs Fixing
88. By Victor Thompson

Fix conflict resolution

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

LGTM :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-08-09 16:51:36 +0000
3+++ debian/changelog 2015-08-12 00:11:49 +0000
4@@ -14,6 +14,9 @@
5 * Create autopilot test which removes a single location (LP: #1452499)
6 * Remove C++ flag from CMakeLists.txt
7 * Show README files in QtCreator
8+ * Create autopilot test which cancels adding a location (LP: #1452498)
9+ * Make the tests grab the top of the minimized tooltip to avoid resizing the
10+ app
11
12 [ Andrew Hayzen ]
13 * Add mocked locations for autopilot and add a test using the data
14
15=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
16--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-09 16:51:36 +0000
17+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-12 00:11:49 +0000
18@@ -78,8 +78,7 @@
19 action_item.visible.wait_for(True)
20 start_x = (action_item.globalRect.x +
21 (action_item.globalRect.width * 0.5))
22- start_y = (action_item.globalRect.y +
23- (action_item.height * 0.5))
24+ start_y = action_item.globalRect.y
25 stop_y = start_y - (self.height * 0.7)
26 self.pointing_device.drag(start_x, start_y,
27 start_x, stop_y, rate=2)
28@@ -94,6 +93,9 @@
29 def __init__(self, *args, **kwargs):
30 super(AddLocationPage, self).__init__(*args, **kwargs)
31
32+ def click_back(self):
33+ self.main_view.get_header().click_custom_back_button()
34+
35 @click_object
36 def click_location(self, index):
37 return self.select_single("UCListItem",
38
39=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py'
40--- tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py 2015-07-29 22:14:02 +0000
41+++ tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py 2015-08-12 00:11:49 +0000
42@@ -98,3 +98,19 @@
43 # Check that the location was added
44 self.assertThat(self.home_page.get_location_count,
45 Eventually(Equals(self.start_count + 1)))
46+
47+ def test_cancel_add_location(self):
48+ """ tests tapping the back button in the add location page """
49+
50+ # Go back to the locations page
51+ self.add_location_page.click_back()
52+
53+ # Go back to the homepage
54+ self.locations_page.click_back()
55+
56+ # Check homepage is now visible
57+ self.assertThat(self.home_page.visible, Eventually(Equals(True)))
58+
59+ # Check that the location count did not change
60+ self.assertThat(self.home_page.get_location_count,
61+ Eventually(Equals(self.start_count)))

Subscribers

People subscribed via source and target branches

to all changes: