directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1804081 [6/6] - in /directory/studio/branches/studio-value: ./ dist/ eclipse-trgt-platform/template/ features/apacheds.feature/ features/ldapbrowser.feature/ features/ldifeditor.feature/ features/nls.feature/ features/openldap.feature/ fea...
Date Fri, 04 Aug 2017 08:59:17 GMT
Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java
Fri Aug  4 08:59:15 2017
@@ -20,9 +20,13 @@
 package org.apache.directory.studio.test.integration.ui.bots;
 
 
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.test.integration.ui.bots.utils.JobWatcher;
+import org.apache.mina.util.AvailablePortFinder;
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotMultiPageEditor;
 import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
 
 
 public class ApacheDSConfigurationEditorBot
@@ -54,37 +58,183 @@ public class ApacheDSConfigurationEditor
     }
 
 
+    public void setAvailablePorts()
+    {
+        int port = 1023;
+
+        if ( isLdapServerEnabled() )
+        {
+            port = AvailablePortFinder.getNextAvailable( port + 1 );
+            setLdapPort( port );
+        }
+        if ( isLdapsServerEnabled() )
+        {
+            port = AvailablePortFinder.getNextAvailable( port + 1 );
+            setLdapsPort( port );
+        }
+        if ( isKerberosServerEnabled() )
+        {
+            port = AvailablePortFinder.getNextAvailable( port + 1 );
+            setKerberosPort( port );
+        }
+
+    }
+
+
+    public boolean isLdapServerEnabled()
+    {
+        activateLdapLdapsServersPage();
+        return editor.bot().checkBox( 0 ).isChecked();
+    }
+
+
     public void setLdapPort( int port )
     {
-        editor.activatePage( "LDAP/LDAPS Servers" );
+        activateLdapLdapsServersPage();
         editor.bot().text( 0 ).setText( "" + port );
     }
 
 
     public int getLdapPort()
     {
-        editor.activatePage( "LDAP/LDAPS Servers" );
+        activateLdapLdapsServersPage();
         return Integer.parseInt( editor.bot().text( 0 ).getText() );
     }
 
 
+    public void setLdapAddress( String address )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 1 ).setText( address );
+    }
+
+
+    public boolean isLdapsServerEnabled()
+    {
+        activateLdapLdapsServersPage();
+        return editor.bot().checkBox( 1 ).isChecked();
+    }
+
+
     public void setLdapsPort( int port )
     {
-        editor.activatePage( "LDAP/LDAPS Servers" );
+        activateLdapLdapsServersPage();
         editor.bot().text( 4 ).setText( "" + port );
     }
 
 
     public int getLdapsPort()
     {
-        editor.activatePage( "LDAP/LDAPS Servers" );
+        activateLdapLdapsServersPage();
         return Integer.parseInt( editor.bot().text( 4 ).getText() );
     }
 
 
+    public void setLdapsAddress( String address )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 5 ).setText( address );
+    }
+
+
+    public void setKeystore( String keyStoreFilePath, String keyStorePassword )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 11 ).setText( keyStoreFilePath );
+        editor.bot().text( 12 ).setText( keyStorePassword );
+    }
+
+
+    public void setSaslHost( String saslHost )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 17 ).setText( saslHost );
+    }
+
+
+    public void setSaslPrincipal( String saslPrincipal )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 18 ).setText( saslPrincipal );
+    }
+
+
+    public void setSaslSearchBase( String saslSearchBase )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 19 ).setText( saslSearchBase );
+    }
+
+
+    public void enableKerberosServer()
+    {
+        activateKerberosServerPage();
+        editor.bot().checkBox( 0 ).select();
+    }
+
+
+    public boolean isKerberosServerEnabled()
+    {
+        activateKerberosServerPage();
+        return editor.bot().checkBox( 0 ).isChecked();
+    }
+
+
+    public void setKerberosPort( int port )
+    {
+        activateKerberosServerPage();
+        editor.bot().text( 0 ).setText( "" + port );
+    }
+
+
+    public void setKerberosAddress( String address )
+    {
+        activateKerberosServerPage();
+        editor.bot().text( 1 ).setText( address );
+    }
+
+
+    public int getKerberosPort()
+    {
+        activateKerberosServerPage();
+        return Integer.parseInt( editor.bot().text( 0 ).getText() );
+    }
+
+
+    public void setKdcRealm( String kdcRealm )
+    {
+        activateKerberosServerPage();
+        editor.bot().text( 4 ).setText( kdcRealm );
+    }
+
+
+    public void setKdcSearchBase( String kdcSearchBase )
+    {
+        activateKerberosServerPage();
+        editor.bot().text( 5 ).setText( kdcSearchBase );
+    }
+
+
+    public void setRequirePreAuthenticationByEncryptedTimestamp( boolean enable )
+    {
+        activateKerberosServerPage();
+        SWTBotCheckBox checkBox = editor.bot().checkBox( 5 );
+        if ( enable )
+        {
+            checkBox.select();
+        }
+        else
+        {
+            checkBox.deselect();
+        }
+    }
+
+
     public void save()
     {
+        JobWatcher watcher = new JobWatcher( "Save Configuration" );
         editor.save();
+        watcher.waitUntilDone();
     }
 
 
