Author: jjankovi
Date: 2011-10-14 06:20:36 -0400 (Fri, 14 Oct 2011)
New Revision: 35654
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromJavaTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromWSDLTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WSTestBase.java
Log:
WS bot test correction + small workaround
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2011-10-14 09:54:35 UTC (rev
35653)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2011-10-14 10:20:36 UTC (rev
35654)
@@ -43,16 +43,4 @@
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
- <linkedResources>
- <link>
- <name>lib-src</name>
- <type>2</type>
- <location>/home/jjankovi/Dokumenty/Trunk-svn/trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src</location>
- </link>
- <link>
- <name>lib-src-1</name>
- <type>2</type>
- <location>/home/jjankovi/Dokumenty/Trunk-svn/trunk/tests/plugins/org.jboss.tools.tests/src</location>
- </link>
- </linkedResources>
</projectDescription>
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromJavaTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromJavaTest.java 2011-10-14
09:54:35 UTC (rev 35653)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromJavaTest.java 2011-10-14
10:20:36 UTC (rev 35654)
@@ -87,10 +87,6 @@
return "TestWSClientProject";
}
- protected String getClientEarProjectName() {
- return getWsClientProjectName() + "EAR";
- }
-
@Override
protected String getWsPackage() {
return "test.ws";
@@ -119,7 +115,7 @@
} catch (CoreException e) {
L.log(Level.WARNING, e.getMessage(), e);
}
- bot.sleep(500);
+ bot.sleep(TIME_500MS);
bottomUpJbossWebService(EAPFromJavaTest.class.getResourceAsStream("/resources/jbossws/Echo.java.ws"));
IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject(getWsProjectName());
IFile f = project.getFile("WebContent/WEB-INF/web.xml");
@@ -148,13 +144,14 @@
w.bot().textWithLabel("File name:").setText("index");
w.bot().textWithLabel("Enter or select the parent
folder:").setText(getWsClientProjectName() + "/WebContent");
w.finish();
- bot.sleep(5000);
+ bot.sleep(TIME_5S);
bot.activeShell().bot().button("Skip").click();
- bot.sleep(5000);
+ bot.sleep(TIME_5S);
SWTBotEclipseEditor st =
bot.editorByTitle("index.jsp").toTextEditor();
st.selectRange(0, 0, st.getText().length());
st.setText(readStream(EAPFromJavaTest.class.getResourceAsStream("/resources/jbossws/index.jsp.ws")));
st.saveAndClose();
+ bot.sleep(TIME_1S*2);
runProject(getWsClientProjectName());
String pageContent = getPage("http://localhost:8080/" +
getWsClientProjectName() + "/index.jsp", 15000);
L.info(pageContent);
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromWSDLTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromWSDLTest.java 2011-10-14
09:54:35 UTC (rev 35653)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/eap/EAPFromWSDLTest.java 2011-10-14
10:20:36 UTC (rev 35654)
@@ -122,6 +122,13 @@
.getProject(getWsProjectName());
IFile f = project.getFile("src/" + getWsPackage().replace(".",
"/")
+ "/AreaServiceImpl.java");
+ /*
+ * workaround when package is not typed
+ */
+ if (f == null) {
+ f = project.getFile("src/" + "org.tempuri.areaservice"
+ + "/AreaServiceImpl.java");
+ }
String content = readFile(f);
Assert.assertNotNull(content);
Assert.assertTrue(content
@@ -244,7 +251,7 @@
}
}
if (!libraryFound)
- throw new Exception("No runtime library has been found");
+ throw new RuntimeException("No runtime library has been found");
}
private SWTBotMenu nodeContextMenu(final SWTBotTree tree,
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WSTestBase.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WSTestBase.java 2011-10-14
09:54:35 UTC (rev 35653)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WSTestBase.java 2011-10-14
10:20:36 UTC (rev 35654)
@@ -36,7 +36,6 @@
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JavaEEEnterpriseApplicationProject;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWSDL;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ws.ui.bot.test.jbt.SampleWSTest;
import org.jboss.tools.ws.ui.bot.test.uiutils.actions.NewFileWizardAction;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.DynamicWebProjectWizard;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.WebServiceClientWizard;
@@ -187,7 +186,7 @@
wsw.setClientSlider(Slider_Level.NO_CLIENT);
}
if (pkg != null && pkg.trim().length() > 0) {
- wsw.next();
+ wsw.next();
wsw.setPackageName(pkg);
}
wsw.finish();