Status: Accepted
Owner:
[hidden email]
CC:
[hidden email]
Labels: Type-Bug Importance-High
New issue 5010 by
[hidden email]: Testing GUI widgets
http://code.google.com/p/pharo/issues/detail?id=5010One problem I faced several times is that GUI are not uniformly managed:
some GUI widgets use of exceptions (which is cool), some other are blocking
the currently thread (which is not cool). For example, I can write:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| t |
[self inform: 'blah'] on: Exception do: [:ex | t := ex ].
self assert: t messageText = 'blah'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Other cool tests:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
testSupplyAnswerOfFillInTheBlank
self should: ['blue' = ([UIManager default request: 'Your favorite color?']
valueSupplyingAnswer: #('Your favorite color?' 'blue'))]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
However, not all widgets can be tested that way, which is quite
problematic. For example, the following code opens a window, which is not
one would expect:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
self should: ['/tmp' = ([UIManager default chooseDirectory]
valueSupplyingAnswer: #('/tmp'))]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I am not sure how easy is to solve this problem, but this is something we
need to work on. This is important
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker