modal windows and unit tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

modal windows and unit tests

Alexandre Bergel
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Schwab,Wilhelm K
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: [hidden email] [[hidden email]] On Behalf Of Alexandre Bergel [[hidden email]]
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

laza
In reply to this post by Alexandre Bergel
I was just looking at something similar.
I guess for modal windows that are a kind of DialogWindow something
like this should work

[UIManager default confirm: 'Got milk?']
  on: ProvideAnswerNotification
  do: [:ex | ex resume: (ex messageText = 'Got milk?')]

But which modal windows do pop up in your scenario, that do not send a
notification?

Regards,
 Alex

2010/10/12 Alexandre Bergel <[hidden email]>:

> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Schwab,Wilhelm K
In reply to this post by Alexandre Bergel
The tests I am finding in my Dolphin image create/show a presenter, do some things to it, and then use #ensure: to evaluate

  aPresenter topShell presenter exit.

after which it forces a check of the finalization queue and a GC; I probably did that out of an abundance of caution.

Bill



________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Alexandre Bergel [[hidden email]]
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Stéphane Ducasse
In reply to this post by Alexandre Bergel
I think that we will have to reconsider a lot of the infrastructure decision and the hudson server will kick us

Stef

On Oct 12, 2010, at 10:45 PM, Alexander Lazarević wrote:

> I was just looking at something similar.
> I guess for modal windows that are a kind of DialogWindow something
> like this should work
>
> [UIManager default confirm: 'Got milk?']
>  on: ProvideAnswerNotification
>  do: [:ex | ex resume: (ex messageText = 'Got milk?')]
>
> But which modal windows do pop up in your scenario, that do not send a
> notification?
>
> Regards,
> Alex
>
> 2010/10/12 Alexandre Bergel <[hidden email]>:
>> 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
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Alexandre Bergel
In reply to this post by Schwab,Wilhelm K
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: [hidden email] [[hidden email]] On Behalf Of Alexandre Bergel [[hidden email]]
> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

laza
Indeed this raises no Notification of any kind. In that case I would say replace

StandardWindow new message: 'No Cycles'.

with

UIManager default inform: 'No Cycles'.

if you can.

I guess the first expression is also just an example? Because this
just instantiates a StandardWindow to have a modal Dialog on top of
that invisible window.
From what I've seen in the system I would say that latter expression
will make the Dialog modal to the active window. If it is the case
that the Dialog should be modal to a non active window I have to pass
for now! :)

Alex

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Schwab,Wilhelm K
In reply to this post by Alexandre Bergel
I am starting to understand your problem, and I do not know how to solve it, except perhaps through design changes.  The approach I mentioned below works when the "popups" are complete dialogs that get tested (probably non-modally, just to make sure they open and do reasonable things when prodded).  I did not use things like #inform: in GUI design.  Instead, I ended up with lots of wizard-like interfaces that would trap the user until they fix any problems or cancel the attempt.

Another thing that I do (in Dolphin language) is test presenters more than dialogs.  My modal dialogs are often very simple wrappers around more complex composite presenters that can be easily opened and closed - the tests help ensure that.  Testing the dialog itself then largely reduces to making sure it opens when/where it should.

Good luck!


________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Alexandre Bergel [[hidden email]]
Sent: Wednesday, October 13, 2010 8:09 AM
To: [hidden email]
Subject: Re: [Pharo-project] modal windows and unit tests

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: [hidden email] [[hidden email]] On Behalf Of Alexandre Bergel [[hidden email]]
> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Alexandre Bergel
In reply to this post by laza
Ok, thanks Alex. I turned the usage to StandardWindow for UIManager.
I had to do exclude from the test the action that uses StandardWindow :-(

Thanks to all you!

Cheers,
Alexandre


On 13 Oct 2010, at 09:39, Alexander Lazarević wrote:

> Indeed this raises no Notification of any kind. In that case I would say replace
>
> StandardWindow new message: 'No Cycles'.
>
> with
>
> UIManager default inform: 'No Cycles'.
>
> if you can.
>
> I guess the first expression is also just an example? Because this
> just instantiates a StandardWindow to have a modal Dialog on top of
> that invisible window.
> From what I've seen in the system I would say that latter expression
> will make the Dialog modal to the active window. If it is the case
> that the Dialog should be modal to a non active window I have to pass
> for now! :)
>
> Alex
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

