Author: dgolovin
Date: 2011-08-15 19:33:40 -0400 (Mon, 15 Aug 2011)
New Revision: 33946
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java
Log:
fix for tests in context of tool installed into Eclipse SDK. It means Java perspective
named as "Java (default)". So it tries find in table requested perspective first
and it it is not there adds prefix " (default)". This change should not harm
anyone, but it lets run SWTBot tests from maven.
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java 2011-08-15
23:20:20 UTC (rev 33945)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java 2011-08-15
23:33:40 UTC (rev 33946)
@@ -157,7 +157,11 @@
bot.menu("Window").menu("Open
Perspective").menu("Other...").click();
SWTBotShell shell = bot.shell("Open Perspective");
shell.activate();
- bot.table().select(perspective.getName());
+ if(bot.table().containsItem(perspective.getName())) {
+ bot.table().select(perspective.getName());
+ } else {
+ bot.table().select(perspective.getName()+ " (default)");
+ }
bot.button("OK").click();
log.info("Perspective switched to '" + perspective.getName() +
"'");
}
Show replies by date