Author: vpakan(a)redhat.com
Date: 2010-03-31 13:36:25 -0400 (Wed, 31 Mar 2010)
New Revision: 21160
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Change removeProjectFromServers() method to search for specified string when searching for
project to be removed from server not just test beginning and end of Servers tree item
label.
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-03-31
17:33:28 UTC (rev 21159)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-03-31
17:36:25 UTC (rev 21160)
@@ -13,12 +13,8 @@
import static org.jboss.tools.ui.bot.ext.SWTTestExt.eclipse;
-import java.util.List;
-import java.util.Vector;
-
import org.apache.log4j.Logger;
import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Table;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
@@ -28,7 +24,6 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
@@ -174,9 +169,9 @@
/**
* Remove Project from all Servers
* @param projectName
- * @param suffix
+ * @param stringToContain
*/
- public void removeProjectFromServers(String projectName , String suffix){
+ public void removeProjectFromServers(String projectName , String stringToContain){
eclipse.showView(ViewType.SERVERS);
@@ -198,7 +193,7 @@
do{
treeItemlabel = serverTreeItemChildren[itemIndex].getText();
found = treeItemlabel.startsWith(projectName)
- && (suffix == null || treeItemlabel.endsWith(suffix));
+ && (stringToContain == null ||
treeItemlabel.indexOf(stringToContain) >= 0);
} while (!found && ++itemIndex < serverTreeItemChildren.length);
// Server Tree Item has Child with Text equal to JSF TEst Project
if (found){
Show replies by date