[jbosstools-commits] JBoss Tools SVN: r42927 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test: smoke and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Aug 8 09:59:08 EDT 2012


Author: vpakan at redhat.com
Date: 2012-08-08 09:59:08 -0400 (Wed, 08 Aug 2012)
New Revision: 42927

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/AbstractFacesConfigEditingTest.java
   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/MarkersTest.java
   trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/CreateNewTemplateFromJSFProject.java
Log:
Fixes for JBT 3.4.

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-08-08 13:58:10 UTC (rev 42926)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/compatibility/ImportJSF12ProjectFromJBDS4x.java	2012-08-08 13:59:08 UTC (rev 42927)
@@ -108,7 +108,9 @@
   @Override
   public void tearDown() throws Exception {
     if (eclipse.isProjectInPackageExplorer(PROJECT_TO_IMPORT_NAME)){
-      packageExplorer.deleteProject(ImportJSF12ProjectFromJBDS4x.PROJECT_TO_IMPORT_NAME, true);  
+      addIgnoredExceptionFromEclipseLog("null");
+      packageExplorer.deleteProject(ImportJSF12ProjectFromJBDS4x.PROJECT_TO_IMPORT_NAME, true);
+      removeIgnoredExceptionFromEclipseLog("null");
     }
     super.tearDown();
   }

Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AbstractFacesConfigEditingTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AbstractFacesConfigEditingTest.java	2012-08-08 13:58:10 UTC (rev 42926)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AbstractFacesConfigEditingTest.java	2012-08-08 13:59:08 UTC (rev 42927)
@@ -72,7 +72,9 @@
       if (gefObjectAddedViaViewTool != null){
         gefObjectAddedViaViewTool.click();
         bot.sleep(Timing.time1S());
+        addIgnoredExceptionFromEclipseLog("java.lang.Exception");
         gefViewer.clickContextMenu(IDELabel.Menu.DELETE);
+        removeIgnoredExceptionFromEclipseLog("java.lang.Exception");
         confirmViewDelete();
         bot.sleep(Timing.time1S());
       }
@@ -86,7 +88,8 @@
     }
     if (facesConfigEditor != null) {
       facesConfigEditor.toTextEditor().setText(originalContent);
-      facesConfigEditor.saveAndClose();
+      facesConfigEditor.save();
+      facesConfigEditor.close();
       bot.sleep(Timing.time1S());
     }
     super.tearDown();

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-08-08 13:58:10 UTC (rev 42926)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java	2012-08-08 13:59:08 UTC (rev 42927)
@@ -196,13 +196,24 @@
     compositeComponentContainerEditor.insertText(textToInsert);
     // Check content assist menu content for "<ez:"
     String expectedInsertedText = "input action=\"\" value=\"\"></ez:input>";
-    ContentAssistHelper.checkContentAssistAutoProposal(SWTTestExt.bot, 
-        JSF2_TEST_PAGE,
-        textToInsert, 
-        textToInsert.length(), 
-        0, 
-        0,
-        expectedInsertedText);
+    try{
+      ContentAssistHelper.checkContentAssistAutoProposal(SWTTestExt.bot, 
+          JSF2_TEST_PAGE,
+          textToInsert, 
+          textToInsert.length(), 
+          0, 
+          0,
+          expectedInsertedText);
+    } catch (AssertionError ae){
+      // because order of attributes is not guaranteed check 
+      // it has to be checked with different order 
+      expectedInsertedText = "input value=\"\" action=\"\"></ez:input>";
+      final String textOnCurrentLine = compositeComponentContainerEditor.getTextOnCurrentLine();
+      assertTrue("Text on current line should contain:\n" + 
+          "<ez:" + expectedInsertedText +
+          "\nbut is:\n" + textOnCurrentLine
+          , textOnCurrentLine.contains("<ez:" + expectedInsertedText));
+    }
     compositeComponentContainerEditor.save();
     // Check content assist menu content for Composite Components attributes    
     ContentAssistHelper.checkContentAssistContent(SWTTestExt.bot, 

Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java	2012-08-08 13:58:10 UTC (rev 42926)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java	2012-08-08 13:59:08 UTC (rev 42927)
@@ -87,6 +87,7 @@
         insertText.length(),
         expectedQuickFixes);
     editor.quickFix().useQuickFix(0);
+    util.waitForShellWithTextIsFound(IDELabel.Shell.PREFERENCES_FILTERED, Timing.time3S());
     final SWTBot botProperties = bot.shell(IDELabel.Shell.PREFERENCES_FILTERED).activate().bot();
     String selectedTreeItemLabel = botProperties.tree().selection().get(0,0);
     boolean isFilterValueOK = false;

Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/CreateNewTemplateFromJSFProject.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/CreateNewTemplateFromJSFProject.java	2012-08-08 13:58:10 UTC (rev 42926)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/CreateNewTemplateFromJSFProject.java	2012-08-08 13:59:08 UTC (rev 42927)
@@ -72,7 +72,7 @@
     bot.sleep(Timing.time3S());
     packageExplorer.selectTreeItem(CreateNewTemplateFromJSFProject.TEST_PAGE_NAME,
         new String[]{CreateNewTemplateFromJSFProject.TEMPLATE_TEST_PROJECT_NAME,
-          "WebContent.pages"}).doubleClick();
+          "WebContent","pages"}).doubleClick();
     packageExplorer.deleteProject(CreateNewTemplateFromJSFProject.TEMPLATE_TEST_PROJECT_NAME, true);
         
 	}



More information about the jbosstools-commits mailing list