diff options
| author | Maxime Porhel | 2015-02-24 14:31:13 +0000 |
|---|---|---|
| committer | Maxime Porhel | 2015-02-24 16:42:27 +0000 |
| commit | f0fbf62400e07ce5217d055a8da3955dedab819a (patch) | |
| tree | 9b7053cd1083a786a471057a891113eea3fc152e | |
| parent | 6a3fc8296d695f51b1eac67546171e75a300f961 (diff) | |
| download | org.eclipse.sirius-f0fbf62400e07ce5217d055a8da3955dedab819a.tar.gz org.eclipse.sirius-f0fbf62400e07ce5217d055a8da3955dedab819a.tar.xz org.eclipse.sirius-f0fbf62400e07ce5217d055a8da3955dedab819a.zip | |
[test] Improve SWTBot tests on Mac OS
Do not call shell.setFullScreen() but shell.setMaximized() on Mac OS.
The need is to maximize the shell but not put it in fullscreen as it
will hide the menu in Mac OS and every tests which try to access to
menus will fail.
Change-Id: I30bfacbfeb66c30b20613655577a53e45c53c91b
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java index c688f2c4b3..2ec62b2a24 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java +++ b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java @@ -260,7 +260,12 @@ public abstract class AbstractSiriusSwtBotGefTestCase extends SWTBotGefTestCase PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { @Override public void run() { - PlatformUI.getWorkbench().getWorkbenchWindows()[0].getShell().setFullScreen(AbstractSiriusSwtBotGefTestCase.fFullScreen); + Shell shell = PlatformUI.getWorkbench().getWorkbenchWindows()[0].getShell(); + if (System.getProperty("os.name").contains("Mac")) { + shell.setMaximized(AbstractSiriusSwtBotGefTestCase.fFullScreen); + } else { + shell.setFullScreen(AbstractSiriusSwtBotGefTestCase.fFullScreen); + } } }); |
