ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04094
[Merge] lp:~vthompson/ubuntu-weather-app/fix-1452498 into lp:ubuntu-weather-app/reboot
Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/fix-1452498 into lp:ubuntu-weather-app/reboot.
Commit message:
* Create autopilot test which cancels adding a location
* Make the tests grab the top of the minimized tooltip to avoid resizing the app
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/fix-1452498/+merge/267421
* Create autopilot test which cancels adding a location
* Make the tests grab the top of the minimized tooltip to avoid resizing the app
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/fix-1452498 into lp:ubuntu-weather-app/reboot.
=== modified file 'debian/changelog'
--- debian/changelog 2015-08-07 01:22:44 +0000
+++ debian/changelog 2015-08-07 21:53:24 +0000
@@ -11,6 +11,9 @@
* Fix the CMakeLists.txt to include the app icon
* Rename EmptyStateComponent to HomePageEmptyStateComponent
* Add a LocationsPageEmptyStateComponent
+ * Create autopilot test which cancels adding a location (LP: #1452498)
+ * Make the tests grab the top of the minimized tooltip to avoid resizing the
+ app
[ Andrew Hayzen ]
* Add mocked locations for autopilot and add a test using the data
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-06 00:10:53 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-08-07 21:53:24 +0000
@@ -78,8 +78,7 @@
action_item.visible.wait_for(True)
start_x = (action_item.globalRect.x +
(action_item.globalRect.width * 0.5))
- start_y = (action_item.globalRect.y +
- (action_item.height * 0.5))
+ start_y = action_item.globalRect.y
stop_y = start_y - (self.height * 0.7)
self.pointing_device.drag(start_x, start_y,
start_x, stop_y, rate=2)
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py 2015-07-29 22:14:02 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_add_location_page.py 2015-08-07 21:53:24 +0000
@@ -98,3 +98,19 @@
# Check that the location was added
self.assertThat(self.home_page.get_location_count,
Eventually(Equals(self.start_count + 1)))
+
+ def test_cancel_add_location(self):
+ """ tests tapping the back button in the add location page """
+
+ # Go back to the locations page
+ self.app.main_view.get_header().click_custom_back_button()
+
+ # Go back to the homepage
+ self.locations_page.click_back()
+
+ # Check homepage is now visible
+ self.assertThat(self.home_page.visible, Eventually(Equals(True)))
+
+ # Check that the location count did not change
+ self.assertThat(self.home_page.get_location_count,
+ Eventually(Equals(self.start_count)))
Follow ups