[jbosstools-commits] JBoss Tools SVN: r23633 - in trunk: jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Jul 21 07:20:04 EDT 2010
Author: vpakan at redhat.com
Date: 2010-07-21 07:20:03 -0400 (Wed, 21 Jul 2010)
New Revision: 23633
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
Fixes for JBT 3.2.0.M1
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2010-07-21 10:14:01 UTC (rev 23632)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2010-07-21 11:20:03 UTC (rev 23633)
@@ -27,6 +27,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.hamcrest.Matcher;
@@ -35,6 +36,7 @@
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementNotFulfilledException;
import org.jboss.tools.ui.bot.ext.config.requirement.StartServer;
import org.jboss.tools.ui.bot.ext.config.requirement.StopServer;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GuvnorGuvnorResourceHistory;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.helper.DragAndDropHelper;
@@ -67,6 +69,7 @@
*/
@Test
public void testGuvnorRepositories() {
+ setGuvnorTemplate();
startGuvnor();
addGuvnorRepository();
deleteGuvnorRepository();
@@ -194,6 +197,8 @@
new String[] {DroolsAllBotTests.DROOLS_PROJECT_NAME});
DragAndDropHelper.dragAndDropOnTo(tiGuvnorFile.widget,tiDroolRuleDir.widget);
bot.sleep(Timing.time5S());
+ bot.shell(IDELabel.Shell.COPY_FILE_FROM_GUVNOR_TO_PACKAGE_EXPLORER).activate();
+ bot.button(IDELabel.Button.OK).click();
SWTBotTree packageExplorerTree = packageExplorerBot.tree();
// File is renamed because there is appended Guvnor info to Tree Item Label
// So we need to get real label of Tree Item and use it later
@@ -256,6 +261,7 @@
new String[]{IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM})
.select();
+ bot.sleep(Timing.time5S());
addToGuvnorDialogBot.button(IDELabel.Button.FINISH).click();
eclipse.waitForClosedShell(addToGuvnorShell);
boolean isAddedToGuvnorRepository = false;
@@ -505,4 +511,14 @@
"Content should start with " + addedChange +
"\n but is " + editorText,editorText.startsWith(addedChange));
}
+ /**
+ * Sets properly Guvnor Template
+ */
+ private void setGuvnorTemplate(){
+ SWTBot dialogBot = open.preferenceOpen(ActionItem.Preference.Guvnor.LABEL);
+ SWTBotText guvnorTemplateText = dialogBot.textWithLabel(IDELabel.GuvnorPropertiesDialog.GUVNOR_URL_TEMPLATE);
+ guvnorTemplateText.setText(guvnorTemplateText.getText().replaceFirst("jboss-brms", "drools-guvnor"));
+ dialogBot.button(IDELabel.Button.OK).click();
+ SWTEclipseExt.hideWarningIfDisplayed(bot);
+ }
}
\ No newline at end of file
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2010-07-21 10:14:01 UTC (rev 23632)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/ManageDroolsProject.java 2010-07-21 11:20:03 UTC (rev 23633)
@@ -15,6 +15,7 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.FileRenameHelper;
import org.jboss.tools.ui.bot.ext.types.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -74,8 +75,7 @@
bot.button(IDELabel.Button.NEXT).click();
bot.button(IDELabel.Button.FINISH).click();
SWTTestExt.util.waitForAll(30*1000L);
- jbt.delay();
-
+ bot.sleep(Timing.time5S());
assertTrue("Project "
+ droolsProjectName
+ " was not created properly.",SWTEclipseExt.isProjectInPackageExplorer(bot,droolsProjectName));
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-07-21 10:14:01 UTC (rev 23632)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-07-21 11:20:03 UTC (rev 23633)
@@ -136,6 +136,7 @@
public static final String CONFIRM_DELETE = "Confirm Delete";
public static final String SHOW_VIEW = "Show View";
public static final String PROPERTIES_FOR = "Properties for";
+ public static final String COPY_FILE_FROM_GUVNOR_TO_PACKAGE_EXPLORER = "File Operation";
}
public class EntityGroup {
@@ -477,7 +478,7 @@
public static final String ADD_GUVNOR_REPOSITORY_TOOLTIP = "Add a Guvnor respository connection";
public static final String REMOVE_GUVNOR_REPOSITORY_TOOLTIP = "Delete Guvnor repository connection";
public static final String REMOVE_GUVNOR_REPOSITORY_DIALOG_TITLE = "Remove repository connection";
- public static final String GUVNOR_REPOSITORY_ROOT_TREE_ITEM = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav";
+ public static final String GUVNOR_REPOSITORY_ROOT_TREE_ITEM = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/";
public static final String PACKAGES_TREE_ITEM = "packages/";
public static final String MORTGAGE_TREE_ITEM = "mortgages/";
public static final String GO_INTO_GUVNOR_REPOSITORY_TOOLTIP = "Go Into";
@@ -505,4 +506,10 @@
}
}
+
+ public static class GuvnorPropertiesDialog {
+
+ public static final String GUVNOR_URL_TEMPLATE = "Guvnor URL template: ";
+
+ }
}
More information about the jbosstools-commits
mailing list