assertj / assertj/assertj-swing
Add the ability to tell the framework to watch for unexpected dialogs (issue 203)
- Dominant language
- Java
- Stars
- 121
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
_Issue by **[Alex Ruiz](http://jira.codehaus.org/secure/ViewProfile.jspa?name=alexruiz)** from Tue, 3 Mar 2009 19:54:47 -0600_
_Originally opened as http://jira.codehaus.org/browse/FEST-35_
---
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 report: Issue 203 (Google Code)
---
votes (original issue): 2
watches (original issue): 2
Contributor guide
Assessment
This issue has not been assessed yet.