[jbosstools-commits] JBoss Tools SVN: r40860 - in trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test: create and 2 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue May 8 16:20:46 EDT 2012
Author: vpakan at redhat.com
Date: 2012-05-08 16:20:45 -0400 (Tue, 08 May 2012)
New Revision: 40860
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java
Log:
Fixes for 3.3.0.Beta3
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java 2012-05-08 20:16:42 UTC (rev 40859)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java 2012-05-08 20:20:45 UTC (rev 40860)
@@ -17,7 +17,7 @@
server=@Server(),
seam=@Seam(),
db=@DB(),
- perspective="Seam 2",
+ perspective="Seam",
clearProjects=false)
public abstract class AbstractSeamTestBase extends SWTTestExt {
@@ -37,7 +37,7 @@
/**Creates any Seam Action, Form etc. */
public void createSeamUnit(String unitType, String type){
- bot.menu("File").menu("New").menu("Seam 2 " +unitType).click();
+ bot.menu("File").menu("New").menu("Seam " +unitType).click();
SWTBotShell shell = bot.activeShell();
bot.textWithLabel("Seam Project:").setText(testProjectName + type);
if ("Entity".equals(unitType)) {
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2012-05-08 20:16:42 UTC (rev 40859)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2012-05-08 20:20:45 UTC (rev 40860)
@@ -8,7 +8,6 @@
import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
import org.jboss.tools.seam.ui.bot.test.WARTests;
-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.gen.ActionItem;
@@ -29,52 +28,38 @@
public CreateSeamProjects() {
}
-
- private SWTJBTExt swtJbtExt = new SWTJBTExt(bot);
-
- @Test
+ @Test
@Category(WARTests.class)
public void testCreateSeamProjectWar(){
createSeamProject(TestControl.TYPE_WAR);
- util.waitForNonIgnoredJobs();
+ util.waitForNonIgnoredJobs(Timing.time100S());
+ bot.sleep(Timing.time3S());
+ // checkSeamProject(TestControl.TYPE_WAR);
}
-
- @Test
- @Category(WARTests.class)
- public void testCheckSeamProjectWar(){
- bot.sleep(Timing.time3S());
- checkSeamProject(TestControl.TYPE_WAR);
- }
-
- @Test
+ @Test
@Category(EARTests.class)
public void testCreateSeamProjectEar(){
createSeamProject(TestControl.TYPE_EAR);
- util.waitForNonIgnoredJobs();
+ util.waitForNonIgnoredJobs(Timing.time100S());
+ bot.sleep(Timing.time3S());
+ // checkSeamProject(TestControl.TYPE_EAR);
}
-
- @Test
- @Category(EARTests.class)
- public void testCheckSeamProjectEar(){
- bot.sleep(Timing.time3S());
- checkSeamProject(TestControl.TYPE_EAR);
- }
-
protected void createSeamProject(String type) {
SWTJBTBot bot = new SWTJBTBot();
- bot.menu("File").menu("New").menu("Seam 2 Web Project").click();
+ bot.menu("File").menu("New").menu("Seam Web Project").click();
bot.textWithLabel("Project name:").setText(AbstractSeamTestBase.testProjectName + type);
bot.comboBoxInGroup("Target runtime").setSelection(SWTTestExt.configuredState.getServer().name);
bot.comboBoxInGroup("Target Server").setSelection(SWTTestExt.configuredState.getServer().name);
bot.comboBoxInGroup("Configuration").setSelection(
AbstractSeamTestBase.seamConfigPrefix +
- SWTTestExt.configuredState.getSeam().version);
+ SWTTestExt.configuredState.getSeam().version +
+ (SWTTestExt.configuredState.getSeam().version.equals("2.3") ? " (Technical Preview)" : ""));
bot.button("Next >").click();
bot.button("Next >").click();
bot.button("Next >").click();
bot.button("Next >").click();
- bot.comboBoxWithLabel("Seam 2 Runtime:").setSelection(SWTTestExt.configuredState.getSeam().name);
+ bot.comboBoxWithLabel("Seam Runtime:").setSelection(SWTTestExt.configuredState.getSeam().name);
new SWTBotRadioExt(bot.radio(type).widget).clickWithoutDeselectionEvent();
bot.comboBoxWithLabel("Connection profile:").setSelection(SWTTestExt.configuredState.getDB().name);
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2012-05-08 20:16:42 UTC (rev 40859)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2012-05-08 20:20:45 UTC (rev 40860)
@@ -27,7 +27,7 @@
private void testGotoComponent(String type) {
SWTJBTBot bot = new SWTJBTBot();
- bot.menu("Navigate").menu("Open Seam 2 Component").click();
+ bot.menu("Navigate").menu("Open Seam Component").click();
bot.text().setText("authenticator");
SWTBotTableItem tabItem = bot.table().getTableItem("authenticator - " + AbstractSeamTestBase.testProjectName + type +
((type == TestControl.TYPE_EAR) ? "-ejb" : ""));
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java 2012-05-08 20:16:42 UTC (rev 40859)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java 2012-05-08 20:20:45 UTC (rev 40860)
@@ -1,10 +1,6 @@
package org.jboss.tools.seam.ui.bot.test.validate;
-import java.util.Properties;
-
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
import org.jboss.tools.seam.ui.bot.test.EARTests;
@@ -55,8 +51,8 @@
SWTTestExt.util.waitForNonIgnoredJobs(60000);
// check that Seam Problem exists
- SWTBotView pBotView = problems.show();
- SWTBotTreeItem[] sProblems = problems.getFilteredErrorsTreeItems(bot, "does not have a setter or a field",
+ problems.show();
+ SWTBotTreeItem[] sProblems = ProblemsView.getFilteredErrorsTreeItems(bot, "does not have a setter or a field",
"/" + testProjectName, "components.xml", "Seam Problem");
assertTrue("No Seam problem found.", ( (sProblems != null) && (sProblems.length > 0) ));
assertTrue("More than one Seam problem found.", sProblems.length <= 1);
@@ -65,11 +61,11 @@
SWTBotEclipseEditor aEditor;
if (type == TestControl.TYPE_EAR)
- aEditor = projectExplorer.openFile(testProjectName + type + "-ejb",
+ aEditor = packageExplorer.openFile(testProjectName + type + "-ejb",
"ejbModule", "org.domain.seamprjear.session", "Authenticator.java").toTextEditor();
else
- aEditor = projectExplorer.openFile(testProjectName + type,
- "src", "hot", "org", "domain", "seamprjwar", "session", "Authenticator.java").toTextEditor();
+ aEditor = packageExplorer.openFile(testProjectName + type,
+ "src/hot", "org.domain.seamprjwar.session", "Authenticator.java").toTextEditor();
idx = 0;
for(String line : aEditor.getLines()) {
@@ -84,7 +80,7 @@
// check that Seam Problem disappeared
problems.show();
- sProblems = problems.getFilteredErrorsTreeItems(bot, "does not have a setter or a field",
+ sProblems = ProblemsView.getFilteredErrorsTreeItems(bot, "does not have a setter or a field",
"/" + testProjectName, "components.xml", "Seam Problem");
assertTrue("Seam problem still exists.", sProblems == null || sProblems.length == 0);
More information about the jbosstools-commits
mailing list