Merge lp:~rpadovani/ubuntu-weather-app/1201705 into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Riccardo Padovani
Status: Merged
Approved by: Martin Borho
Approved revision: 65
Merged at revision: 65
Proposed branch: lp:~rpadovani/ubuntu-weather-app/1201705
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 39 lines (+18/-0)
2 files modified
components/AddLocationPage.qml (+1/-0)
tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py (+17/-0)
To merge this branch: bzr merge lp:~rpadovani/ubuntu-weather-app/1201705
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Martin Borho Approve
Review via email: mp+174947@code.launchpad.net

Commit message

Added test to check if, when no result is found in search list, label error is shown

Description of the change

Added test to check if, when no result is found in search list, label error is shown

To post a comment you must log in.
Revision history for this message
Martin Borho (martin-borho) wrote :

Fine and fast. Never heard of that city, too! ;)

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/AddLocationPage.qml'
--- components/AddLocationPage.qml 2013-07-13 13:34:34 +0000
+++ components/AddLocationPage.qml 2013-07-16 08:30:37 +0000
@@ -81,6 +81,7 @@
81 color: "transparent"81 color: "transparent"
82 Label {82 Label {
83 id: noCityError83 id: noCityError
84 objectName: "noCityError"
84 visible: false85 visible: false
85 anchors.centerIn: parent;86 anchors.centerIn: parent;
86 font.pixelSize: 1887 font.pixelSize: 18
8788
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-07-03 19:41:03 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-07-16 08:30:37 +0000
@@ -103,6 +103,23 @@
103 locationList = self.main_window.get_object('QQuickListView', 'LocationList')103 locationList = self.main_window.get_object('QQuickListView', 'LocationList')
104 self.assertThat(locationList.visible, Eventually(Equals(True)))104 self.assertThat(locationList.visible, Eventually(Equals(True)))
105105
106 def test_no_location_found(self):
107 """Tests if label with 'No city found' is shown """
108 self._open_add_location_page()
109
110 # insert city name to search for
111 searchField = self.main_window.get_object("TextField", "SearchField")
112 self.pointing_device.move_to_object(searchField)
113 self.pointing_device.click()
114 self.keyboard.type("UbuntuCity") # Unfortunately, no UbuntuCity in the world
115 self.assertThat(searchField.text, Eventually(Equals("UbuntuCity")))
116 self.keyboard.press_and_release('Enter')
117
118 # wait for result and look if label is shown
119 errorLabel = self.main_window.get_object('Label', 'noCityError')
120 self.assertThat(errorLabel.visible, Eventually(Equals(True), timeout=30))
121
122
106class TestLocationManagerWithLocation(WeatherTestCase, DatabaseMixin):123class TestLocationManagerWithLocation(WeatherTestCase, DatabaseMixin):
107 def setUp(self):124 def setUp(self):
108 self.clean_db()125 self.clean_db()

Subscribers

People subscribed via source and target branches