Code review comment for lp:~fboucault/music-app/startup_time

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Running this against autopilot on my device I get many failures related to any test that change the tab, this is one of the failures [1].

It appears that it is failing because it tried to check self.autoClose [2] *after* clicking the action, which then fails because the tab has changed and the one autopilot is looking at has been unloaded.

Either, we need to write our own helper, or we could capture StateNotFoundError errors in our switch_to_tab_wrapper() and assume that the next part of the text will fail/check we are in the right place. (Which most do as in the get_songs_page() case it then tried to get the Page, so it would fail then).

So probably the best solution for now is putting a try catch in the switch_to_tab_wrapper() [3].

1 - http://pastebin.ubuntu.com/23374367/
2 - http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py#L108
3 - http://bazaar.launchpad.net/~fboucault/music-app/startup_time/view/head:/tests/autopilot/music_app/__init__.py#L483

review: Needs Fixing

« Back to merge proposal