@@ -93,4 +243,16 @@ public class ApacheDSConfigurationEditor
         editor.close();
     }
 
+
+    private void activateLdapLdapsServersPage()
+    {
+        editor.activatePage( "LDAP/LDAPS Servers" );
+    }
+
+
+    private void activateKerberosServerPage()
+    {
+        editor.activatePage( "Kerberos Server" );
+    }
+
 }

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSServersViewBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSServersViewBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSServersViewBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSServersViewBot.java
Fri Aug  4 08:59:15 2017
@@ -137,6 +137,19 @@ public class ApacheDSServersViewBot
         selectServer( serverName );
         ContextMenuHelper.clickContextMenu( getServersTree(), "&Run" );
     }
+    
+    
+    /**
+     * Repairs the server associated with the given name.
+     *
+     * @param serverName
+     *      the name of the server
+     */
+    public void repairServer( String serverName )
+    {
+        selectServer( serverName );
+        ContextMenuHelper.clickContextMenu( getServersTree(), "Repair" );
+    }
 
 
     /**
@@ -242,6 +255,9 @@ public class ApacheDSServersViewBot
                 return "Server " + serverName + " not stopped in servers view.";
             }
         }, 30000 );
+
+        // Wait a bit more to avoid unknown race conditions...
+        BotUtils.sleep( 1000 );
     }
 
 

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BotUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BotUtils.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BotUtils.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BotUtils.java
Fri Aug  4 08:59:15 2017
@@ -23,8 +23,11 @@ package org.apache.directory.studio.test
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.directory.ldap.client.api.LdapConnectionConfig;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
 import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 
@@ -70,7 +73,7 @@ public class BotUtils
                     List<String> asList = Arrays.asList( labels );
                     return "Expected a dialog with any label " + asList + " with an 'OK'
button.";
                 }
-            } );
+            }, SWTBotPreferences.TIMEOUT + LdapConnectionConfig.DEFAULT_TIMEOUT );
         }
         finally
         {

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java
Fri Aug  4 08:59:15 2017
@@ -43,6 +43,11 @@ public class BrowserViewBot
     }
 
 
+    public String getSelectedEntry() {
+        return browserBot.getSelectedEntry();
+    }
+
+
     public boolean existsEntry( String... path )
     {
         return browserBot.existsEntry( path );

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java
Fri Aug  4 08:59:15 2017
@@ -113,6 +113,12 @@ class BrowserWidgetBot
     }
 
 
+    String getSelectedEntry()
+    {
+        return getTree().selection().get( 0 ).get( 0 );
+    }
+
+
     private SWTBotTreeItem getEntry( String... path )
     {
         SWTBotTree browserTree = bot.tree();

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateTrustDialogBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateTrustDialogBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateTrustDialogBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateTrustDialogBot.java
Fri Aug  4 08:59:15 2017
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotLabel;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 
 
 public class CertificateTrustDialogBot extends DialogBot
@@ -125,14 +126,15 @@ public class CertificateTrustDialogBot e
 
     public ErrorDialogBot clickOkButtonExpectingErrorDialog()
     {
-        BotUtils.shell( new Runnable()
+        SWTBotShell shell = BotUtils.shell( new Runnable()
         {
             public void run()
             {
                 clickOkButton();
             }
         }, "Error", "Problem Occurred" );
+        String shellText = shell.getText();
 
-        return new ErrorDialogBot();
+        return new ErrorDialogBot(shellText);
     }
 }

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateValidationPreferencePageBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateValidationPreferencePageBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateValidationPreferencePageBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/CertificateValidationPreferencePageBot.java
Fri Aug  4 08:59:15 2017
@@ -31,6 +31,7 @@ public class CertificateValidationPrefer
         super( "Preferences" );
     }
 
+
     public void clickApplyButton()
     {
         super.clickButton( "Apply" );
@@ -61,4 +62,41 @@ public class CertificateValidationPrefer
         }
     }
 
+
+    public void activatePermanentTab()
+    {
+        bot.tabItem( "Permanent Trusted" ).activate();
+    }
+
+
+    public void activateTemporaryTab()
+    {
+        bot.tabItem( "Temporary Trusted" ).activate();
+    }
+
+
+    public int getCertificateCount()
+    {
+        return bot.table().rowCount();
+    }
+
+
+    public void selectCertificate( int index )
+    {
+        bot.table().select( index );
+    }
+
+
+    public CertificateViewerDialogBot clickViewButton()
+    {
+        clickButton( "View..." );
+        return new CertificateViewerDialogBot();
+    }
+
+
+    public void clickRemoveButton()
+    {
+        clickButton( "Remove" );
+    }
+
 }

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
Fri Aug  4 08:59:15 2017
@@ -22,6 +22,8 @@ package org.apache.directory.studio.test
 
 import static org.apache.directory.studio.test.integration.ui.Constants.LOCALHOST;
 
+import java.util.Random;
+
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
@@ -53,7 +55,19 @@ public class ConnectionsViewBot
     public NewConnectionWizardBot openNewConnectionWizard()
     {
         ContextMenuHelper.clickContextMenu( getConnectionsTree(), "New Connection..." );
-        return new NewConnectionWizardBot();
+        NewConnectionWizardBot newConnectionWizardBot = new NewConnectionWizardBot();
+        
+        // choose random network provider to test both, LDAP API and JNDI
+        if ( new Random().nextBoolean() )
+        {
+            newConnectionWizardBot.selectLdapApiProvider();
+        }
+        else
+        {
+            newConnectionWizardBot.selectJndiProvider();
+        }
+
+        return newConnectionWizardBot;
     }
 
 
@@ -156,7 +170,9 @@ public class ConnectionsViewBot
 
         ConnectionManager connectionManager = ConnectionCorePlugin.getDefault().getConnectionManager();
         ConnectionParameter connectionParameter = new ConnectionParameter();
-        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
+        // choose random network provider to test both, LDAP API and JNDI
+        connectionParameter
+            .setNetworkProvider( NetworkProvider.values()[new Random().nextInt( NetworkProvider.values().length
)] );
         connectionParameter.setName( name );
         connectionParameter.setHost( LOCALHOST );
         connectionParameter.setPort( port );

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ErrorDialogBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ErrorDialogBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ErrorDialogBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ErrorDialogBot.java
Fri Aug  4 08:59:15 2017
@@ -25,7 +25,13 @@ public class ErrorDialogBot extends Dial
 
     public ErrorDialogBot()
     {
-        super("Error");
+        this( "Error" );
+    }
+
+
+    public ErrorDialogBot( String title )
+    {
+        super( title );
     }
 
 

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewConnectionWizardBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewConnectionWizardBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewConnectionWizardBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewConnectionWizardBot.java
Fri Aug  4 08:59:15 2017
@@ -34,6 +34,9 @@ public class NewConnectionWizardBot exte
     private static final String CONNECTION_NAME = "Connection name:";
     private static final String HOSTNAME = "Hostname:";
     private static final String PORT = "Port:";
+    private static final String PROVIDER = "Provider:";
+    private static final String JNDI = "JNDI (Java Naming and Directory Interface)";
+    private static final String LDAP_API = "Apache Directory LDAP Client API";
     private static final String CHECK_AUTHENTICATION = "Check Authentication";
     private static final String CHECK_NETWORK_PARAMETER = "Check Network Parameter";
     private static final String BASE_DN = "Base DN:";
@@ -44,6 +47,7 @@ public class NewConnectionWizardBot exte
     private static final String BIND_DN_OR_USER = "Bind DN or user:";
     private static final String CRAM_MD5_SASL = "CRAM-MD5 (SASL)";
     private static final String DIGEST_MD5_SASL = "DIGEST-MD5 (SASL)";
+    private static final String GSS_API_SASL = "GSSAPI (Kerberos)";
     private static final String NO_AUTHENTICATION = "No Authentication";
     private static final String SIMPLE_AUTHENTICATION = "Simple Authentication";
     private static final String AUTHENTICATION_METHOD = "Authentication Method";
@@ -51,19 +55,34 @@ public class NewConnectionWizardBot exte
     private static final String NO_ENCRYPTION = "No Encryption";
     private static final String START_TLS_ENCRYPTION = "Use StartTLS extension";
     private static final String LDAPS_ENCRYPTION = "Use SSL encryption (ldaps://)";
+    private static final String USE_NATIVE_TGT = "Use native TGT";
+    private static final String OBTAIN_TGT_FROM_KDC = "Obtain TGT from KDC (provide username
and password)";
+    private static final String USE_NATIVE_SYSTEM_CONFIG = "Use native system configuration";
+    private static final String USE_CONFIG_FILE = "Use configuration file:";
+    private static final String USE_MANUAL_CONFIG = "Use following configuration:";
+    private static final String KERBEROS_REALM = "Kerberos Realm:";
+    private static final String KDC_HOST = "KDC Host:";
+    private static final String KDC_PORT = "KDC Port:";
+
 
-    
     public NewConnectionWizardBot()
     {
         super( TITLE );
     }
 
-    @Override
-    public void clickFinishButton()
+
+    public void clickFinishButton( boolean waitTillConnectionOpened )
     {
-        JobWatcher watcher = new JobWatcher( BrowserCoreMessages.jobs__open_connections_name_1
);
+        JobWatcher watcher = null;
+        if ( waitTillConnectionOpened )
+        {
+            watcher = new JobWatcher( BrowserCoreMessages.jobs__open_connections_name_1 );
+        }
         super.clickFinishButton();
-        watcher.waitUntilDone();
+        if ( waitTillConnectionOpened )
+        {
+            watcher.waitUntilDone();
+        }
     }
 
 
@@ -88,6 +107,20 @@ public class NewConnectionWizardBot exte
     }
 
 
+    public void selectJndiProvider()
+    {
+        SWTBotCombo providerCombo = bot.comboBoxWithLabel( PROVIDER );
+        providerCombo.setSelection( JNDI );
+    }
+
+
+    public void selectLdapApiProvider()
+    {
+        SWTBotCombo providerCombo = bot.comboBoxWithLabel( PROVIDER );
+        providerCombo.setSelection( LDAP_API );
+    }
+
+
     public boolean isSimpleAuthenticationSelected()
     {
         SWTBotCombo authMethodCombo = bot.comboBoxInGroup( AUTHENTICATION_METHOD );
@@ -144,6 +177,20 @@ public class NewConnectionWizardBot exte
     }
 
 
+    public boolean isGssApiAuthenticationSelected()
+    {
+        SWTBotCombo authMethodCombo = bot.comboBoxInGroup( AUTHENTICATION_METHOD );
+        return GSS_API_SASL.equals( authMethodCombo.selection() );
+    }
+
+
+    public void selectGssApiAuthentication()
+    {
+        SWTBotCombo authMethodCombo = bot.comboBoxInGroup( AUTHENTICATION_METHOD );
+        authMethodCombo.setSelection( GSS_API_SASL );
+    }
+
+
     public boolean isUserEnabled()
     {
         return bot.comboBoxWithLabel( BIND_DN_OR_USER ).isEnabled();
@@ -207,6 +254,102 @@ public class NewConnectionWizardBot exte
     }
 
 
+    public boolean isUseNativeTgtSelected()
+    {
+        return bot.radio( USE_NATIVE_TGT ).isSelected();
+    }
+
+
+    public void selectUseNativeTgt()
+    {
+        bot.radio( USE_NATIVE_TGT ).click();
+    }
+
+
+    public boolean isObtainTgtFromKdcSelected()
+    {
+        return bot.radio( OBTAIN_TGT_FROM_KDC ).isSelected();
+    }
+
+
+    public void selectObtainTgtFromKdc()
+    {
+        bot.radio( OBTAIN_TGT_FROM_KDC ).click();
+    }
+
+
+    public boolean isUseNativeSystemConfigurationSelected()
+    {
+        return bot.radio( USE_NATIVE_SYSTEM_CONFIG ).isSelected();
+    }
+
+
+    public void selectUseNativeSystemConfiguration()
+    {
+        bot.radio( USE_NATIVE_SYSTEM_CONFIG ).click();
+    }
+
+
+    public boolean isUseConfigurationFileSelected()
+    {
+        return bot.radio( USE_CONFIG_FILE ).isSelected();
+    }
+
+
+    public void selectUseConfigurationFile()
+    {
+        bot.radio( USE_CONFIG_FILE ).click();
+    }
+
+
+    public boolean isUseManualConfigurationSelected()
+    {
+        return bot.radio( USE_MANUAL_CONFIG ).isSelected();
+    }
+
+
+    public void selectUseManualConfiguration()
+    {
+        bot.radio( USE_MANUAL_CONFIG ).click();
+    }
+
+
+    public boolean isKerberosRealmEnabled()
+    {
+        return bot.textWithLabel( KERBEROS_REALM ).isEnabled();
+    }
+
+
+    public void typeKerberosRealm( String realm )
+    {
+        bot.textWithLabel( KERBEROS_REALM ).setText( realm );
+    }
+
+
+    public boolean isKdcHostEnabled()
+    {
+        return bot.textWithLabel( KDC_HOST ).isEnabled();
+    }
+
+
+    public void typeKdcHost( String host )
+    {
+        bot.textWithLabel( KDC_HOST ).setText( host );
+    }
+
+
+    public boolean isKdcPortEnabled()
+    {
+        return bot.textWithLabel( KDC_PORT ).isEnabled();
+    }
+
+
+    public void typeKdcPort( int port )
+    {
+        bot.textWithLabel( KDC_PORT ).setText( Integer.toString( port ) );
+    }
+
+
     public boolean isGetBaseDnsFromRootDseEnabled()
     {
         return bot.checkBox( GET_BASE_DNS_FROM_ROOT_DSE ).isEnabled();

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ReferralDialogBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ReferralDialogBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ReferralDialogBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ReferralDialogBot.java
Fri Aug  4 08:59:15 2017
@@ -45,12 +45,14 @@ public class ReferralDialogBot extends D
 
     public void selectConnection( String connectionName )
     {
+        activate();
         bot.tree().select( connectionName );
     }
 
 
     public String getSelectedConnection()
     {
+        activate();
         TableCollection selection = bot.tree().selection();
         if ( selection != null && selection.rowCount() == 1 )
         {

Modified: directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/StudioBot.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/StudioBot.java?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/StudioBot.java
(original)
+++ directory/studio/branches/studio-value/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/StudioBot.java
Fri Aug  4 08:59:15 2017
@@ -24,10 +24,11 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
 import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
 import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
@@ -94,6 +95,18 @@ public class StudioBot
     }
 
 
+    public SchemaProjectsViewBot getSchemaProjectsView()
+    {
+        return new SchemaProjectsViewBot();
+    }
+
+
+    public SchemaSearchViewBot getSchemaSearchView()
+    {
+        return new SchemaSearchViewBot();
+    }
+
+
     public void resetLdapPerspective()
     {
         resetPerspective( "org.apache.directory.studio.ldapbrowser.ui.perspective.BrowserPerspective"
);
@@ -183,15 +196,16 @@ public class StudioBot
 
     public NewWizardBot openNewWizard()
     {
-        try
+        SWTBotMenu file = new SWTBot().menu( "File" );
+        if ( file.menuItems().contains( "New" ) )
         {
-            // In IDE
-            new SWTBot().menu( "File" ).menu( "New" ).menu( "Other..." ).click();
+            // In RCP application
+            file.menu( "New" ).menu( "Other..." ).click();
         }
-        catch ( WidgetNotFoundException wnfe )
+        else
         {
-            // In RCP application
-            new SWTBot().menu( "File" ).menu( "New..." ).click();
+            // In IDE
+            file.menu( "New..." ).click();
         }
         return new NewWizardBot();
     }
@@ -216,4 +230,17 @@ public class StudioBot
         new SWTBot().menu( "Window" ).menu( "Show View" ).menu( "Other..." ).click();
         return new ShowViewsBot();
     }
+
+
+    public void navigationHistoryBack()
+    {
+        new SWTBot().activeShell().pressShortcut( Keystrokes.ALT, Keystrokes.LEFT );
+    }
+
+
+    public void navigationHistoryForward()
+    {
+        new SWTBot().activeShell().pressShortcut( Keystrokes.ALT, Keystrokes.RIGHT );
+    }
+
 }

Modified: directory/studio/branches/studio-value/tools/Windows Installer/windows_installer.nsi
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/tools/Windows%20Installer/windows_installer.nsi?rev=1804081&r1=1804080&r2=1804081&view=diff
==============================================================================
--- directory/studio/branches/studio-value/tools/Windows Installer/windows_installer.nsi (original)
+++ directory/studio/branches/studio-value/tools/Windows Installer/windows_installer.nsi Fri
Aug  4 08:59:15 2017
@@ -20,7 +20,7 @@
 #
 # Constants and variables
 #
-    !define Application "Apache Directory Studio"
+    !define Application "ApacheDirectoryStudio"
     !define Version "1.4.0.v20090407"
     !define Icon "utils\studio-installer.ico"
     !define WelcomeImage "utils\welcome_studio.bmp"
@@ -187,13 +187,13 @@
         WriteRegStr "${INSTDIR_REG_ROOT}" "SOFTWARE\${Application}" "InstallDir" $INSTDIR
 
         # Creating directories in the start menu
-        CreateDirectory "$SMPROGRAMS\Apache Directory Studio"
+        CreateDirectory "$SMPROGRAMS\ApacheDirectoryStudio"
         
         # Creating a shortcut to the application
-        CreateShortCut "$SMPROGRAMS\Apache Directory Studio\Apache Directory Studio.lnk"
"$INSTDIR\Apache Directory Studio.exe" "" "$INSTDIR\Apache Directory Studio.exe" 0
+        CreateShortCut "$SMPROGRAMS\ApacheDirectoryStudio\ApacheDirectoryStudio.lnk" "$INSTDIR\ApacheDirectoryStudio.exe"
"" "$INSTDIR\ApacheDirectoryStudio.exe" 0
         
         # Creating an internet shortcut to the documentation
-        WriteINIStr "$SMPROGRAMS\Apache Directory Studio\Documentation.url" "InternetShortcut"
"URL" "http://directory.apache.org/studio/users-guide.html"
+        WriteINIStr "$SMPROGRAMS\ApacheDirectoryStudio\Documentation.url" "InternetShortcut"
"URL" "http://directory.apache.org/studio/users-guide.html"
 
         # Configuring registries for the uninstaller
         WriteRegStr "${INSTDIR_REG_ROOT}" "${INSTDIR_REG_KEY}" "DisplayName" "${Application}
- (remove only)"
@@ -206,7 +206,7 @@
         WriteUninstaller "$INSTDIR\Uninstall.exe"
         
         # Creating a shortcut to the uninstaller
-        CreateShortCut "$SMPROGRAMS\Apache Directory Studio\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
"" "$INSTDIR\Uninstall.exe" 0
+        CreateShortCut "$SMPROGRAMS\ApacheDirectoryStudio\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
"" "$INSTDIR\Uninstall.exe" 0
         
         # Closing uninstall log
         !insertmacro UNINSTALL.LOG_CLOSE_INSTALL
@@ -225,7 +225,7 @@
         !insertmacro UNINSTALL.LOG_END_UNINSTALL
         
         # Remove shortcuts and folders in the start menu
-        RMDir /r "$SMPROGRAMS\Apache Directory Studio"
+        RMDir /r "$SMPROGRAMS\ApacheDirectoryStudio"
         
         # Removing registry keys
         DeleteRegKey "${INSTDIR_REG_ROOT}" "${INSTDIR_REG_KEY}"



Mime
View raw message