]> source.dussan.org Git - sonarqube.git/commitdiff
Add integration test on web authentication with UTF-8 password
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 22 Aug 2017 08:07:23 +0000 (10:07 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 22 Aug 2017 10:20:15 +0000 (12:20 +0200)
tests/src/test/java/org/sonarqube/tests/user/LocalAuthenticationTest.java

index dc3e31c9bb2004f21c23b512e7591e8f647d3c6c..043dbc675a885961c34dc6e80854111a99d6e77f 100644 (file)
@@ -25,7 +25,6 @@ import java.util.UUID;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.pageobjects.LoginPage;
@@ -133,9 +132,18 @@ public class LocalAuthenticationTest {
   }
 
   @Test
-  @Ignore
   public void web_login_form_should_support_utf8_passwords() {
-    // TODO selenium
+    String login = "user_with_utf8_password";
+    // see http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
+    String password = "κόσμε";
+
+    // create user with a UTF-8 password
+    tester.users().generate(u -> u.setLogin(login).setPassword(password));
+
+    tester.openBrowser()
+      .logIn()
+      .submitCredentials(login, password)
+      .shouldBeLoggedIn();
   }
 
   @Test