Author: jpeterka
Date: 2012-08-24 04:35:04 -0400 (Fri, 24 Aug 2012)
New Revision: 43212
Modified:
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java
Log:
MacOSX Preference workaround applied, STD menu doesn't work
Modified:
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java
===================================================================
---
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java 2012-08-24
08:26:19 UTC (rev 43211)
+++
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java 2012-08-24
08:35:04 UTC (rev 43212)
@@ -5,6 +5,7 @@
import static org.junit.Assert.assertEquals;
import org.apache.log4j.Logger;
+import org.eclipse.swt.SWT;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
@@ -29,18 +30,19 @@
@Test
public void dummyTest() {
- String prefMenu = "Preferences";
- String prefDlg = prefMenu;
- String windowMenu = "Window";
+ String pref = "Preferences";
+ String window = "Window";
+
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
if (isOSX()) {
- prefMenu = "Preferences";
- windowMenu = "Eclipse";
+ bot.shells()[0].pressShortcut(SWT.COMMAND, ',');
}
- SWTWorkbenchBot bot = new SWTWorkbenchBot();
- bot.menu(windowMenu).menu(prefMenu).click();
- bot.waitUntil(shellIsActive(prefDlg), 10000);
- SWTBotShell shell = bot.shell(prefDlg);
- assertEquals(prefDlg,shell.getText());
+ else {
+ bot.menu(window).menu(pref).click();
+ }
+ bot.waitUntil(shellIsActive(pref), 10000);
+ SWTBotShell shell = bot.shell(pref);
+ assertEquals(pref,shell.getText());
bot.activeShell().close();
}
Show replies by date