Oops, I meant to add that I've also changed the way
SetDisplayName works for collections.  I meant to go through more
discussion about this before checking in, I can pull it out if we need
more discussion.  The way it was working has been sporadically
unreliable for me over the last week.

I'm all in favor of emulating actual wx events whenever possible.  In
this case what we were doing was scrolling to the collection, emulating
a double click, selecting the text, entering new text, and finally (a
painful hack because emulating return didn't seem to work) selecting the
Dashboard.  Unfortunately, this just wasn't reliably working, there seem
to be timing issues associated with it (that's hand waving for
"sometimes functional tests would fail one time in ten, some times always").

So for me, SetDisplayName on collections had passed into the realm of
unacceptable bugginess.  To deal with this, I replaced the above
functionality and call DisableCellEditControl to end the current edit
and just change the collection name directly.  I filed bug 6727 about
SetDisplayName failures on the Mac, but since then I've also experienced
difficult to reproduce failures on Windows because of SetDisplayName
failures.

So, all in all, I feel hopeful that reducing the degree of purity in our
functional tests won't negatively impact our ability to find bugs, but
will increase the fraction of my time I can spend implementing useful
features.

> --- trunk/chandler/tools/cats/framework/ChandlerTestLib.py    2006-09-19 
> 16:44:25 UTC (rev 11813)
> +++ trunk/chandler/tools/cats/framework/ChandlerTestLib.py    2006-09-19 
> 17:07:36 UTC (rev 11814)
> @@ -308,13 +308,21 @@
>              # select the collection
>              self.SelectItem()
>              # edit the collection displayName (double click)
> -            scripting.User.emulate_sidebarClick(App_ns.sidebar, 
> self.item.displayName, double=True)
> -            # select all
> -            App_ns.root.SelectAll()
> -            if timeInfo:
> -                self.logger.startAction("Collection title setting")
> -            # Type the new collection displayName
> -            scripting.User.emulate_typing(displayName)
> +
> +            #scripting.User.emulate_sidebarClick(App_ns.sidebar, 
> self.item.displayName, double=True)
> +            ## select all
> +            #App_ns.root.SelectAll()
> +            #if timeInfo:
> +                #self.logger.startAction("Collection title setting")
> +            ## Type the new collection displayName
> +            #scripting.User.emulate_typing(displayName)
> +            
> +            # disabled above to fix sporadic functional test failures 
> related to
> +            # SetDisplayName failure
> +            App_ns.sidebar.widget.DisableCellEditControl()
> +            self.item.displayName = displayName
> +            scripting.User.idle()
> +            
>              # work around : emulate_return doesn't work
>              #scripting.User.emulate_return()
>              scripting.User.emulate_sidebarClick(App_ns.sidebar, "Dashboard")

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to