Debian Codegraph @

tests/autopilot/lomiri_gallery_app/emulators/media_viewer.py

raw
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 lomiriuitoolkit import emulators as toolkit_emulators
9
10
11 class MediaViewer(toolkit_emulators.LomiriUIToolkitEmulatorBase):
12 """A class that makes it easy to interact with the media viewer"""
13
14 def get_edit_spinner(self):
15 return self.select_single(
16 "ActivityIndicator",
17 objectName="busySpinner"
18 )
19
20 def ensure_spinner_not_running(self):
21 """Wait for spinner to stop running"""
22 spinner = self.get_edit_spinner()
23 spinner.running.wait_for(False)