Author: vpakan(a)redhat.com
Date: 2011-12-07 02:28:57 -0500 (Wed, 07 Dec 2011)
New Revision: 37034
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
Log:
Added Code Completion test of attribute of tags <link href=""/> and,
<h:link value="">, <a:loadStyle src=""/>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-12-07
01:22:33 UTC (rev 37033)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -20,11 +20,13 @@
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.BuildPathHelper;
import org.jboss.tools.ui.bot.ext.helper.ContentAssistHelper;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.ui.bot.ext.helper.OpenOnHelper;
import org.jboss.tools.ui.bot.ext.parts.ContentAssistBot;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
/** * Test Code Completion functionality of JSF components within xhtml page
* @author Vladimir Pakan
*
@@ -36,6 +38,7 @@
private String originalEditorText;
private String compositeComponentDefEditorText;
private String origCompositeComponentContainerEditorText;
+ private String addedVariableRichfacesUiLocation = null;
/**
* Test Code Completion functionality for managed bean
*/
@@ -346,6 +349,39 @@
FACELETS_TEST_PAGE);
}
/**
+ * Test Code Completion functionality of src attribute for tags <link>,
<h:link> and <a:loadStyle>
+ */
+ public void testCodeCompletionOfSrcAttriubute(){
+ initJSF2PageTest();
+ addRichFacesToJSF2ProjectClassPath();
+ SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
+ JSF2_TEST_PAGE,
+ "xmlns:f=\"http://java.sun.com/jsf/core\"",
+ 0,
+ 0,
+ 0);
+
compositeComponentContainerEditor.insertText("xmlns:a4j=\"http:...
\n");
+ SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
+ JSF2_TEST_PAGE,
+ "<h:message ",
+ 0,
+ 0,
+ 0);
+ compositeComponentContainerEditor.insertText("\n");
+ final String a4jLoadStyleTag = "<a4j:loadStyle src=\"";
+ compositeComponentContainerEditor.insertText(a4jLoadStyleTag +
"\"/>\n");
+ final String linkTag = "<link href=\"";
+ compositeComponentContainerEditor.insertText(linkTag + "\"/>\n");
+ final String hLinkTag = "<h:link value=\"";
+ compositeComponentContainerEditor.insertText(hLinkTag + "\"/>\n");
+ compositeComponentContainerEditor.save();
+ bot.sleep(Timing.time2S());
+ checkCodeCompletionOfSourceAttribute(linkTag);
+ checkCodeCompletionOfSourceAttribute(hLinkTag);
+ checkCodeCompletionOfSourceAttribute(a4jLoadStyleTag);
+ }
+
+ /**
* Initialize test which are using facelets test page
*/
private void initFaceletsPageTest() {
@@ -487,7 +523,7 @@
}
@Override
-public void tearDown() throws Exception {
+ public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
editor.saveAndClose();
@@ -500,6 +536,9 @@
compositeComponentContainerEditor.setText(origCompositeComponentContainerEditorText);
compositeComponentContainerEditor.saveAndClose();
}
+ util.waitForNonIgnoredJobs();
+ removeRichFacesFromJSF2ProjectClassPath();
+
super.tearDown();
}
/**
@@ -599,6 +638,36 @@
result.add("\"#{cc.attrs.}\"");
return result;
}
-
-
+ /**
+ * Check Code Completion of src attribute of tagToCheck tag
+ * @param tagToCheck
+ */
+ private void checkCodeCompletionOfSourceAttribute(String tagToCheck){
+ SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
+ JSF2_TEST_PAGE,
+ tagToCheck,
+ tagToCheck.length(),
+ 0,
+ 0);
+ ContentAssistBot contentAssist = compositeComponentContainerEditor.contentAssist();
+ contentAssist.checkContentAssist("/pages", false);
+ contentAssist.checkContentAssist("/resources", false);
+ contentAssist.checkContentAssist("/templates", false);
+ }
+ /**
+ * Add RichFaces library to JSF2 project classpath
+ */
+ private void addRichFacesToJSF2ProjectClassPath(){
+ addedVariableRichfacesUiLocation =
BuildPathHelper.addExternalJar(VPEAutoTestCase.RICH_FACES_UI_JAR_LOCATION,
+ JSF2_TEST_PROJECT_NAME);
+ }
+ /**
+ * Remove previously added RichFaces library from JSF2 project classpath
+ */
+ private void removeRichFacesFromJSF2ProjectClassPath(){
+ if (addedVariableRichfacesUiLocation != null){
+ BuildPathHelper.removeVariable(JSF2_TEST_PROJECT_NAME,
addedVariableRichfacesUiLocation, true);
+ }
+ eclipse.cleanAllProjects();
+ }
}
\ No newline at end of file
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-12-07
01:22:33 UTC (rev 37033)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -55,12 +55,16 @@
import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
import org.jboss.tools.ui.bot.ext.gen.IServer;
import org.jboss.tools.ui.bot.ext.gen.IServerRuntime;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.helper.MenuBarHelper;
import org.jboss.tools.ui.bot.ext.types.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.IDELabel.PreferencesDialog;
import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.jboss.tools.ui.bot.ext.view.RemoteSystems;
+import org.junit.Assert;
/**
* Provides Eclipse common operation based on SWTBot element operations
@@ -1461,4 +1465,32 @@
log.info("No Editors to close");
}
}
+ /**
+ * Opens properties dialog of project with projectName
+ * @param projectName
+ */
+ public SWTBotExt openPropertiesOfProject(String projectName){
+ PackageExplorer packageExplorer = new PackageExplorer();
+ // Open Project Properties
+ packageExplorer.show();
+ bot.sleep(Timing.time2S());
+ packageExplorer.selectProject(projectName);
+ Assert.assertTrue(isProjectInPackageExplorer(projectName));
+ bot.sleep(Timing.time2S());
+ util.waitForNonIgnoredJobs();
+ ContextMenuHelper.clickContextMenu(packageExplorer.bot().tree(),
+ IDELabel.Menu.PROPERTIES);
+ waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + projectName);
+ return bot;
+ }
+ /**
+ * Cleans All Projects
+ */
+ public void cleanAllProjects(){
+ MenuBarHelper.getMenu(IDELabel.Menu.PROJECT).menu(IDELabel.Menu.CLEAN).click();
+ bot.shell(IDELabel.Shell.CLEAN).activate();
+ bot.radio(IDELabel.CleanProjectDialog.CLEAN_ALL_PROJECTS_RADIO).click();
+ bot.button(IDELabel.Button.OK).click();
+ util.waitForNonIgnoredJobs();
+ }
}
\ No newline at end of file
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+/**
+ * Helper for managing project build path
+ *
+ * @author Vlado Pakan
+ *
+ */
+public class BuildPathHelper {
+ /**
+ * Adds External Jar File to Project Build Path
+ * @param externalJarLocation
+ * @param projectName
+ * @return
+ */
+ public static String addExternalJar(final String externalJarLocation,
+ final String projectName) {
+
+ assertTrue("External Jar Location cannot be empty but is " +
externalJarLocation,
+ externalJarLocation != null && externalJarLocation.length() > 0);
+ SWTBotExt bot = new SWTEclipseExt().openPropertiesOfProject(projectName);
+
bot.tree().expandNode(IDELabel.JavaBuildPathPropertiesEditor.JAVA_BUILD_PATH_TREE_ITEM_LABEL).select();
+ bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.LIBRARIES_TAB_LABEL).activate();
+ bot.button(IDELabel.Button.ADD_VARIABLE).click();
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ bot.button(IDELabel.Button.CONFIGURE_VARIABLES).click();
+ bot.shell(IDELabel.Shell.PREFERENCES_FILTERED).activate();
+ bot.button(IDELabel.Button.NEW).click();
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_ENTRY).activate();
+ String jarFileName = new File(externalJarLocation).getName();
+ bot.textWithLabel(IDELabel.NewVariableEntryDialog.NAME_TEXT_LABEL)
+ .setText(jarFileName.toUpperCase() + "_LOCATION");
+ bot.textWithLabel(IDELabel.NewVariableEntryDialog.PATH_TEXT_LABEL)
+ .setText(externalJarLocation);
+ bot.clickButton(IDELabel.Button.OK).click();
+ String result = TableHelper.getSelectionText(bot.table());
+ bot.clickButton(IDELabel.Button.OK).click();
+ bot.clickButton(IDELabel.Button.OK).click();
+ bot.clickButton(IDELabel.Button.OK).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+ return result;
+
+ }
+ /**
+ * Removes variable from project classpath
+ * @param variableLabel
+ * @param removeGlobaly
+ */
+ public static void removeVariable (String projectName , String variableLabel, boolean
removeGlobaly){
+ SWTBotExt bot = new SWTEclipseExt().openPropertiesOfProject(projectName);
+
bot.tree().expandNode(IDELabel.JavaBuildPathPropertiesEditor.JAVA_BUILD_PATH_TREE_ITEM_LABEL).select();
+ bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.LIBRARIES_TAB_LABEL).activate();
+ bot.tree(1).select(variableLabel);
+ bot.button(IDELabel.Button.REMOVE).click();
+ if (removeGlobaly){
+ bot.button(IDELabel.Button.ADD_VARIABLE).click();
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ bot.table().select(variableLabel);
+ bot.button(IDELabel.Button.CONFIGURE_VARIABLES).click();
+ bot.shell(IDELabel.Shell.PREFERENCES_FILTERED).activate();
+ bot.button(IDELabel.Button.REMOVE).click();
+ bot.button(IDELabel.Button.OK).click();
+ bot.shell(IDELabel.Shell.CLASSPATH_VARIABLES_CHANGED).activate();
+ bot.button(IDELabel.Button.YES).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+ bot.clickButton(IDELabel.Button.CANCEL).click();
+ }
+ bot.button(IDELabel.Button.OK).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -0,0 +1,62 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withMnemonic;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.hamcrest.Matcher;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+/**
+ * Helper to find menu within menu bar
+ * @author Vladimir Pakan
+ *
+ */
+public class MenuBarHelper {
+ /**
+ * Returns active shell menu bar menu with label menuLabel
+ * @param menuLabel
+ * @return
+ */
+ public static SWTBotMenu getMenu (final String menuLabel){
+ final Shell activeShell = new SWTBot().activeShell().widget;
+ final MenuItem menuItem = UIThreadRunnable.syncExec(new Result<MenuItem>() {
+ @Override
+ public MenuItem run() {
+ Matcher<? extends Widget> matcher = withMnemonic(IDELabel.Menu.PROJECT);
+ MenuItem[] items = activeShell.getMenuBar().getItems();
+ int index = 0;
+ while (index < items.length && !matcher.matches(items[index])){
+ index++;
+ }
+ if (index < items.length){
+ return items[index];
+ }
+ else{
+ throw new WidgetNotFoundException("Unable to find menu with label " +
IDELabel.Menu.PROJECT +
+ " within active shell menu bar.");
+ }
+
+ }
+ });
+
+ return new SWTBotMenu (menuItem);
+
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+
+/**
+ * Helper for Table widget
+ * @author vlado pakan
+ *
+ */
+public class TableHelper {
+
+ /**
+ * Returns table selection text on the selectionRow row and selectionColumn column of
selection
+ * Working also in case when table has no columns added (table.columnCount == 0)
+ * @param table
+ * @param selectionRow
+ * @param selectionColumn
+ * @return
+ */
+ public static String getSelectionText(final SWTBotTable table,
+ final int selectionRow, final int selectionColumn) {
+ table.setFocus();
+ return UIThreadRunnable.syncExec(new StringResult() {
+ @Override
+ public String run() {
+ return table.widget.getSelection()[selectionRow].getText(selectionColumn);
+ }
+ });
+ }
+ /**
+ * Returns table selection text on the selectionRow row and first column of selection
+ * Working also in case when table has no columns added (table.columnCount == 0)
+ * @param table
+ * @param selectionRow
+ * @return
+ */
+ public static String getSelectionText(final SWTBotTable table, final int selectionRow)
{
+ return TableHelper.getSelectionText(table, selectionRow , 0);
+ }
+ /**
+ * Returns table selection text on the first row and first column of selection
+ * Working also in case when table has no columns added (table.columnCount == 0)
+ * @param table
+ * @return
+ */
+ public static String getSelectionText(final SWTBotTable table) {
+ return getSelectionText(table, 0 , 0);
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/TableHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-12-07
01:22:33 UTC (rev 37033)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -86,6 +86,7 @@
public static final String SAVE_AS_TEMPLATE = "Save As Template...";
public static final String AUTO_LAYOUT = "Auto Layout";
public static final String CDI_REFACTOR = "CDI Refactor";
+ public static final String CLEAN = "Clean...";
}
public class Button {
@@ -113,6 +114,8 @@
public static final String DELETE = "Delete";
public static final String UP = "Up";
public static final String DOWN = "Down";
+ public static final String ADD_VARIABLE = "Add Variable...";
+ public static final String CONFIGURE_VARIABLES = "Configure Variables...";
}
public class Shell {
@@ -183,6 +186,11 @@
public static final String AUTO_LAYOUT = "Auto Layout";
public static final String ADD_PROPERTY = "Add Property";
public static final String EDIT = "Edit";
+ public static final String NEW_VARIABLE_CLASS_PATH_ENTRY = "New Variable
Classpath Entry";
+ public static final String PREFERENCES_FILTERED = "Preferences (Filtered)";
+ public static final String NEW_VARIABLE_ENTRY = "New Variable Entry";
+ public static final String CLASSPATH_VARIABLES_CHANGED = "Classpath Variables
Changed";
+ public static final String CLEAN = "Clean";
}
public class EntityGroup {
@@ -787,4 +795,23 @@
public static final String EDIT_PROPERTIES_DIALOG_VALUE_LABEL = "Value:";
}
+
+ public static class JavaBuildPathPropertiesEditor{
+
+ public static final String JAVA_BUILD_PATH_TREE_ITEM_LABEL = "Java Build
Path";
+ public static final String LIBRARIES_TAB_LABEL = "Libraries";
+
+ }
+
+ public static class NewVariableEntryDialog{
+
+ public static final String NAME_TEXT_LABEL = "Name:";
+ public static final String PATH_TEXT_LABEL = "Path:";
+
+ }
+ public static class CleanProjectDialog{
+
+ public static final String CLEAN_ALL_PROJECTS_RADIO = "Clean all
projects";
+
+ }
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties 2011-12-07
01:22:33 UTC (rev 37033)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties 2011-12-07
07:28:57 UTC (rev 37034)
@@ -1,7 +1,8 @@
JSFProjectName=JBIDETestProject
+RichFacesUiJarLocation=/opt/jboss-eap-5.1/seam/lib/richfaces-ui.jar
FaceletsProjectName=FaceletsTestProject
Apachev6.0=D\:/Java/apache-tomcat-6.0.18
-JBossEap5.x=/opt/jbdevstudio4.1.0.GA/jboss-eap/jboss-as
+JBossEap5.x=/opt/jbdevstudio4.1.1.GA/jboss-eap/jboss-as
JSF2ProjectName=JSF2TestProject
JBossASForJSF2=/opt/jboss-6.0.0.Final
JBossASForJSF2Version=6.0
\ No newline at end of file
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-12-07
01:22:33 UTC (rev 37033)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-12-07
07:28:57 UTC (rev 37034)
@@ -70,6 +70,7 @@
protected final static String JBOSS_AS_FOR_JSF2_SERVER_GROUP;
protected final static String JBOSS_AS_FOR_JSF2_SERVER_TYPE;
protected final static String JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE;
+ protected final static String RICH_FACES_UI_JAR_LOCATION;
static {
try {
@@ -108,6 +109,16 @@
else{
throw new RuntimeException("Runtime for JSF2 is not specified");
}
+ // Get richfaces-ui.jar location
+ // System property has priority
+ String richFacesUiLocation =
System.getProperty("org.jboss.tools.vpe.ui.bot.test.richafaces.ui.jar.location","");
+ // Read property from Properties File
+ if (richFacesUiLocation.length() == 0){
+ if (projectProperties.containsKey("RichFacesUiJarLocation")){
+ richFacesUiLocation =
projectProperties.getProperty("RichFacesUiJarLocation");
+ }
+ }
+ RICH_FACES_UI_JAR_LOCATION = richFacesUiLocation;
}
/**