Author: jjankovi
Date: 2012-03-27 09:30:20 -0400 (Tue, 27 Mar 2012)
New Revision: 39845
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/DynamicWebProjectWizard.java
Log:
extending DynamicWebProjectWizard class
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/DynamicWebProjectWizard.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/DynamicWebProjectWizard.java 2012-03-27
13:29:07 UTC (rev 39844)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/DynamicWebProjectWizard.java 2012-03-27
13:30:20 UTC (rev 39845)
@@ -11,6 +11,8 @@
package org.jboss.tools.ws.ui.bot.test.uiutils.wizards;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
public class DynamicWebProjectWizard extends Wizard {
@@ -23,5 +25,24 @@
setText("Project name:", name);
return this;
}
-
+
+ public DynamicWebProjectWizard addProjectToEar(String earProject) {
+ checkBoxSetChecked("&Add project to an EAR", true);
+ setTextInCombobox("EAR project name:", earProject);
+ return this;
+ }
+
+ private void checkBoxSetChecked(String checkBoxLabel, boolean checked) {
+ SWTBotCheckBox ch = bot().checkBox(checkBoxLabel);
+ ch.setFocus();
+ if (checked) ch.select();
+ else ch.deselect();
+ }
+
+ private void setTextInCombobox(String comboboxLabel, String valueToSet) {
+ SWTBotCombo c = bot().comboBoxWithLabel(comboboxLabel);
+ c.setFocus();
+ c.setSelection(valueToSet);
+ }
+
}