Author: vpakan(a)redhat.com
Date: 2012-04-18 09:53:01 -0400 (Wed, 18 Apr 2012)
New Revision: 40290
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/compatibility/ImportJSF12ProjectFromJBDS4x.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
Log:
Small fixes. Tests for JSF2 are working just with server runtime defined for whole test
suite. No additional server runtime is created.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/compatibility/ImportJSF12ProjectFromJBDS4x.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/compatibility/ImportJSF12ProjectFromJBDS4x.java 2012-04-18
13:41:52 UTC (rev 40289)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/compatibility/ImportJSF12ProjectFromJBDS4x.java 2012-04-18
13:53:01 UTC (rev 40290)
@@ -14,6 +14,7 @@
import java.io.File;
import java.io.IOException;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
@@ -58,9 +59,16 @@
+ File.separator + "WEB-INF"
+ File.separator + "web.xml");
bot.button(IDELabel.Button.NEXT).click();
- SWTBotCheckBox chbServerRuntime = bot.checkBox(1);
- if (chbServerRuntime.isChecked()){
- chbServerRuntime.deselect();
+ // do not deploy to Server
+ try{
+ SWTBotCheckBox chbServerRuntime = bot.checkBox(1);
+ if (chbServerRuntime.isChecked()){
+ chbServerRuntime.deselect();
+ }
+ } catch (WidgetNotFoundException wnfe){
+ // do nothing
+ } catch (IndexOutOfBoundsException ioobe){
+ // do nothing
}
bot.button(IDELabel.Button.FINISH).click();
util.waitForAll(Timing.time10S());
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-04-18
13:41:52 UTC (rev 40289)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2012-04-18
13:53:01 UTC (rev 40290)
@@ -274,6 +274,22 @@
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,
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-04-18
13:41:52 UTC (rev 40289)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2012-04-18
13:53:01 UTC (rev 40290)
@@ -76,10 +76,6 @@
protected final static String JBT_TEST_PROJECT_NAME = "JBIDETestProject";
//$NON-NLS-1$
protected final static String FACELETS_TEST_PROJECT_NAME =
"FaceletsTestProject"; //$NON-NLS-1$
protected final static String JSF2_TEST_PROJECT_NAME = "JSF2TestProject";
//$NON-NLS-1$
- protected final static String JBOSS_AS_FOR_JSF2_HOME;
- 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;
private String projectName = null;
@@ -102,25 +98,6 @@
Activator.getDefault().getLog().log(status);
e.printStackTrace();
}
- // Setup JSF2 project related properties
- if (projectProperties.containsKey("JBossASForJSF2")) {
- JBOSS_AS_FOR_JSF2_HOME =
projectProperties.getProperty("JBossASForJSF2");
- String version = projectProperties.getProperty("JBossASForJSF2Version",
- "6.0");
- if (version.equals("6.0")) {
- JBOSS_AS_FOR_JSF2_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_x;
- JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_x;
- } else {
- throw new RuntimeException(
- "Unsupported version of JBoss AS runtime for JSF2 [version="
- + version + "location='" + JBOSS_AS_FOR_JSF2_HOME
- + "' specified.");
- }
- }
- 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","");
@@ -659,41 +636,23 @@
wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.TEMPLATE_LABEL)
.setSelection("JSFKickStartWithoutLibs");//$NON-NLS-1$
wiz.button(IDELabel.Button.NEXT).click();
- try {
- wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.RUNTIME_LABEL)
- .setSelection(JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE);
- delay();
- wiz.button(IDELabel.Button.FINISH).click();
- try {
- wiz.button(IDELabel.Button.YES).click();
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException wnfe1) {
- }
- } catch (Exception e) {
- bot.button(0).click();
- SWTBotTree innerTree = wiz.tree();
- delay();
- innerTree.expandNode(JBOSS_AS_FOR_JSF2_SERVER_GROUP).select(
- JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE);
- delay();
- wiz.button(IDELabel.Button.NEXT).click();
- wiz.textWithLabel(IDELabel.NewJsfProjectDialog.HOME_DIRECTORY_LABEL)
- .setText(JBOSS_AS_FOR_JSF2_HOME);
- wiz.button(IDELabel.Button.FINISH).click();
- delay();
- wiz.button(IDELabel.Button.FINISH).click();
- try {
- wiz.button(IDELabel.Button.YES).click();
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e2) {
- }
+
wiz.comboBoxWithLabel("Runtime:*").setSelection(SWTTestExt.configuredState.getServer().name);
//$NON-NLS-1$
+ // Check if there is problem to create JSF 2 project using configured Server
Runtime
+ if (!wiz.button(IDELabel.Button.FINISH).isEnabled()){
+ String errorText = wiz.text(1).getText();
+ wiz.button(IDELabel.Button.CANCEL).click();
+ assertTrue("Unable to create JSF 2 Project with Server Runtime: "
+ + SWTTestExt.configuredState.getServer().name
+ + "\nError: "
+ + errorText,
+ false);
}
- waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
- setException(null);
+ else{
+ open.finish(wiz);
+ waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
+ setException(null);
+ }
}
-
}
/**
* Creates new empty HTML page within test project
Show replies by date