Debian Codegraph @

tests/autopilot/lomiri_gallery_app/emulators/albums_view.py

raw symbols SCIP
1 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2 # Copyright 2013 Canonical Ltd.
3 #
4 # This program is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License version 3, as published
6 # by the Free Software Foundation.
7
8 from lomiri_gallery_app.emulators.gallery_utils import GalleryUtils
9
10
11 class AlbumsView(GalleryUtils):
12
13 def __init__(self, app):
14 self.app = app
15
16 def get_albums_tab_button(self):
17 """Returns the photos tab."""
18 return self.app.select_single("AbstractButton", buttonIndex=0)
19
20 def number_of_albums_in_albums_view(self):
21 """Returns the number of albums shown in albums overview"""
22 albums = self.app.select_many("CheckerboardDelegate",
23 objectName="checkerboardDelegate")
24 return len(albums)