Author: yzhishko
Date: 2009-10-07 11:19:20 -0400 (Wed, 07 Oct 2009)
New Revision: 17964
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
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
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java
Log:
Some corrections according to UI Preferences changes. SWTBot should use JUnit 4.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2009-10-07
15:17:08 UTC (rev 17963)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2009-10-07
15:19:20 UTC (rev 17964)
@@ -16,14 +16,14 @@
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.jboss.tools.vpe;bundle-version="2.1.0",
- org.jboss.tools.jst.jsp;bundle-version="2.0.0",
org.jboss.tools.common.text.ext;bundle-version="2.0.0",
org.jboss.tools.jst.web;bundle-version="2.0.0",
org.hamcrest;bundle-version="1.1.0",
org.mozilla.xpcom;bundle-version="1.8.1",
org.jboss.tools.vpe.xulrunner;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0",
- org.junit;bundle-version="3.8.2"
+ org.jboss.tools.jst.jsp;bundle-version="2.0.0",
+ org.junit4
Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
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 2009-10-07
15:17:08 UTC (rev 17963)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties 2009-10-07
15:19:20 UTC (rev 17964)
@@ -1,3 +1,3 @@
JSFProjectName=JBIDETestProject
Apachev6.0=D\:/Java/apache-tomcat-6.0.18
-JBossEap4.3=C\:/jbdevstudio0609/jboss-eap/jboss-as
\ No newline at end of file
+JBossEap4.3=${jbosstools.test.jboss.home}
\ 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 2009-10-07
15:17:08 UTC (rev 17963)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2009-10-07
15:19:20 UTC (rev 17964)
@@ -6,12 +6,16 @@
import java.util.List;
import java.util.Properties;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.test.TestProperties;
+import org.jboss.tools.ui.bot.test.Activator;
import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
import org.jboss.tools.ui.bot.test.SWTBotJSPMultiPageEditor;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -47,15 +51,22 @@
static {
try {
- InputStream is =
Platform.getBundle(Activator.PLUGIN_ID).getResource(PROJECT_PROPERTIES).openStream();
- projectProperties = new Properties();
- projectProperties.load(is);
- } catch (IOException e) {
- fail("Can't load properties from " + PROJECT_PROPERTIES + "
file");
- } catch (IllegalStateException e) {
- fail("Property file " + PROJECT_PROPERTIES + " was not found");
+ InputStream inputStream =
VPEAutoTestCase.class.getResourceAsStream("/"+PROJECT_PROPERTIES);
+ projectProperties = new TestProperties();
+ projectProperties.load(inputStream);
+ inputStream.close();
+ }
+ catch (IOException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Can't load
properties from " + PROJECT_PROPERTIES + " file", e);
+ Activator.getDefault().getLog().log(status);
+ e.printStackTrace();
}
- JBOSS_EAP_HOME =
System.getProperty("jbosstools.test.jboss.home",projectProperties.getProperty("JBossEap4.3"));
+ catch (IllegalStateException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Property file
" + PROJECT_PROPERTIES + " was not found", e);
+ Activator.getDefault().getLog().log(status);
+ e.printStackTrace();
+ }
+ JBOSS_EAP_HOME = projectProperties.getProperty("JBossEap4.3");
JBT_TEST_PROJECT_NAME = projectProperties.getProperty("JSFProjectName");
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2009-10-07
15:17:08 UTC (rev 17963)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2009-10-07
15:19:20 UTC (rev 17964)
@@ -21,7 +21,7 @@
protected static final String SHOW_RESOURCE_BUNDLES = "Show resource bundles usage
as EL expressions";
protected static final String ASK_FOR_ATTRIBUTES = "Ask for tag attributes during
tag insert";
protected static final String ASK_FOR_CONFIRM = "Ask for confirmation when closing
Selection Bar";
- protected static final String SELECT_DEFAULT_TAB = "Select the default active
editor's tab for files that haven't been previously opened in the VPE";
+ protected static final String SELECT_DEFAULT_TAB = "Select the default active
editor's tab";
protected static final String EDITOR_SPLITTING = "Visual/Source editors
splitting";
protected static final String SHOW_TEXY_FORMAT = "Show text formatting bar";
protected static final String PREF_TOOLTIP = "Preferences";
@@ -90,7 +90,7 @@
void setPreferencesToDefault() throws WidgetNotFoundException{
SWTBotCheckBox checkBox = bot.checkBox(SHOW_BORDER_FOR_UNKNOWN_TAGS);
- if (checkBox.isChecked()) {
+ if (!checkBox.isChecked()) {
checkBox.click();
}
checkBox = bot.checkBox(SHOW_NON_VISUAL_TAGS);
@@ -117,9 +117,9 @@
if (!checkBox.isChecked()) {
checkBox.click();
}
- SWTBotCombo combo = bot.comboBoxWithLabel("Select the default active editor's
tab for files that haven't been previously opened in the VPE");
+ SWTBotCombo combo = bot.comboBoxWithLabel(SELECT_DEFAULT_TAB);
combo.setSelection("Visual/Source");
- combo = bot.comboBoxWithLabel("Visual/Source editors splitting");
+ combo = bot.comboBoxWithLabel(EDITOR_SPLITTING);
combo.setSelection("Vertical splitting with Source Editor on the top");
}