Author: vpakan(a)redhat.com
Date: 2011-09-21 03:54:11 -0400 (Wed, 21 Sep 2011)
New Revision: 34923
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/validate/ComponentsValidator.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java
Log:
Fixes for JBDS 5.0.0.M3
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 2011-09-21
04:26:50 UTC (rev 34922)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2011-09-21
07:54:11 UTC (rev 34923)
@@ -10,6 +10,7 @@
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;
import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotRadioExt;
@@ -41,6 +42,7 @@
@Test
@Category(WARTests.class)
public void testCheckSeamProjectWar(){
+ bot.sleep(Timing.time3S());
checkSeamProject(TestControl.TYPE_WAR);
}
@@ -54,6 +56,7 @@
@Test
@Category(EARTests.class)
public void testCheckSeamProjectEar(){
+ bot.sleep(Timing.time3S());
checkSeamProject(TestControl.TYPE_EAR);
}
@@ -87,7 +90,7 @@
problems.show();
SWTBotTreeItem[] errors = ProblemsView.getFilteredErrorsTreeItems(bot, null, null,
null, null);
- assertNull("Errors in problem view.", errors);
+ assertTrue("Errors in problem view.", errors == null || errors.length == 0);
open.viewOpen(ActionItem.View.GeneralInternalWebBrowser.LABEL);
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 2011-09-21
04:26:50 UTC (rev 34922)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java 2011-09-21
07:54:11 UTC (rev 34923)
@@ -37,8 +37,8 @@
private void testAddComponentProperty(String type) {
// open components.xml
- SWTBotEclipseEditor cEditor = projectExplorer.openFile(testProjectName + type,
- "Web Resources : WebContent", "WEB-INF",
"components.xml").toTextEditor();
+ SWTBotEclipseEditor cEditor = packageExplorer.openFile(testProjectName + type,
+ "WebContent", "WEB-INF",
"components.xml").toTextEditor();
// add non-existing property
@@ -86,7 +86,7 @@
problems.show();
sProblems = problems.getFilteredErrorsTreeItems(bot, "does not have a setter or a
field",
"/" + testProjectName, "components.xml", "Seam
Problem");
- assertTrue("Seam problem still exists.", sProblems == null);
+ assertTrue("Seam problem still exists.", sProblems == null ||
sProblems.length == 0);
cEditor.close();
aEditor.close();
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java 2011-09-21
04:26:50 UTC (rev 34922)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java 2011-09-21
07:54:11 UTC (rev 34923)
@@ -1,13 +1,13 @@
package org.jboss.tools.seam.ui.bot.test.validate;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-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;
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.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -29,8 +29,8 @@
private void testELExpr(String type) {
- SWTBotEclipseEditor editor = projectExplorer.openFile(testProjectName + type,
- "Web Resources", "home.xhtml").toTextEditor();
+ SWTBotEclipseEditor editor = packageExplorer.openFile(testProjectName + type,
+ "WebContent", "home.xhtml").toTextEditor();
// add correct expression
int idx = 0;
@@ -45,9 +45,9 @@
SWTTestExt.util.waitForNonIgnoredJobs(60000);
// check that there is no problem
- SWTBotView pBotView = problems.show();
- SWTBotTreeItem[] sProblems = problems.getFilteredErrorsTreeItems(bot, "hasR",
- "/" + testProjectName, "home.xhtml", "JSF EL
Problem");
+ problems.show();
+ SWTBotTreeItem[] sProblems = ProblemsView.getFilteredErrorsTreeItems(bot,
"hasR",
+ "/" + testProjectName + type, "home.xhtml", "JSF EL
Problem");
assertTrue("JSF-EL problem found.", ( (sProblems == null) ||
(sProblems.length == 0) ));
// add incorrect expression
@@ -56,11 +56,11 @@
SWTTestExt.util.waitForNonIgnoredJobs(60000);
// check that JSF EL Problem exists
- pBotView = problems.show();
- sProblems = problems.getFilteredErrorsTreeItems(bot, "hasR",
- "/" + testProjectName, "home.xhtml", "JSF EL
Problem");
- assertTrue("No JSF-EL problem found.", ( (sProblems != null) &&
(sProblems.length > 0) ));
- assertTrue("More than oneJSF-EL problem found.", sProblems.length <= 1);
+ problems.show();
+ SWTBotTreeItem[] sWarnings = ProblemsView.getFilteredWarningsTreeItems(bot,
"hasR",
+ "/" + testProjectName + type, "home.xhtml", "EL Knowledge
Base Problem");
+ assertTrue("No JSF-EL problem found.", ( (sWarnings != null) &&
(sWarnings.length > 0) ));
+ assertTrue("More than oneJSF-EL problem found.", sWarnings.length <= 1);
editor.close();