You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/08/14 09:56:04 UTC

svn commit: r1372761 - in /incubator/syncope/trunk: ./ console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java

Author: ilgrosso
Date: Tue Aug 14 07:56:03 2012
New Revision: 1372761

URL: http://svn.apache.org/viewvc?rev=1372761&view=rev
Log:
Merge from 1_0_X

Modified:
    incubator/syncope/trunk/   (props changed)
    incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java

Propchange: incubator/syncope/trunk/
------------------------------------------------------------------------------
  Merged /incubator/syncope/branches/1_0_X:r1371729-1372760

Modified: incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java?rev=1372761&r1=1372760&r2=1372761&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java (original)
+++ incubator/syncope/trunk/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java Tue Aug 14 07:56:03 2012
@@ -18,10 +18,38 @@
  */
 package org.apache.syncope.console;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class ConnInstanceTestITCase extends AbstractTest {
 
+    private static String connidSoapVersion;
+
+    @BeforeClass
+    public static void init() {
+        Properties props = new Properties();
+        InputStream propStream = null;
+        try {
+            propStream = ConnInstanceTestITCase.class.getResourceAsStream("/bundles.properties");
+            props.load(propStream);
+            connidSoapVersion = props.getProperty("connid.soap.version");
+        } catch (Exception e) {
+            LOG.error("Could not load bundles.properties", e);
+        } finally {
+            if (propStream != null) {
+                try {
+                    propStream.close();
+                } catch (IOException e) {
+                    LOG.error("While reading bundles.properties", e);
+                }
+            }
+        }
+        assertNotNull(connidSoapVersion);
+    }
+
     @Test
     public void browseCreateModal() {
         selenium.click("css=img[alt=\"Resources\"]");
@@ -32,7 +60,8 @@ public class ConnInstanceTestITCase exte
 
         selenium.waitForCondition("selenium.isElementPresent(" + "\"//input[@name='version:textField']\");", "30000");
 
-        selenium.select("//select[@name='bundle:dropDownChoiceField']", "label=org.connid.bundles.soap 1.2.2");
+        selenium.select("//select[@name='bundle:dropDownChoiceField']",
+                "label=org.connid.bundles.soap " + connidSoapVersion);
 
         selenium.click("//div[@id='tabs']/ul/li[2]/a/span");
         selenium.click("//form/div[@id='tabs']/ul/li[1]/a/span");
@@ -55,7 +84,7 @@ public class ConnInstanceTestITCase exte
 
         assertEquals("ConnInstance103", selenium.getAttribute("//input[@name='displayName:textField']/@value"));
 
-        assertEquals("org.connid.bundles.soap#1.2.2", selenium
+        assertEquals("org.connid.bundles.soap#" + connidSoapVersion, selenium
                 .getSelectedValue("//select[@name='bundle:dropDownChoiceField']"));
 
         selenium.click("//div[@id='tabs']/ul/li[2]/a/span");