Thanks for your reply, Marc-André !

Yes, my code attempts to close the Welcome page. I tried with 2 following 
approaches:

First:

try {
        final SWTWorkbenchBot bot = new SWTWorkbenchBot();
        bot.views().stream().filter(v -> 
v.getReference().getTitle().equals("Welcome")).forEach(v -> v.close());
        
bot.perspectiveById("org.eclipse.linuxtools.docker.ui.perspective").activate();
} catch (InterruptedException e) {
        e.printStackTrace();
}

and then:

Display.getDefault().syncExec(() -> {
        if (PlatformUI.getWorkbench().getIntroManager().getIntro() != null) {
                PlatformUI.getWorkbench().getIntroManager()
                        
.closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
        }
});

but none worked on this particualr Hudson slave :-(

Best regards,
/Xavier
                
> On 04 Nov 2015, at 23:20, Marc-André Laperle 
> <marc-andre.lape...@ericsson.com> wrote:
> 
> Hi Xavier,
> 
> Looking at the sceenshots
> https://hudson.eclipse.org/linuxtools/job/linuxtools-master/ws/containers/org.eclipse.linuxtools.docker.ui.tests/screenshots/
>  
> <https://hudson.eclipse.org/linuxtools/job/linuxtools-master/ws/containers/org.eclipse.linuxtools.docker.ui.tests/screenshots/>
> 
> It looks like the welcome screen is still up. Perhaps you can try a different 
> approach to close it? If I look at the systemtap tests, it does 
> bot.viewByTitle("Welcome").close();
> 
> In Trace Compass, we do it differently, I'm not sure that's really better.
> 
> SWTBotUtils.closeView("Welcome", fBot);
> 
>     public static void closeView(String title, SWTWorkbenchBot bot) {
>         final List<SWTBotView> openViews = bot.views();
>         for (SWTBotView view : openViews) {
>             if (view.getTitle().equalsIgnoreCase(title)) {
>                 view.close();
>                 bot.waitUntil(ConditionHelpers.ViewIsClosed(view));
>             }
>         }
>     }
> 
>     public static ICondition ViewIsClosed(final SWTBotView view) {
>         return new SWTBotTestCondition() {
>             @Override
>             public boolean test() throws Exception {
>                 return (view != null) && (!view.isActive());
>             }
>         };
>     }
> 
> 
> Hope this helps,
> Marc-Andre
> 
> From: linuxtools-dev-boun...@eclipse.org 
> <mailto:linuxtools-dev-boun...@eclipse.org> 
> [linuxtools-dev-boun...@eclipse.org 
> <mailto:linuxtools-dev-boun...@eclipse.org>] on behalf of Xavier Coulon 
> [xcou...@redhat.com <mailto:xcou...@redhat.com>]
> Sent: Wednesday, 04 November 2015 9:10 AM
> To: Linux Tools developer discussions
> Cc: jbosstools-dev jbosstools-dev
> Subject: [linuxtools-dev] SWTBot tests on Hudson at Eclipse.org 
> <http://eclipse.org/>
> 
> Hello,
> 
> [I cross-posted on Linux tools developer list and JBoss Tools developer list 
> to reach a wider audience in the hope that someone can help.]
> 
> I recently merged a patch that includes SWTBot tests on the Docker tooling, 
> but I'm having test failures on the 'master' jobs: 
> https://hudson.eclipse.org/linuxtools/job/linuxtools-master/2360/testReport/ 
> <https://hudson.eclipse.org/linuxtools/job/linuxtools-master/2360/testReport/>
>  whilethe patch did build successfully on the 'Gerrit' during review: 
> https://git.eclipse.org/r/56859 <https://git.eclipse.org/r/56859> -> 
> https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10025/testReport/org.eclipse.linuxtools.internal.docker.ui.wizards/NewDockerConnectionSWTBotTest/
>  
> <https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10025/testReport/org.eclipse.linuxtools.internal.docker.ui.wizards/NewDockerConnectionSWTBotTest/>
>  
> 
> I have to say I'm clueless as to why the test pass locally with PDE, locally 
> with Tycho, on Hudson/Gerrit but _fail_ on Hudson/master.
> 
> Anyone has any suggestion/hint/idea to help ?
> 
> Best regards,
> Xavier
> _______________________________________________
> linuxtools-dev mailing list
> linuxtools-dev@eclipse.org <mailto:linuxtools-dev@eclipse.org>
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev 
> <https://dev.eclipse.org/mailman/listinfo/linuxtools-dev>
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to