~vthompson/ubuntu-weather-app/fix-1452499

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py

* Create autopilot test which adds a location via searching
* Create autopilot test which adds a location via cached results
* Fix for racy search bar causing incorrect search query when typed quickly. Fixes: https://bugs.launchpad.net/bugs/1452497.

Approved by Victor Thompson, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    def setUp(self):
25
25
        super(TestEmptyState, self).setUp()
26
26
 
27
 
    def test_add_location_button(self):
 
27
    def test_add_locations_page_from_bottom_edge(self):
28
28
        """ tests that the add location page is shown after swiping up
29
29
            the bottom edge"""
30
30
 
31
31
        home_page = self.app.get_home_page()
32
32
        home_page.visible.wait_for(True)
 
33
 
 
34
        # Check that there are no locations
 
35
        self.assertThat(home_page.get_location_count, Eventually(Equals(0)))
 
36
 
33
37
        home_page.reveal_bottom_edge_page()
34
38
 
35
39
        locations_page = self.app.get_locations_page()