directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject [directory-studio] 02/02: Add test for DIRSTUDIO-987
Date Tue, 22 May 2018 20:15:14 GMT
This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-studio.git

commit 0bee43b580938a82904966b63943716736da9087
Author: Stefan Seelmann <mail@stefan-seelmann.de>
AuthorDate: Tue May 22 22:14:58 2018 +0200

    Add test for DIRSTUDIO-987
---
 .../studio/test/integration/ui/BrowserTest.java    | 46 ++++++++++++++++++++++
 .../test/integration/ui/NewEntryWizardTest.java    | 37 +++++++++++++++++
 .../studio/test/integration/ui/BrowserTest.ldif    | 15 +++++++
 3 files changed, 98 insertions(+)

diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
index 3722d60..d129f9a 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
@@ -639,4 +639,50 @@ public class BrowserTest extends AbstractLdapTestUnit
         assertEquals( "Only 4 input changes expected.", 4, counter.get() );
     }
 
+
+    /**
+     * Test for DIRSTUDIO-987, DIRSTUDIO-271.
+     *
+     * Browse and refresh entry with multi-valued RDN with same attribute type.
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testBrowseAndRefreshEntryWithMvRdn() throws Exception
+    {
+        // expand parent and verify entry is visible
+        browserViewBot.expandEntry( "DIT", "Root DSE", "ou=system", "ou=users" );
+        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor" ) );
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor" );
+
+        // expand entry and verify child is visible
+        browserViewBot.expandEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor" );
+        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor", "cn=A" ) );
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor", "cn=A" );
+
+        // refresh entry and verify child is still visible
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor" );
+        browserViewBot.refresh();
+        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor", "cn=A" ) );
+
+        // refresh parent and verify entry is still visible
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "ou=users" );
+        browserViewBot.refresh();
+        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor" ) );
+
+        // expand entry and verify child is visible
+        browserViewBot.expandEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor" );
+        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=users",
+            "l=eu + l=de + l=Berlin + l=Brandenburger Tor", "cn=A" ) );
+    }
+
 }
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
index 702ad66..81f5bdf 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
@@ -426,4 +426,41 @@ public class NewEntryWizardTest extends AbstractLdapTestUnit
             "cn=loopback+ipHostNumber=" + LOCALHOST_ADDRESS ) );
         browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "cn=loopback+ipHostNumber="
+ LOCALHOST_ADDRESS );
     }
+
+
+    /**
+     * Test for DIRSTUDIO-987, DIRSTUDIO-271.
+     *
+     * Create and browse entry with multi-valued RDN with same attribute type.
+     */
+    @Test
+    public void testCreateMvRdnWithSameAttribute()
+    {
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system" );
+
+        NewEntryWizardBot wizardBot = browserViewBot.openNewEntryWizard();
+
+        wizardBot.selectCreateEntryFromScratch();
+        wizardBot.clickNextButton();
+
+        wizardBot.addObjectClasses( "locality" );
+        wizardBot.clickNextButton();
+
+        wizardBot.clickAddRdnButton( 1 );
+        wizardBot.clickAddRdnButton( 2 );
+        wizardBot.setRdnType( 1, "l" );
+        wizardBot.setRdnValue( 1, "eu" );
+        wizardBot.setRdnType( 2, "l" );
+        wizardBot.setRdnValue( 2, "de" );
+        wizardBot.setRdnType( 3, "l" );
+        wizardBot.setRdnValue( 3, "Berlin" );
+        wizardBot.clickNextButton();
+
+        wizardBot.clickFinishButton();
+
+        assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system",
+            "l=eu+l=de+l=Berlin" ) );
+        browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "l=eu+l=de+l=Berlin"
);
+    }
+
 }
diff --git a/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/BrowserTest.ldif
b/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/BrowserTest.ldif
index 6c3fe88..25623aa 100644
--- a/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/BrowserTest.ldif
+++ b/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/BrowserTest.ldif
@@ -234,3 +234,18 @@ objectClass: extensibleObject
 cn: nghZwwtHgxgyvVbTQCYyeY
 sn: nghZwwtHgxgyvVbTQCYyeY
 email: 
+
+dn: l=eu + l=de + l=Berlin + l=Brandenburger Tor, ou=users, ou=system
+objectClass: top
+objectClass: locality
+l: eu
+l: de
+l: Berlin
+l: Brandenburger Tor
+
+dn: cn=A, l=eu + l=de + l=Berlin + l=Brandenburger Tor, ou=users, ou=system
+objectClass: top
+objectClass: person
+cn: user.A
+sn: user.A
+

-- 
To stop receiving notification emails like this one, please contact
seelmann@apache.org.

Mime
View raw message