Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 447706

Summary: Sirius SWTBot tests cannot be run on Mac OS
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: CoreAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: triaged
Version: 1.0.1   
Target Milestone: 3.0.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Maxime Porhel CLA 2014-10-17 09:46:07 EDT
SWTbot does not find the menus when the Eclipse is in FullScreenMode

In org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase.setUp():

PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
   @Override
   public void run() {
      PlatformUI.getWorkbench().getWorkbenchWindows([0].getShell().setFullScreen(AbstractSiriusSwtBotGefTestCase.fFullScreen);
   }
});

On Mac Os, we should try to maximize Eclipse in order to keep the menus. On Windows and Linux, in full screen, the Eclipse menus are still displayed.
Comment 1 Maxime Porhel CLA 2014-11-06 05:05:19 EST
Step to reproduce: 
 . On Mac OS
 . Run ViewpointSpecificationProjectCreationTest as SWTBot tests
 . The bot is not able to find several menus:

 org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: The widget was null.
 	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.<init> (AbstractSWTBot.java:97)
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl.<init>(AbstractSWTBotControl.java:47)
	at org.eclipse.swtbot.swt.finder.widgets.SWTBotShell.<init>(SWTBotShell.java:49)
	at org.eclipse.swtbot.swt.finder.widgets.SWTBotShell.<init>(SWTBotShell.java:38)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.activeShell(SWTBotFactory.java:350)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFactory.java:208)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFactory.java:198)
	at org.eclipse.sirius.tests.swtbot.editor.vsm.ViewpointSpecificationProjectCreationTest.createViewpointSpecificationProject(ViewpointSpecificationProjectCreationTest.java:161)
 ...

Other Mac Os specific bugs might be found after the correction of this first issue.
Comment 2 Maxime Porhel CLA 2015-10-27 09:32:23 EDT
Junit tests on compartments have been added in Bug 470867.

We now need to also complete the existing SWTBot compartments tests with new Region/RegionContainer features like collapse, Edge creation/reconnection, resize propagation, multi level of regions.
Comment 3 Maxime Porhel CLA 2015-10-27 09:51:53 EDT
Previous comment is an error. 


The current issue has been corrected by a commit in February 2015. On Mac Os we now maximize Eclipse instead of setting it in fullscreen mode.

See 
 . https://git.eclipse.org/r/#/c/42524/
 . http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f0fbf62400e07ce5217d055a8da3955dedab819a
Comment 4 Maxime Porhel CLA 2015-10-27 09:54:46 EDT
This has been corrected between 3.0.0 M5 and M6. 
I close it as resolved for 3.0.0 as I am now able to launch swtbot every day on my MacBook
Comment 5 Maxime Porhel CLA 2015-10-27 09:55:37 EDT
The correction has been shipped with Sirius 3.0.0