benjamin84 / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Add the ability to tell the framework to watch for unexpected dialogs #203

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Issue:
Some applications popup dialogs when there is an error, warning or to 
prompt the user.  It will clutter up the test code to have to check for 
the presence of one or more test dialogs after each action that could 
generate such a dialog.

Possible Solution:
It would be nice if the test could register a handler to do some action 
when a dialog pops up.  One action would be to fail the test - so treat 
the presense of the dialog like an unexpected exception.

Within FEST there would be some mechanism which watches for dialogs to 
popup.  When a dialog pops up, it could scan a list of registered handlers 
for dialogs.  If any of the handlers are defined for the dialog that pops 
up, a method that the test defines could be executed.  A default handler 
could be defined to fail a test if the defined dialog is detected.

Note that there will likely be scenarios where the dialog will be expected 
and handled in the test.  So there also needs to be the ability to disable 
the handler and potentially turn it back on.

Original issue reported on code.google.com by jbenton%...@gtempaccount.com on 5 Sep 2008 at 3:26