]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9222 disable gravatars by default
authorStas Vilchik <vilchiks@gmail.com>
Fri, 12 May 2017 09:05:04 +0000 (11:05 +0200)
committerStas Vilchik <stas-vilchik@users.noreply.github.com>
Mon, 15 May 2017 07:30:50 +0000 (09:30 +0200)
it/it-tests/src/test/java/it/user/MyAccountPageTest.java
it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html [deleted file]
sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java

index 2539c9f05512542173f6cabec2e76de51d6c8f6a..d6736902c77d885257dfc1edbf5200ae9f270ea8 100644 (file)
@@ -32,6 +32,7 @@ import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import pageobjects.Navigation;
 
+import static com.codeborne.selenide.Condition.text;
 import static com.codeborne.selenide.Condition.visible;
 import static com.codeborne.selenide.Selenide.$;
 import static util.ItUtils.newAdminWsClient;
@@ -64,7 +65,14 @@ public class MyAccountPageTest {
 
   @Test
   public void should_display_user_details() throws Exception {
-    runSelenese(orchestrator, "/user/MyAccountPageTest/should_display_user_details.html");
+    nav.openLogin().submitCredentials("account-user", "password").shouldBeLoggedIn();
+    nav.open("/account");
+    $("#name").shouldHave(text("User With Account"));
+    $("#login").shouldHave(text("account-user"));
+    $("#email").shouldHave(text("user@example.com"));
+    $("#groups").shouldHave(text("sonar-users"));
+    $("#scm-accounts").shouldHave(text("user@example.com"));
+    $("#avatar").shouldBe(visible);
   }
 
   @Test
diff --git a/it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html b/it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html
deleted file mode 100644 (file)
index fbe3a92..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-  <link rel="selenium.base" href="http://localhost:49506"/>
-  <title>should_display_user_details</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-  <thead>
-  <tr>
-    <td rowspan="1" colspan="3">should_display_user_details</td>
-  </tr>
-  </thead>
-  <tbody>
-  <tr>
-       <td>open</td>
-       <td>/sonar/sessions/login</td>
-       <td></td>
-</tr>
-<tr>
-       <td>type</td>
-       <td>id=login</td>
-       <td>account-user</td>
-</tr>
-<tr>
-       <td>type</td>
-       <td>id=password</td>
-       <td>password</td>
-</tr>
-<tr>
-       <td>clickAndWait</td>
-       <td>commit</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>css=.js-user-authenticated</td>
-       <td></td>
-</tr>
-<tr>
-       <td>open</td>
-       <td>/sonar/account/</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>id=name</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForText</td>
-       <td>id=name</td>
-       <td>*User With Account*</td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>id=login</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForText</td>
-       <td>id=login</td>
-       <td>*account-user*</td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>id=email</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForText</td>
-       <td>id=email</td>
-       <td>*user@example.com*</td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>id=groups</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForText</td>
-       <td>id=groups</td>
-       <td>*sonar-users*</td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>id=scm-accounts</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForText</td>
-       <td>id=scm-accounts</td>
-       <td>*user@example.com*</td>
-</tr>
-<tr>
-       <td>waitForElementPresent</td>
-       <td>css=#avatar img</td>
-       <td></td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
index 816a60f212ecc88ed02657250cab2b5857fa9208..19c7a49bc12672d300da5c824365fb244c321121 100644 (file)
@@ -171,7 +171,7 @@ public class CorePropertyDefinitions {
         .name("Enable support of gravatars")
         .description("Gravatars are profile pictures of users based on their email.")
         .type(PropertyType.BOOLEAN)
-        .defaultValue(String.valueOf(true))
+        .defaultValue(String.valueOf(false))
         .category(CoreProperties.CATEGORY_GENERAL)
         .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL)
         .build(),