5
This is the "computer_janitor_gtk" module.
7
This module provides a wrapper for LDTP to make writing Computer_janitor_gtk tests easier.
12
from .main import Application
13
from ..gconfwrapper import GConf
14
from ..cmd import globals
18
gettext.install (True)
19
gettext.bindtextdomain (PACKAGE, globals.LOCALE_SHARE)
20
gettext.textdomain (PACKAGE)
21
t = gettext.translation(PACKAGE, globals.LOCALE_SHARE, fallback = True)
25
class Computer_janitor_gtk(Application):
27
computer_janitor_gtk manages the Computer_janitor_gtk application.
30
LAUNCHER = 'computer-janitor-gtk'
32
WINDOW = 'frmComputerJanitor'
34
BTN_DOSELECTEDTASKS = _('btnDoselectedtasks')
35
MNU_ABOUT = _('mnuAbout')
36
MNU_QUIT = _('mnuQuit')
39
def runAboutdialog(self):
41
This basic test simply verifies that the application launches
42
and that the UI reacts
43
The About dialog is the only menu that is always present in the UI
46
self.main_window.click(self.MNU_ABOUT)
48
# Wait for the dialog to open
49
# Name of about dialogs change with the app
52
while not ( timeout>0 and dlgAbout):
53
dlgs=[ w for w in ldtp.getwindowlist() if w.startswith('dlgAbout')]
60
raise AssertionError('About Dialog not found')
63
# Looking for a button to close the window
65
for btnClose in ('btnClose', 'btnOK', 'btnCancel'):
67
found = ldtp.getchild(dlgAbout, btnClose, 'push button')
75
ldtp.click(dlgAbout, btnClose)
79
Application.__init__(self)
80
self.main_window = ooldtp.context(self.WINDOW)