Author: jjankovi
Date: 2012-05-23 11:27:30 -0400 (Wed, 23 May 2012)
New Revision: 41302
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/explorer/ProjectArchivesExplorer.java
Log:
method for figuring out some node exists in Project Archives explorer
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/explorer/ProjectArchivesExplorer.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/explorer/ProjectArchivesExplorer.java 2012-05-23
15:27:05 UTC (rev 41301)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/explorer/ProjectArchivesExplorer.java 2012-05-23
15:27:30 UTC (rev 41302)
@@ -11,6 +11,7 @@
package org.jboss.tools.archives.ui.bot.test.explorer;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.archives.ui.bot.test.context.ArchiveContextMenu;
@@ -78,6 +79,18 @@
return contextTool.editPublishSettings(tree, treeItem);
}
+ public boolean itemExists(String... path) {
+ try {
+ SWTBotTreeItem ti = explorer;
+ for (String pathItem : path) {
+ ti = ti.getNode(pathItem);
+ }
+ return true;
+ } catch (WidgetNotFoundException exc) {
+ return false;
+ }
+ }
+
private SWTBot bot() {
return bot;
}
@@ -90,4 +103,5 @@
return TreeHelper.expandNode(pe.bot(), project, "Project Archives");
}
+
}
Show replies by date