laza
In reply to this post by Stéphane Ducasse
There are also some basic things that would need some adjustment as I
see it. I think core or basic classes and models shouldn't make any
assumptions about the UI or even if there is an UI at all.
So things like Object inform: aString would be something I'd rather
see to disappear.
Or Class rename: aString, which kindly pops up a Dialog to inform the
"user" when there are still references in Undeclared. I think that
check should better move to the sending method in Browser renameClass,
where chances are very high that a real user initiated the rename of a
class and not some filein.

Alex

2010/10/13 Stéphane Ducasse <[hidden email]>:

> I think that we will have to reconsider a lot of the infrastructure decision and the hudson server will kick us
>
> Stef
>
> On Oct 12, 2010, at 10:45 PM, Alexander Lazarević wrote:
>
>> I was just looking at something similar.
>> I guess for modal windows that are a kind of DialogWindow something
>> like this should work
>>
>> [UIManager default confirm: 'Got milk?']
>>  on: ProvideAnswerNotification
>>  do: [:ex | ex resume: (ex messageText = 'Got milk?')]
>>
>> But which modal windows do pop up in your scenario, that do not send a
>> notification?
>>
>> Regards,
>> Alex
>>
>> 2010/10/12 Alexandre Bergel <[hidden email]>:
>>> 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
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Schwab,Wilhelm K
+1


________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Alexander Lazarević [[hidden email]]
Sent: Wednesday, October 13, 2010 9:03 AM
To: [hidden email]
Subject: Re: [Pharo-project] modal windows and unit tests

There are also some basic things that would need some adjustment as I
see it. I think core or basic classes and models shouldn't make any
assumptions about the UI or even if there is an UI at all.
So things like Object inform: aString would be something I'd rather
see to disappear.
Or Class rename: aString, which kindly pops up a Dialog to inform the
"user" when there are still references in Undeclared. I think that
check should better move to the sending method in Browser renameClass,
where chances are very high that a real user initiated the rename of a
class and not some filein.

Alex

2010/10/13 Stéphane Ducasse <[hidden email]>:

> I think that we will have to reconsider a lot of the infrastructure decision and the hudson server will kick us
>
> Stef
>
> On Oct 12, 2010, at 10:45 PM, Alexander Lazarević wrote:
>
>> I was just looking at something similar.
>> I guess for modal windows that are a kind of DialogWindow something
>> like this should work
>>
>> [UIManager default confirm: 'Got milk?']
>>  on: ProvideAnswerNotification
>>  do: [:ex | ex resume: (ex messageText = 'Got milk?')]
>>
>> But which modal windows do pop up in your scenario, that do not send a
>> notification?
>>
>> Regards,
>> Alex
>>
>> 2010/10/12 Alexandre Bergel <[hidden email]>:
>>> 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
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Alexandre Bergel
In reply to this post by laza
Agree.
Maybe this should be kept in an issue if not already.

Cheers,
Alexandre


On 13 Oct 2010, at 10:03, Alexander Lazarević wrote:

> There are also some basic things that would need some adjustment as I
> see it. I think core or basic classes and models shouldn't make any
> assumptions about the UI or even if there is an UI at all.
> So things like Object inform: aString would be something I'd rather
> see to disappear.
> Or Class rename: aString, which kindly pops up a Dialog to inform the
> "user" when there are still references in Undeclared. I think that
> check should better move to the sending method in Browser renameClass,
> where chances are very high that a real user initiated the rename of a
> class and not some filein.
>
> Alex
>
> 2010/10/13 Stéphane Ducasse <[hidden email]>:
>> I think that we will have to reconsider a lot of the infrastructure decision and the hudson server will kick us
>>
>> Stef
>>
>> On Oct 12, 2010, at 10:45 PM, Alexander Lazarević wrote:
>>
>>> I was just looking at something similar.
>>> I guess for modal windows that are a kind of DialogWindow something
>>> like this should work
>>>
>>> [UIManager default confirm: 'Got milk?']
>>>  on: ProvideAnswerNotification
>>>  do: [:ex | ex resume: (ex messageText = 'Got milk?')]
>>>
>>> But which modal windows do pop up in your scenario, that do not send a
>>> notification?
>>>
>>> Regards,
>>> Alex
>>>
>>> 2010/10/12 Alexandre Bergel <[hidden email]>:
>>>> 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
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

