Return-Path: X-Original-To: apmail-incubator-syncope-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-syncope-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6E4BCCE8 for ; Tue, 14 Aug 2012 07:54:18 +0000 (UTC) Received: (qmail 35314 invoked by uid 500); 14 Aug 2012 07:54:18 -0000 Delivered-To: apmail-incubator-syncope-commits-archive@incubator.apache.org Received: (qmail 35277 invoked by uid 500); 14 Aug 2012 07:54:18 -0000 Mailing-List: contact syncope-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: syncope-dev@incubator.apache.org Delivered-To: mailing list syncope-commits@incubator.apache.org Received: (qmail 35257 invoked by uid 99); 14 Aug 2012 07:54:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 07:54:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 07:54:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 571D623888E3; Tue, 14 Aug 2012 07:53:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1372758 - /incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java Date: Tue, 14 Aug 2012 07:53:33 -0000 To: syncope-commits@incubator.apache.org From: mdisabatino@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120814075333.571D623888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mdisabatino Date: Tue Aug 14 07:53:32 2012 New Revision: 1372758 URL: http://svn.apache.org/viewvc?rev=1372758&view=rev Log: Reading connector version from properties files Modified: incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java Modified: incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java URL: http://svn.apache.org/viewvc/incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java?rev=1372758&r1=1372757&r2=1372758&view=diff ============================================================================== --- incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java (original) +++ incubator/syncope/branches/1_0_X/console/src/test/java/org/apache/syncope/console/ConnInstanceTestITCase.java Tue Aug 14 07:53:32 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");