geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r964294 - in /geronimo/server/branches/2.2: testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/ testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ testsupport/testsup...
Date Thu, 15 Jul 2010 03:37:06 GMT
Author: xiaming
Date: Thu Jul 15 03:37:05 2010
New Revision: 964294

URL: http://svn.apache.org/viewvc?rev=964294&view=rev
Log:
GERONIMO-5418 console navigation tree test fix for console testsuite provided by janel Zhang

Modified:
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/ConsoleRealmTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DeploymentTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/PluginsTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/TestSupport.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/WebServerTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ApacheConfigPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/AssemblyPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/BasicConsoleTestSupport.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CertificationAuthorityPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletAppClientTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEARTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEJBTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletRARTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletSysModulesTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletWARTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConnectorPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CreatePluginPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DBViewerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DeploymentPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DerbyLogViewerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ImportExportPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/InternalDBPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSBrokerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSConnectorPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcePortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMXManagerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JavaSystemInfoPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/KeystoresPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LinkCheckTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogManagerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogViewerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RepositoryViewPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RunSQLPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEGroupsPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEUsersPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SecurityRealmPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerInfoPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerManagerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SimpleLoginTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ThreadPoolPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebAccessLogViewerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebManagerPortletTest.java
    geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WelcomePortletTest.java
    geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/ExtendedSelenium.java
    geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/ConsoleRealmTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/ConsoleRealmTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/ConsoleRealmTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/ConsoleRealmTest.java Thu Jul 15 03:37:05 2010
