This only tests one button of the 3 new buttons. The other 2 buttons should be tested. (make sure on the remove from album and delete test that you verify the file is removed from the file system.)
The one button test you have is pretty solid and would not be a flaky test, but a couple of small changes can make it easier to maintain and troubleshoot.
def get_remove_* should be made private to _get_remove, then consumed by a click_* method. something like click_remove_from_album_button(). You can check the button becoming visible and being not shown as part of the same function
This should also be a method click_first_photo() in album_view with the @autopilot_logging.log_action(logger.info) decorator
so you can use self.album_view.click_first_photo() or better self.album_view.click_photo(path or photo name) instead of using 3 lines. That way if the toolbar goes away we won't have to delete a line from alot of tests, just the 1 line.
This only tests one button of the 3 new buttons. The other 2 buttons should be tested. (make sure on the remove from album and delete test that you verify the file is removed from the file system.)
The one button test you have is pretty solid and would not be a flaky test, but a couple of small changes can make it easier to maintain and troubleshoot.
def get_remove_* should be made private to _get_remove, then consumed by a click_* method. something like click_remove_ from_album_ button( ). You can check the button becoming visible and being not shown as part of the same function
@autopilot_ logging. log_action( logger. info) should be used as a method decorator on the click_* method(s) see example: bazaar. launchpad. net/~elopio/ ubuntu- ui-toolkit/ intermediate_ flickables/ revision/ 976/tests/ autopilot/ ubuntuuitoolkit /emulators. py
method http://
238 + photo = self.album_ view.get_ first_photo( ) view.close_ toolbar( ) item(photo)
239 + self.main_
240 + self.click_
This should also be a method click_first_photo() in album_view with the @autopilot_ logging. log_action( logger. info) decorator
so you can use self.album_ view.click_ first_photo( ) or better self.album_ view.click_ photo(path or photo name) instead of using 3 lines. That way if the toolbar goes away we won't have to delete a line from alot of tests, just the 1 line.