seelmann commented on code in PR #34:
URL: https://github.com/apache/directory-studio/pull/34#discussion_r895203432


##########
tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java:
##########
@@ -567,6 +568,76 @@ public void testTextValueEditor( TestLdapServer server ) 
throws Exception
     }
 
 
+    /**
+     * DIRSTUDIO-1298: The RFC 4517 Postal Address value editor en-/decoding 
is incomplete
+     */
+    @ParameterizedTest
+    @LdapServersSource
+    public void testAddressValueEditor( TestLdapServer server ) throws 
Exception
+    {
+        connectionsViewBot.createTestConnection( server );
+        browserViewBot.selectEntry( path( BJENSEN_DN ) );
+
+        EntryEditorBot entryEditorBot = studioBot.getEntryEditorBot( 
BJENSEN_DN.getName() );
+        entryEditorBot.activate();
+        String dn = entryEditorBot.getDnText();
+        assertEquals( "DN: " + BJENSEN_DN.getName(), dn );
+        assertEquals( 8, entryEditorBot.getAttributeValues().size() );
+        assertEquals( "", modificationLogsViewBot.getModificationLogsText() );
+
+        // add postalAddress attribute and verify value is correctly encoded
+        entryEditorBot.activate();
+        NewAttributeWizardBot wizardBot = 
entryEditorBot.openNewAttributeWizard();
+        assertTrue( wizardBot.isVisible() );
+        wizardBot.typeAttributeType( "postalAddress" );
+        AddressEditorDialogBot addressEditorDialogBot = 
wizardBot.clickFinishButtonExpectingAddressEditor();
+        assertTrue( addressEditorDialogBot.isVisible() );
+        addressEditorDialogBot.setText( "1234 Main St.\nAnytown, CA 
12345\nUSA" );

Review Comment:
   Good point. We have other tests that also just use `\n`but still work under 
Windows. SWT for Windows does some magic and converts them: 
https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT/win32/org/eclipse/swt/widgets/Display.java#L5110
   
   I agree we should use the correct line separator, let's do that in a 
separate change and update all existing tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to