Author: jjankovi
Date: 2012-05-23 07:36:34 -0400 (Wed, 23 May 2012)
New Revision: 41287
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java
Log:
method setting configured runtime as targeted runtime is now in SWTEclipseExt
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-05-23
11:35:35 UTC (rev 41286)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-05-23
11:36:34 UTC (rev 41287)
@@ -121,9 +121,8 @@
protected void importWSTestProject(String projectLocation, String dir) {
ImportHelper.importProject(projectLocation, dir, Activator.PLUGIN_ID);
- /** configure JDK and required runtime */
- projectHelper.addDefaultJDKIntoProject(getWsProjectName());
- projectHelper.addConfiguredRuntimeIntoProject(getWsProjectName(),
+
+ eclipse.addConfiguredRuntimeIntoProject(getWsProjectName(),
configuredState.getServer().name);
}
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java 2012-05-23
11:35:35 UTC (rev 41286)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java 2012-05-23
11:36:34 UTC (rev 41287)
@@ -14,15 +14,11 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-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.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTOpenExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
-import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
-import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JavaEEEnterpriseApplicationProject;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWSDL;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -139,85 +135,4 @@
bot.sleep(1500);
}
- /**
- * Add first defined runtime into project as targeted runtime
- * @param project
- */
- public void addConfiguredRuntimeIntoProject(String project,
- String configuredRuntime) {
- projectExplorer.selectProject(project);
- bot.menu(IDELabel.Menu.FILE).menu(
- IDELabel.Menu.PROPERTIES).click();
- bot.waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + project);
- SWTBotShell propertiesShell = bot.shell(
- IDELabel.Shell.PROPERTIES_FOR + " " + project);
- propertiesShell.activate();
- SWTBotTreeItem item = bot.tree().getTreeItem("Targeted Runtimes");
- item.select();
- SWTBotTable runtimes = bot.table();
- for (int i = 0; i < runtimes.rowCount(); i++) {
- runtimes.getTableItem(i).uncheck();
- }
- for (int i = 0; i < runtimes.rowCount(); i++) {
- if (runtimes.getTableItem(i).getText().equals(configuredRuntime)) {
- runtimes.getTableItem(i).check();
- }
- }
- bot.button(IDELabel.Button.OK).click();
- bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
- TaskDuration.LONG.getTimeout());
-
- }
-
- /**
- * Set system default jdk in the project
- * @param projectName
- */
- public void addDefaultJDKIntoProject(String projectName) {
-
- projectExplorer.selectProject(projectName);
- bot.menu(IDELabel.Menu.FILE).menu(
- IDELabel.Menu.PROPERTIES).click();
- bot.waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + projectName);
- SWTBotShell propertiesShell = bot.shell(
- IDELabel.Shell.PROPERTIES_FOR + " " + projectName);
- propertiesShell.activate();
- SWTBotTreeItem item = bot.tree().getTreeItem(
- IDELabel.JavaBuildPathPropertiesEditor.
- JAVA_BUILD_PATH_TREE_ITEM_LABEL);
- item.select();
- bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.
- LIBRARIES_TAB_LABEL).activate();
- SWTBotTree librariesTree = bot.treeWithLabel(
- "JARs and class folders on the build path:");
- /** remove jdk currently configured on project */
- for (int i = 0; i < librariesTree.rowCount(); i++) {
- SWTBotTreeItem libraryItem = librariesTree.
- getAllItems()[i];
- if (libraryItem.getText().contains("JRE") ||
- libraryItem.getText().contains("jdk")) {
- libraryItem.select();
- break;
- }
- }
- bot.button(IDELabel.Button.REMOVE).click();
-
- /** add default jdk of system */
- bot.button(IDELabel.Button.ADD_LIBRARY).click();
- bot.waitForShell(IDELabel.Shell.ADD_LIBRARY);
- SWTBotShell libraryShell = bot.shell(
- IDELabel.Shell.ADD_LIBRARY);
- libraryShell.activate();
- bot.list().select("JRE System Library");
- bot.button(IDELabel.Button.NEXT).click();
- bot.radio(2).click();
- bot.button(IDELabel.Button.FINISH).click();
- bot.waitWhile(new ShellIsActiveCondition(libraryShell),
- TaskDuration.LONG.getTimeout());
- bot.button(IDELabel.Button.OK).click();
- bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
- TaskDuration.LONG.getTimeout());
-
- }
-
}
Show replies by date