Merge lp:~ahayzen/ubuntu-weather-app/reboot-1452497-add-location-from-empty-state into lp:ubuntu-weather-app

Proposed by Andrew Hayzen on 2015-07-27
Status: Rejected
Rejected by: Andrew Hayzen on 2015-07-29
Proposed branch: lp:~ahayzen/ubuntu-weather-app/reboot-1452497-add-location-from-empty-state
Merge into: lp:ubuntu-weather-app
Diff against target: 74 lines (+31/-0)
4 files modified
app/ui/AddLocationPage.qml (+1/-0)
debian/changelog (+1/-0)
tests/autopilot/ubuntu_weather_app/__init__.py (+5/-0)
tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py (+24/-0)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/reboot-1452497-add-location-from-empty-state
Reviewer Review Type Date Requested Status
Andrew Hayzen Disapprove on 2015-07-29
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-07-27
Review via email: mp+266050@code.launchpad.net

Commit message

* Add autopilot test which adds a location from empty state page via cached location list

Description of the change

* Add autopilot test which adds a location from empty state page via cached location list

This tests that you can add a location from the empty state page via selecting the add button and then using the pre cached location list.

To post a comment you must log in.
Victor Thompson (vthompson) wrote :

I want to hold on merging this until we decide how to do the empty state action, per my comment on your other mp [1].

1 - https://code.launchpad.net/~ahayzen/ubuntu-weather-app/reboot-fix-no-settings-button-empty-state/+merge/266044/comments/667747

Andrew Hayzen (ahayzen) wrote :

Going to abandon this as the tests are moving into their own branch with [2] and they are very similar so I'm going to fold the changes into that branch.

2 - lp:~ahayzen/ubuntu-weather-app/reboot-1452497-add-location-from-home

review: Disapprove

Unmerged revisions

73. By Andrew Hayzen on 2015-07-27

* Alphabetical OCD

72. By Andrew Hayzen on 2015-07-27

* Add autopilot test which adds a location from empty state page via cached location list

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/ui/AddLocationPage.qml'
--- app/ui/AddLocationPage.qml 2015-06-28 23:37:10 +0000
+++ app/ui/AddLocationPage.qml 2015-07-27 23:14:15 +0000
@@ -206,6 +206,7 @@
206206
207 delegate: ListItem {207 delegate: ListItem {
208 divider.visible: false208 divider.visible: false
209 objectName: "addLocation" + index
209 Column {210 Column {
210 anchors {211 anchors {
211 left: parent.left212 left: parent.left
212213
=== modified file 'debian/changelog'
--- debian/changelog 2015-07-26 15:24:27 +0000
+++ debian/changelog 2015-07-27 23:14:15 +0000
@@ -12,6 +12,7 @@
12 * Add mocked locations for autopilot and add a test using the data12 * Add mocked locations for autopilot and add a test using the data
13 * Add setting to disable auto detecting location13 * Add setting to disable auto detecting location
14 * When running under autopilot do not auto detect location14 * When running under autopilot do not auto detect location
15 * Add autopilot test which adds a location from empty state page via cached location list
1516
16 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -050017 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -0500
1718
1819
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-07-23 00:36:06 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-07-27 23:14:15 +0000
@@ -62,6 +62,11 @@
62 def __init__(self, *args):62 def __init__(self, *args):
63 super(AddLocationPage, self).__init__(*args)63 super(AddLocationPage, self).__init__(*args)
6464
65 @click_object
66 def click_location(self, index):
67 return self.select_single("UCListItem",
68 objectName="addLocation" + str(index))
69
6570
66class HomePage(Page):71class HomePage(Page):
67 """Autopilot helper for HomePage."""72 """Autopilot helper for HomePage."""
6873
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py 2015-07-18 19:08:21 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py 2015-07-27 23:14:15 +0000
@@ -24,6 +24,30 @@
24 def setUp(self):24 def setUp(self):
25 super(TestEmptyState, self).setUp()25 super(TestEmptyState, self).setUp()
2626
27 def test_add_location(self):
28 """ tests adding a location via the button and selecting a cached
29 location """
30
31 # Get the start count of the homepage
32 home_page = self.app.get_home_page()
33 start_count = home_page.get_location_count()
34
35 # Open the locations page
36 self.app.click_add_location_button()
37
38 add_location_page = self.app.get_add_location_page()
39 add_location_page.visible.wait_for(True)
40
41 # Select the location
42 add_location_page.click_location(0)
43
44 # Check that the location was added
45 self.assertThat(home_page.get_location_count,
46 Eventually(Equals(start_count + 1)))
47
48 # Check homepage is now visible
49 self.assertThat(home_page.visible, Eventually(Equals(True)))
50
27 def test_add_location_button(self):51 def test_add_location_button(self):
28 """ tests that the add location page is shown after the Add Location52 """ tests that the add location page is shown after the Add Location
29 button is clicked """53 button is clicked """

Subscribers

People subscribed via source and target branches

to all changes: