2
gnome module contains the definition of the test suites used for gnome
6
from .main import SingleApplicationTestSuite
7
from ..application.gnome import Application, Seahorse, GEdit
9
class SeahorseTestSuite(SingleApplicationTestSuite):
11
Default test suite for Seahorse
13
APPLICATION_FACTORY = Seahorse
15
self.application.open()
18
self.application.close()
21
#TODO: it should delete all the "My Personal Keys"
25
class GEditTestSuite(SingleApplicationTestSuite):
27
Default test suite for GEdit
29
APPLICATION_FACTORY = GEdit
31
self.application.open()
34
self.application.close()
37
# Exit using the Quit menu
40
gedit = ooldtp.context(self.application.name)
41
quit_menu = gedit.getchild(self.application.MNU_CLOSE)
42
except ldtp.LdtpExecutionError:
43
raise ldtp.LdtpExecutionError, "The quit menu was not found."
44
quit_menu.selectmenuitem()
45
except ldtp.LdtpExecutionError:
46
raise ldtp.LdtpExecutionError, "Mmm, something went wrong when closing the application."
48
result = ldtp.waittillguiexist(self.application.QUESTION_DLG,
52
question_dialog = ooldtp.context(self.application.QUESTION_DLG)
53
question_dlg_btn_close = question_dialog.getchild(self.application.QUESTION_DLG_BTN_CLOSE)
54
question_dlg_btn_close.click()
57
gedit = ooldtp.context(self.application.name)
58
new_menu = gedit.getchild(self.application.MNU_NEW)
59
except ldtp.LdtpExecutionError:
60
raise ldtp.LdtpExecutionError, "The new menu was not found."
61
new_menu.selectmenuitem()
63
result = ldtp.waittillguiexist(
64
self.application.name, self.application.TXT_FIELD)
66
raise ldtp.LdtpExecutionError, "Failed to set up new document."