[Pharo-project] modal windows and unit tests

Alexandre Bergel alexandre at bergel.eu
Wed Oct 13 08:09:09 EDT 2010


Thanks for your answers. But the problem still persists. 
For example, the following does not open the popup:
[self inform:'No cycles' ]
 on: Notification
 do: [:ex | ]. 

The notification is captured.

However, the following opens the popup:
[StandardWindow new message:'No cycles' ]
 on: Notification
 do: [:ex | ]. 

Any idea how I can make the popup not open?

Cheers,
Alexandre

On 12 Oct 2010, at 17:42, Schwab,Wilhelm K wrote:

> First, did you open the window (as in it's the point of the test), or did Pharo open it in contradiction to your better judgment?  If the latter, what is happening?
> 
> Assuming that you have opened a modal window in a test, there are a couple of ways that I have handled such things in Dolphin.  First, if you can slightly refactor your code, you might be able to open it non-modally, which might help some; however, you really want to dismiss it as part of the test.   Regardless of modality, you probably want to store the window in a temporary variable as part of your test and then either send it a message or command to close.
> 
> I will take a quick look for something I wrote in Dolphin and reply if it looks like it might have any value.
> 
> Bill
> 
> 
> 
> ________________________________________
> From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Alexandre Bergel [alexandre at bergel.eu]
> Sent: Tuesday, October 12, 2010 3:39 PM
> To: Pharo Development
> Subject: [Pharo-project] modal windows and unit tests
> 
> Hi!
> 
> A modal window is pop up by one of my tests. Is there a way to capture this situation and simply remove the modal window?
> Apparently, no notification is raised...
> 
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.









More information about the Pharo-dev mailing list