Skip to content
Browse files

Merge branch 'bug/autocomplete_attribute' into develop

  • Loading branch information...
2 parents 8ee55fa + 2f22c58 commit 5dc30db739a3df9b75757247dde23d5a5a9f5225 @plfx plfx committed
View
2 server/src/main/resources/templates/web/login.html
@@ -12,7 +12,7 @@ <h1 th:text="${T(org.cloudfoundry.identity.uaa.zone.IdentityZoneHolder).uaa ? 'W
th:name="${prompt.key}"
th:type="${prompt.value[0]}"
th:placeholder="${prompt.value[1]}"
- th:autocomplete="${prompt.value[0] != 'password'}"
+ th:attr="autocomplete=${(prompt.value[0] == 'password') ? 'off' : null}"
th:autofocus="${iter.index} == 0"
class="form-control"/>
<input type="submit" value="Sign in" class="island-button"/>
View
8 uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/LoginIT.java
@@ -24,6 +24,7 @@
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
@@ -92,6 +93,13 @@ public void testSuccessfulLogin() throws Exception {
}
@Test
+ public void testAutocompleteIsDisabledForPasswordField() {
+ webDriver.get(baseUrl + "/login");
+ WebElement password = webDriver.findElement(By.name("password"));
+ assertEquals("off", password.getAttribute("autocomplete"));
+ }
+
+ @Test
public void testPasscodeRedirect() throws Exception {
webDriver.get(baseUrl + "/passcode");
assertEquals("Cloud Foundry", webDriver.getTitle());

0 comments on commit 5dc30db

Please sign in to comment.
Something went wrong with that request. Please try again.