laza
Just created an issue. Thanks.

Alex

2010/10/13 Alexandre Bergel <[hidden email]>:
> Agree.
> Maybe this should be kept in an issue if not already.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Alexandre Bergel
cool!

Alexandre


On 13 Oct 2010, at 10:34, Alexander Lazarević wrote:

> Just created an issue. Thanks.
>
> Alex
>
> 2010/10/13 Alexandre Bergel <[hidden email]>:
>> Agree.
>> Maybe this should be kept in an issue if not already.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Stéphane Ducasse
In reply to this post by Stéphane Ducasse

On Oct 13, 2010, at 3:04 PM, Alexander Lazarević wrote:

> There are also some basic things that would need some adjustment as I
> see it. I think core or basic classes and models shouldn't make any
> assumptions about the UI or even if there is an UI at all.

YESSSssssssss.... and a minicore will help /force us to do that  (imagine an hudson script blocked because of a nice popup)

> So things like Object inform: aString would be something I'd rather
> see to disappear.

Yes Alexander, this is years that I want that. In fact we started pharo exactly for these kinds of reasons.
Getting a clean and cool system. Any code going in that direction is welcome and will be warmly considered.

> Or Class rename: aString, which kindly pops up a Dialog to inform the
> "user" when there are still references in Undeclared. I think that
> check should better move to the sending method in Browser renameClass,
> where chances are very high that a real user initiated the rename of a
> class and not some filein.
>
> Alex
>
> 2010/10/13 Stéphane Ducasse <[hidden email]>:
>> I think that we will have to reconsider a lot of the infrastructure decision and the hudson server will kick us
>>
>> Stef
>>
>> On Oct 12, 2010, at 10:45 PM, Alexander Lazarević wrote:
>>
>>> I was just looking at something similar.
>>> I guess for modal windows that are a kind of DialogWindow something
>>> like this should work
>>>
>>> [UIManager default confirm: 'Got milk?']
>>>  on: ProvideAnswerNotification
>>>  do: [:ex | ex resume: (ex messageText = 'Got milk?')]
>>>
>>> But which modal windows do pop up in your scenario, that do not send a
>>> notification?
>>>
>>> Regards,
>>> Alex
>>>
>>> 2010/10/12 Alexandre Bergel <[hidden email]>:
>>>> 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
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Lukas Renggli
>> There are also some basic things that would need some adjustment as I
>> see it. I think core or basic classes and models shouldn't make any
>> assumptions about the UI or even if there is an UI at all.
>
> YESSSssssssss.... and a minicore will help /force us to do that  (imagine an hudson script blocked because of a nice popup)

Consider that this is not the UI framework that should decide to open
a dialog or not. If somebody tells morphic to open a window it should
open it otherwise you break all kinds of assumptions.

If a user wants to support multiple UI frameworks (or the possibility
to disable certain UI actions), then he needs to take appropriate
action himself. OB for example uses notifications for all UI
interactions that are captured either by a morphic handler (by
default), a web handler (if you use the web interface), or by a test
handler (that builds a fake UI that doesn't display anything but gives
you a nice model to exercise the UI).

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: modal windows and unit tests

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
yes this means that there is a infrastructural decision to make sure that UI can be controlled.


>>> There are also some basic things that would need some adjustment as I
>>> see it. I think core or basic classes and models shouldn't make any
>>> assumptions about the UI or even if there is an UI at all.
>>
>> YESSSssssssss.... and a minicore will help /force us to do that  (imagine an hudson script blocked because of a nice popup)
>
> Consider that this is not the UI framework that should decide to open
> a dialog or not. If somebody tells morphic to open a window it should
> open it otherwise you break all kinds of assumptions.
>
> If a user wants to support multiple UI frameworks (or the possibility
> to disable certain UI actions), then he needs to take appropriate
> action himself. OB for example uses notifications for all UI
> interactions that are captured either by a morphic handler (by
> default), a web handler (if you use the web interface), or by a test
> handler (that builds a fake UI that doesn't display anything but gives
> you a nice model to exercise the UI).
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project