@@ -27,6 +27,7 @@ import org.testng.annotations.Test;
 public class ConsoleRealmTest extends TestSupport {
     @Test
     public void testNewUser() throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Security"));
         selenium.click("link=Users and Groups");
         waitForPageLoad();
         selenium.click("link=Create New User");
@@ -36,18 +37,23 @@ public class ConsoleRealmTest extends Te
         selenium.type("confirm-password", "myuser");
         selenium.click("//input[@value='Add']");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("myuser"));
         selenium.click("//a[@onclick=\"return confirm('Confirm Delete user myuser?');\"]");
         waitForPageLoad();
         assertTrue(selenium.getConfirmation().matches("^Confirm Delete user myuser[\\s\\S]$"));
         waitForPageLoad();
         assertFalse(selenium.isTextPresent("myuser"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 
     @Test
-    public void testNewGroup() throws Exception {
+     public void testNewGroup() throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Security"));
         selenium.click("link=Users and Groups");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         selenium.click("link=Create New Group");
         waitForPageLoad();
         selenium.type("group", "mygroup");
@@ -58,6 +64,8 @@ public class ConsoleRealmTest extends Te
         waitForPageLoad();
         assertTrue(selenium.getConfirmation().matches("^Confirm Delete group mygroup[\\s\\S]$"));
         waitForPageLoad();
-        assertFalse(selenium.isTextPresent("mygroup"));
+        assertFalse(selenium.isTextPresent("mygroup"));    //return to main window
+        selenium.selectWindow("null");
+        
     }
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java Thu Jul 15 03:37:05 2010
@@ -27,8 +27,10 @@ import org.testng.annotations.Test;
 public class DBManagerTest extends TestSupport {
     @Test
     public void testNewDB() throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Embedded DB"));
         selenium.click("link=DB Manager");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         selenium.type("createDB", "MyUniqueDB");
         selenium.click("//input[@value = 'Create']");
         waitForPageLoad();
@@ -39,6 +41,7 @@ public class DBManagerTest extends TestS
         waitForPageLoad();
         //selenium.click("link=Application");
         selenium.click("//a[contains(@href, 'db=MyUniqueDB')]");
+        
         waitForPageLoad();
         assertTrue(selenium.isTextPresent("MYTABLE"));
         selenium.select("deleteDB", "label=MyUniqueDB");
@@ -47,16 +50,22 @@ public class DBManagerTest extends TestS
         assertTrue(selenium.getConfirmation().matches("^Are you sure you want to delete this database[\\s\\S]$"));
         waitForPageLoad();
         assertTrue(selenium.isTextPresent("Database deleted: MyUniqueDB"));
+        //return to main window
+        selenium.selectWindow("null");
     }
     
     @Test
     public void testRunSQL() throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Embedded DB"));
         selenium.click("link=DB Manager");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         selenium.select("useDB", "label=SystemDatabase");
         selenium.type("sqlStmts", "select * from SYS.SYSDEPENDS;");
         selenium.click("//input[@value = 'Run SQL']");
         waitForPageLoad();
         assertTrue(selenium.isTextPresent("SQL command(s) executed successfully"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java Thu Jul 15 03:37:05 2010
@@ -29,7 +29,7 @@ public class DatabasePoolTest extends Te
     public void testNewDBPool() throws Exception {
         String geronimoVersion = System.getProperty("geronimoVersion");
         assertNotNull(geronimoVersion);
-        
+        selenium.click(getNavigationTreeNodeLocation("Services"));
         selenium.click("link=Database Pools");
         waitForPageLoad();
         selenium.click("link=Using the Geronimo database pool wizard");
@@ -42,21 +42,28 @@ public class DatabasePoolTest extends Te
         selenium.type("property-DatabaseName", "SystemDatabase");
         selenium.click("//input[@value='Deploy']");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("UniquePool"));
         selenium.click("//tr[td[1] = 'UniquePool']/td[4]/a[3]");
         waitForPageLoad();
         assertFalse(selenium.isTextPresent("UniquePool"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 
     @Test
     public void testRunSQLDS() throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Services"));
         selenium.click("link=Database Pools");
         waitForPageLoad();
         selenium.select("useDB", "label=SystemDatasource");
         selenium.type("sqlStmts", "select * from SYS.SYSDEPENDS;");
         selenium.click("//input[@value = 'Run SQL']");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("SQL command(s) executed successfully"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 
     /*

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DeploymentTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DeploymentTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DeploymentTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DeploymentTest.java Thu Jul 15 03:37:05 2010
@@ -27,10 +27,14 @@ import org.testng.annotations.Test;
 public class DeploymentTest extends TestSupport {
     @Test
     public void testEmptyDeployment() throws Exception {
+      	selenium.click(getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=Deployer");
         waitForPageLoad();
         selenium.click("//input[@value='Install']");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("The application was not deployed"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcesTest.java Thu Jul 15 03:37:05 2010
@@ -27,6 +27,7 @@ import org.testng.annotations.Test;
 public class JMSResourcesTest extends TestSupport {
     @Test
     public void testNewJMSResource() throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Services"));
         selenium.click("link=JMS Resources");
         waitForPageLoad();
         selenium.click("link=For ActiveMQ");
@@ -52,8 +53,12 @@ public class JMSResourcesTest extends Te
         waitForPageLoad();
         selenium.click("//input[@value='Deploy Now']");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("UniqueName (console.jms/UniqueName/1.0/car)"));
+       //return to main window
+        selenium.selectWindow("null");
         selenium.open("/console");
+        selenium.click(getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=J2EE Connectors");
         waitForPageLoad();
         selenium.click("link=Uninstall"); 
@@ -63,7 +68,10 @@ public class JMSResourcesTest extends Te
         selenium.open("/console");
         selenium.click("link=JMS Resources");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertFalse(selenium.isTextPresent("UniqueName (console.jms/UniqueName/1.0/car)"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 
     private boolean waitForButton() throws InterruptedException {

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/PluginsTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/PluginsTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/PluginsTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/PluginsTest.java Thu Jul 15 03:37:05 2010
@@ -30,20 +30,23 @@ public class PluginsTest extends TestSup
         String link = "http://geronimo-server:8080/plugin/maven-repo/";
         String actualLink = "http://localhost:8080/plugin/maven-repo/";
         String updatedLink = "http://geronimo.apache.org/plugins/geronimo-";
-            
+        selenium.click(getNavigationTreeNodeLocation("Applications")); 
         selenium.click("link=Plugins");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent(link));
         
         selenium.click("link=Update Repository List");
         waitForPageLoad();
         assertTrue(selenium.isTextPresent(updatedLink));        
-        
+        //return to main window
+        selenium.selectWindow("null");
         selenium.open("/console");
         selenium.click("link=Plugins");
         waitForPageLoad();
         selenium.click("link=Add repository");
         waitForPageLoad();
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent(link));
                     
         selenium.type("newRepository", actualLink);
@@ -66,5 +69,7 @@ public class PluginsTest extends TestSup
         waitForPageLoad();
         
         assertTrue(selenium.isTextPresent("Geronimo-Versions"));
+      //return to main window
+        selenium.selectWindow("null");
     }
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/TestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/TestSupport.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/TestSupport.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/TestSupport.java Thu Jul 15 03:37:05 2010
@@ -19,6 +19,9 @@
 
 package org.apache.geronimo.testsuite.console;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.geronimo.testsupport.console.ConsoleTestSupport;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
@@ -40,4 +43,27 @@ public class TestSupport
     public void signOut() throws Exception {
         logout();
     }
+    protected String getNavigationTreeNodeLocation(String navigationTreeLabel){
+    	//map label to id according to treeData
+		Map<String,Integer> navigationTreeLabel2Index=new HashMap<String,Integer>();
+		navigationTreeLabel2Index.put("Welcome",0);
+		navigationTreeLabel2Index.put("Server",1);
+		navigationTreeLabel2Index.put("Services",2);
+		navigationTreeLabel2Index.put("Applications",3);
+		navigationTreeLabel2Index.put("Security",4);
+		navigationTreeLabel2Index.put("Debug Views",5);
+		navigationTreeLabel2Index.put("Embedded DB",6);
+		//get tree node id dynamicly 
+		String script=" var navigationTree=this.browserbot.getCurrentWindow().dijit.byId('navigationTree');";
+	 	script=script+"var wrapperNode =navigationTree._itemNodesMap["+navigationTreeLabel2Index.get(navigationTreeLabel).intValue()+"];";
+	 	script+="wrapperNode[0].id;";
+	 	String navigationTreeNodeId=selenium.getEval(script);
+	 	
+	 	//collapse the tree node 
+	 	script=" var navigationTree=this.browserbot.getCurrentWindow().dijit.byId('navigationTree');";
+	 	script=script+"var wrapperNode =navigationTree._itemNodesMap["+navigationTreeLabel2Index.get(navigationTreeLabel).intValue()+"];";
+	 	script+="navigationTree._collapseNode(wrapperNode[0]);";
+		selenium.getEval(script);
+        return "xpath=//div[@id='"+navigationTreeNodeId+"']/div[1]/img";
+	}
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/WebServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/WebServerTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/WebServerTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/WebServerTest.java Thu Jul 15 03:37:05 2010
@@ -36,6 +36,8 @@ public class WebServerTest
         addConnector(name, 8081);
         
         deleteConnector(name);
+      //return to main window
+        selenium.selectWindow("null");
     }
 
     @Test
@@ -62,6 +64,8 @@ public class WebServerTest
         assertTrue(selenium.isTextPresent("8009"));
 
         deleteConnector(name);
+      //return to main window
+        selenium.selectWindow("null");
     }
     
     @Test
@@ -80,12 +84,16 @@ public class WebServerTest
         assertEquals("running", selenium.getText(connectorSelector + "/td[4]"));
 
         deleteConnector(name);
+        //return to main window
+        selenium.selectWindow("null");
     }
 
     private void addConnector(String name, int port) throws Exception {
+    	selenium.click(getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Web Server");
         waitForPageLoad();
         String container = JETTY;
+        selenium.selectFrame("index=0");
         if (selenium.isTextPresent(TOMCAT)) {
             container = TOMCAT;
         }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ApacheConfigPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ApacheConfigPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ApacheConfigPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ApacheConfigPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ApacheConfigPortletTest
 {
     @Test
     public void testApacheConfigLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Apache HTTP");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/AssemblyPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/AssemblyPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/AssemblyPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/AssemblyPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class AssemblyPortletTest
 {
     @Test
     public void testAssemblyLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=Plugins");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/BasicConsoleTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/BasicConsoleTestSupport.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/BasicConsoleTestSupport.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/BasicConsoleTestSupport.java Thu Jul 15 03:37:05 2010
@@ -19,6 +19,9 @@
 
 package org.apache.geronimo.testsuite.console;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.geronimo.testsupport.console.ConsoleTestSupport;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
@@ -50,5 +53,28 @@ public class BasicConsoleTestSupport ext
     protected String getPortletHelpLocation(int index) {
         return "xpath=//div[@class = 'portlet'][" + index + "]/div/a[contains(@title, 'Help')]";
     }
-
+    
+	protected String getNavigationTreeNodeLocation(String navigationTreeLabel){
+		//map label to id according to treeData
+		Map<String,Integer> navigationTreeLabel2Index=new HashMap<String,Integer>();
+		navigationTreeLabel2Index.put("Welcome",0);
+		navigationTreeLabel2Index.put("Server",1);
+		navigationTreeLabel2Index.put("Services",2);
+		navigationTreeLabel2Index.put("Applications",3);
+		navigationTreeLabel2Index.put("Security",4);
+		navigationTreeLabel2Index.put("Debug Views",5);
+		navigationTreeLabel2Index.put("Embedded DB",6);
+		//get tree node id dynamicly 
+		String script=" var navigationTree=this.browserbot.getCurrentWindow().dijit.byId('navigationTree');";
+	 	script=script+"var wrapperNode =navigationTree._itemNodesMap["+navigationTreeLabel2Index.get(navigationTreeLabel).intValue()+"];";
+	 	script+="wrapperNode[0].id;";
+	 	String navigationTreeNodeId=selenium.getEval(script);
+	 	
+	 	//collapse the tree node 
+	 	script=" var navigationTree=this.browserbot.getCurrentWindow().dijit.byId('navigationTree');";
+	 	script=script+"var wrapperNode =navigationTree._itemNodesMap["+navigationTreeLabel2Index.get(navigationTreeLabel).intValue()+"];";
+	 	script+="navigationTree._collapseNode(wrapperNode[0]);";
+		selenium.getEval(script);
+        return "xpath=//div[@id='"+navigationTreeNodeId+"']/div[1]/img";
+	}
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CertificationAuthorityPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CertificationAuthorityPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CertificationAuthorityPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CertificationAuthorityPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class CertificationAuthorityPortl
 {
     @Test
     public void testCertificationAuthorityLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Security"));
         selenium.click("link=Certificate Authority");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletAppClientTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletAppClientTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletAppClientTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletAppClientTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,8 @@ public class ConfigManagerPortletAppClie
 {
     @Test
     public void testConfigManagerAppClientLink() throws Exception {
+    	
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=App Clients");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEARTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEARTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEARTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEARTest.java Thu Jul 15 03:37:05 2010
@@ -31,10 +31,11 @@ public class ConfigManagerPortletEARTest
 {
     @Test
     public void testConfigManagerEARLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=Application EARs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());
         assertEquals("Installed Application EARs", 
-                     selenium.getText(getPortletTitleLocation())); 
+        selenium.getText(getPortletTitleLocation())); 
     }
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEJBTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEJBTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEJBTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletEJBTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ConfigManagerPortletEJBTest
 {
     @Test
     public void testConfigManagerEJBLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=EJB JARs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletRARTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletRARTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletRARTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletRARTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ConfigManagerPortletRARTest
 {
     @Test
     public void testConfigManagerRARLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=J2EE Connectors");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletSysModulesTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletSysModulesTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletSysModulesTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletSysModulesTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ConfigManagerPortletSysModu
 {
     @Test
     public void testConfigManagerSysModulesLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=System Modules");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletWARTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletWARTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletWARTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConfigManagerPortletWARTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ConfigManagerPortletWARTest
 {
     @Test
     public void testConfigManagerWARLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=Web App WARs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConnectorPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConnectorPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConnectorPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ConnectorPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ConnectorPortletTest
 {
     @Test
     public void testConnectorLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Web Server");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CreatePluginPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CreatePluginPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CreatePluginPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/CreatePluginPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class CreatePluginPortletTest
 {
     @Test
     public void testCreatePluginLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=Plugins");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DBViewerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DBViewerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DBViewerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DBViewerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class DBViewerPortletTest
 {
     @Test
     public void testDBViewerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Embedded DB"));
         selenium.click("link=DB Manager");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class DatabasePoolPortletTest
 {
     @Test
     public void testDatabasePoolLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Services"));
         selenium.click("link=Database Pools");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DeploymentPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DeploymentPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DeploymentPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DeploymentPortletTest.java Thu Jul 15 03:37:05 2010
@@ -30,7 +30,8 @@ public class DeploymentPortletTest
     extends BasicConsoleTestSupport
 {
     @Test
-    public void testDeploymentLink() throws Exception {        
+    public void testDeploymentLink() throws Exception {  
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
     	selenium.click("link=Deployer");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DerbyLogViewerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DerbyLogViewerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DerbyLogViewerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/DerbyLogViewerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class DerbyLogViewerPortletTest
 {
     @Test
     public void testDerbyLogViewerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Server Logs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ImportExportPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ImportExportPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ImportExportPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ImportExportPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ImportExportPortletTest
 {
     @Test
     public void testImportExportLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Applications"));
         selenium.click("link=Plugins");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/InternalDBPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/InternalDBPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/InternalDBPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/InternalDBPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class InternalDBPortletTest
 {
     @Test
     public void testInternalDBLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Embedded DB"));
         selenium.click("link=DB Info");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSBrokerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSBrokerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSBrokerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSBrokerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class JMSBrokerPortletTest
 {
     @Test
     public void testJMSBrokerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=JMS Server");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSConnectorPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSConnectorPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSConnectorPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSConnectorPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class JMSConnectorPortletTest
 {
     @Test
     public void testJMSConnectorLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=JMS Server");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcePortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcePortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcePortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMSResourcePortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class JMSResourcePortletTest
 {
     @Test
     public void testJMSResourceLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Services"));
         selenium.click("link=JMS Resources");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMXManagerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMXManagerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMXManagerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JMXManagerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class JMXManagerPortletTest
 {
     @Test
     public void testJMXManagerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Debug Views"));
         selenium.click("link=JMX Viewer");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JavaSystemInfoPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JavaSystemInfoPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JavaSystemInfoPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/JavaSystemInfoPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class JavaSystemInfoPortletTest
 {
     @Test
     public void testJavaSystemInfoLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Java System Info");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/KeystoresPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/KeystoresPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/KeystoresPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/KeystoresPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class KeystoresPortletTest
 {
     @Test
     public void testKeystoresLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Security"));
         selenium.click("link=Keystores");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LinkCheckTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LinkCheckTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LinkCheckTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LinkCheckTest.java Thu Jul 15 03:37:05 2010
@@ -29,16 +29,19 @@ public class LinkCheckTest
 {
     @Test
     public void testServerInfoLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Information");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());
-        
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("Version"));
         assertTrue(selenium.isTextPresent("Start Time"));
         assertTrue(selenium.isTextPresent("Up Time"));
         
         assertEquals("Server Info", 
                      selenium.getText(getPortletTitleLocation())); 
+        //return to main window
+        selenium.selectWindow("null");
     }
 }
 

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogManagerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogManagerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogManagerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogManagerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class LogManagerPortletTest
 {
     @Test
     public void testLogManagerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Server Logs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogViewerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogViewerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogViewerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/LogViewerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class LogViewerPortletTest
 {
     @Test
     public void testLogViewerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Server Logs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RepositoryViewPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RepositoryViewPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RepositoryViewPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RepositoryViewPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class RepositoryViewPortletTest
 {
     @Test
     public void testRepositoryViewLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Services"));
         selenium.click("link=Repository");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RunSQLPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RunSQLPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RunSQLPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/RunSQLPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class RunSQLPortletTest
 {
     @Test
     public void testRunSQLLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Embedded DB"));
         selenium.click("link=DB Manager");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEGroupsPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEGroupsPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEGroupsPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEGroupsPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class SEGroupsPortletTest
 {
     @Test
     public void testSEGroupsLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Security"));
         selenium.click("link=Users and Groups");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEUsersPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEUsersPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEUsersPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SEUsersPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class SEUsersPortletTest
 {
     @Test
     public void testSEUsersLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Security"));
         selenium.click("link=Users and Groups");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SecurityRealmPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SecurityRealmPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SecurityRealmPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SecurityRealmPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,11 +31,16 @@ public class SecurityRealmPortletTest
 {
     @Test
     public void testSecurityRealmLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Security"));
+        //selenium.setSpeed("5000");
         selenium.click("link=Security Realms");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());
         assertEquals("Security Realms", 
                      selenium.getText(getPortletTitleLocation())); 
+        selenium.selectFrame("index=0");
         assertTrue(selenium.isTextPresent("geronimo-admin"));
+        //return to main window
+        selenium.selectWindow("null");
     }
 }

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerInfoPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerInfoPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerInfoPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerInfoPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ServerInfoPortletTest
 {
     @Test
     public void testServerInfoLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Information");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerManagerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerManagerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerManagerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ServerManagerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ServerManagerPortletTest
 {
     @Test
     public void testServerManagerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Shutdown");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SimpleLoginTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SimpleLoginTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SimpleLoginTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/SimpleLoginTest.java Thu Jul 15 03:37:05 2010
@@ -21,7 +21,6 @@ package org.apache.geronimo.testsuite.co
 
 import org.testng.annotations.Test;
 import org.apache.geronimo.testsupport.console.ConsoleTestSupport;
-
 /**
  * @version $Rev$ $Date$
  */
@@ -34,21 +33,25 @@ public class SimpleLoginTest
         logout();
     }
     
-    @Test(dependsOnMethods = { "testLoginAndLogout" })
+  //  @Test(dependsOnMethods = { "testLoginAndLogout" })
+    @Test
     public void testClickSomeLinks() throws Exception {
         try {
+        	login();
+            logout();
             login();
-            
+            selenium.click(new BasicConsoleTestSupport().getNavigationTreeNodeLocation("Server"));
             selenium.click("link=Information");
             waitForPageLoad();            
             assertEquals("Geronimo Console", selenium.getTitle());
             
-            selenium.open("/console");
+           // selenium.open("/console");
             selenium.click("link=Java System Info");
             waitForPageLoad();
             assertEquals("Geronimo Console", selenium.getTitle());
             
-            selenium.open("/console");
+            //selenium.open("/console");
+            selenium.click(new BasicConsoleTestSupport().getNavigationTreeNodeLocation("Embedded DB"));
             selenium.click("link=DB Info");
             waitForPageLoad();
             assertEquals("Geronimo Console", selenium.getTitle());            

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ThreadPoolPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ThreadPoolPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ThreadPoolPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/ThreadPoolPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class ThreadPoolPortletTest
 {
     @Test
     public void testThreadPoolLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Thread Pools");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebAccessLogViewerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebAccessLogViewerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebAccessLogViewerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebAccessLogViewerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class WebAccessLogViewerPortletTe
 {
     @Test
     public void testWebAccessLogViewerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Server Logs");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebManagerPortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebManagerPortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebManagerPortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WebManagerPortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class WebManagerPortletTest
 {
     @Test
     public void testWebManagerLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Web Server");
         waitForPageLoad();
         assertEquals("Geronimo Console", selenium.getTitle());

Modified: geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WelcomePortletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WelcomePortletTest.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WelcomePortletTest.java (original)
+++ geronimo/server/branches/2.2/testsuite/console-testsuite/basic/src/test/java/org/apache/geronimo/testsuite/console/WelcomePortletTest.java Thu Jul 15 03:37:05 2010
@@ -31,6 +31,7 @@ public class WelcomePortletTest
 {
     @Test
     public void testWelcomeLink() throws Exception {
+    	selenium.click(this.getNavigationTreeNodeLocation("Server"));
         selenium.click("link=Java System Info");
         waitForPageLoad();
         selenium.open("/console");

Modified: geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/ExtendedSelenium.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/ExtendedSelenium.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/ExtendedSelenium.java (original)
+++ geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/ExtendedSelenium.java Thu Jul 15 03:37:05 2010
@@ -21,10 +21,8 @@ package org.apache.geronimo.testsupport;
 
 import com.thoughtworks.selenium.Selenium;
 import com.thoughtworks.selenium.DefaultSelenium;
-import com.thoughtworks.selenium.SeleniumException;
 
 import org.openqa.selenium.server.SeleniumServer;
-import org.apache.geronimo.testsupport.console.ConsoleTestSupport;
 
 /**
  * Provides custom extentions to Selenium.
@@ -50,23 +48,4 @@ public class ExtendedSelenium
     public void removeCookie(final String name, final String path) {
         this.getEval("selenium.removeCookie('" + name + "', '" + path + "')");
     }
-    
-    // Override click method in order to add link verification logic for geronimo console specifically.
-    @Override
-    public void click(String locator){
-    	try {
-    		super.click(locator);
-    	} catch (SeleniumException se){
-    		if (se.getMessage().lastIndexOf("not found") > 0){
-    			String linkKey = locator;
-    			if (ConsoleTestSupport.link2URL.containsKey(linkKey)) {
-    				super.open(ConsoleTestSupport.link2URL.get(linkKey).toString());
-    			} else {
-    				throw se;
-    			}
-    		} else {
-    			throw se;
-    		}
-    	}
-    }
 }

Modified: geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java?rev=964294&r1=964293&r2=964294&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java (original)
+++ geronimo/server/branches/2.2/testsupport/testsupport-selenium/src/main/java/org/apache/geronimo/testsupport/console/ConsoleTestSupport.java Thu Jul 15 03:37:05 2010
@@ -32,54 +32,6 @@ import org.apache.geronimo.testsupport.S
 public abstract class ConsoleTestSupport
     extends SeleniumTestSupport
 {
-	// Setup a link map in order to get right url when the link is not found.
-	public static final Map<String,String> link2URL;
-	static {
-		link2URL = new HashMap<String,String>();
-		link2URL.put("link=Welcome", "/console/portal/0/Welcome");
-		// under server
-		link2URL.put("link=Information", "/console/portal/1-1/Server/Information");
-		link2URL.put("link=Java System Info", "/console/portal/1-2/Server/Java System Info");
-		link2URL.put("link=Server Logs", "/console/portal/1-3/Server/Server Logs");
-		link2URL.put("link=Shutdown", "/console/portal/1-4/Server/Shutdown");
-		link2URL.put("link=Web Server", "/console/portal/1-5/Server/Web Server");
-		link2URL.put("link=Thread Pools", "/console/portal/1-6/Server/Thread Pools");
-		link2URL.put("link=Apache HTTP", "/console/portal/1-7/Server/Apache HTTP");
-		link2URL.put("link=Monitoring", "/console/portal/1-8/Server/Monitoring");
-		link2URL.put("link=JAR Aliases", "/console/portal/1-9/Server/JAR Aliases");
-		link2URL.put("link=JMS Server", "/console/portal/1-10/Server/JMS Server");
-		link2URL.put("link=EJB Server", "/console/portal/1-11/Server/EJB Server");
-		// under services
-		link2URL.put("link=Repository", "/console/portal/2-1/Services/Repository");
-		link2URL.put("link=JMS Resources", "/console/portal/2-2/Services/JMS Resources");
-		link2URL.put("link=Database Pools", "/console/portal/2-3/Services/Database Pools");
-		// under applications
-		link2URL.put("link=Web App WARs", "/console/portal/3-1/Applications/Web App WARs");
-		link2URL.put("link=System Modules", "/console/portal/3-2/Applications/System Modules");
-		link2URL.put("link=Application EARs", "/console/portal/3-3/Applications/Application EARs");
-		link2URL.put("link=EJB JARs", "/console/portal/3-4/Applications/EJB JARs");
-		link2URL.put("link=J2EE Connectors","/console/portal/3-5/Applications/J2EE Connectors");
-		link2URL.put("link=App Clients", "/console/portal/3-6/Applications/App Clients");
-		link2URL.put("link=Plan Creator", "/console/portal/3-7/Applications/Plan Creator");
-		link2URL.put("link=Deployer", "/console/portal/3-8/Applications/Deploy New");
-		link2URL.put("link=Plugins", "/console/portal/3-9/Applications/Plugins");
-		// under security
-		link2URL.put("link=Users and Groups", "/console/portal/4-1/Security/Users and Groups");
-		link2URL.put("link=Keystores", "/console/portal/4-2/Security/Keystores");
-		link2URL.put("link=Certificate Authority", "/console/portal/4-3/Security/Certificate Authority");
-		link2URL.put("link=Security Realms", "/console/portal/4-4/Security/Security Realms");
-		// under debug views
-		link2URL.put("link=JMX Viewer", "/console/portal/5-1/Debug Views/JMX Viewer");
-		link2URL.put("link=LDAP Viewer", "/console/portal/5-2/Debug Views/LDAP Viewer");
-		link2URL.put("link=ClassLoader Viewer", "/console/portal/5-3/Debug Views/ClassLoader Viewer");
-		link2URL.put("link=JNDI Viewer", "/console/portal/5-4/Debug Views/JNDI Viewer");
-		link2URL.put("link=Dependency Viewer", "/console/portal/5-5/Debug Views/Dependency Viewer");
-		// under Embedded DB
-		link2URL.put("link=DB Info", "/console/portal/6-1/Embedded DB/DB Info");
-		link2URL.put("link=DB Manager", "/console/portal/6-2/Embedded DB/DB Manager");
-		link2URL.put("link=Derby Logs", "/console/portal/6-3/Embedded DB/Derby Logs");
-		
-	}
     protected void login() throws Exception {    	
         selenium.open("/");              
         assertEquals("Apache Geronimo", selenium.getTitle());
@@ -103,5 +55,4 @@ public abstract class ConsoleTestSupport
         
         //selenium.removeCookie("JSESSIONID", "/");
     }
-}
-
+}
\ No newline at end of file



Mime
View raw message