directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r888757 - /directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ApacheDSPluginTest.java
Date Wed, 09 Dec 2009 10:19:22 GMT
Author: pamarcelot
Date: Wed Dec  9 10:19:21 2009
New Revision: 888757

URL: http://svn.apache.org/viewvc?rev=888757&view=rev
Log:
Added another UI Unit Test.

Modified:
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ApacheDSPluginTest.java

Modified: directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ApacheDSPluginTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ApacheDSPluginTest.java?rev=888757&r1=888756&r2=888757&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ApacheDSPluginTest.java
(original)
+++ directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ApacheDSPluginTest.java
Wed Dec  9 10:19:21 2009
@@ -65,7 +65,7 @@
      * </ul>
      */
     @Test
-    public void serverCreationAndDeletion()
+    public void serverCreationStartStopAndDeletion()
     {
         // Showing view
         serversViewBot.show();
@@ -114,6 +114,70 @@
 
 
     /**
+     * Verifies that the 'New Server' does not allow the creation of 
+     * 2 servers with the same name.
+     */
+    @Test
+    public void verifyServerNameCollisionInNewWizard()
+    {
+        // Showing view
+        serversViewBot.show();
+
+        // Verifying the servers count is 0
+        assertEquals( 0, getCoreServersCount() );
+        assertEquals( 0, serversViewBot.getServersCount() );
+
+        // Opening wizard
+        NewApacheDSServerWizardBot wizardBot = serversViewBot.openNewServerWizard();
+
+        // Verifying the wizard can't be finished yet
+        assertFalse( wizardBot.isFinishButtonEnabled() );
+
+        // Filling fields of the wizard
+        String serverName = "NewServerWizardTest";
+        wizardBot.typeServerName( serverName );
+
+        // Verifying the wizard can now be finished
+        assertTrue( wizardBot.isFinishButtonEnabled() );
+
+        // Closing wizard
+        wizardBot.clickFinishButton();
+        serversViewBot.waitForServer( serverName );
+
+        // Verifying the servers count is now 1
+        assertEquals( 1, getCoreServersCount() );
+        assertEquals( 1, serversViewBot.getServersCount() );
+
+        // Opening wizard
+        wizardBot = serversViewBot.openNewServerWizard();
+
+        // Verifying the wizard can't be finished yet
+        assertFalse( wizardBot.isFinishButtonEnabled() );
+
+        // Filling fields of the wizard
+        wizardBot.typeServerName( serverName );
+
+        // Verifying the wizard can't be finished (because a server with
+        // same name already exists)
+        assertFalse( wizardBot.isFinishButtonEnabled() );
+
+        // Canceling wizard
+        wizardBot.clickCancelButton();
+
+        // Selecting the server row
+        serversViewBot.selectServer( serverName );
+
+        // Deleting the server
+        DeleteDialogBot deleteDialogBot = serversViewBot.openDeleteServerDialog();
+        deleteDialogBot.clickOkButton();
+
+        // Verifying the servers count is back to 0
+        assertEquals( 0, getCoreServersCount() );
+        assertEquals( 0, serversViewBot.getServersCount() );
+    }
+
+
+    /**
      * Gets the servers count found in the core of the plugin.
      *
      * @return



Mime
View raw message