From 60fd87be7408b008a805724100761fb9dccdd8b5 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 12 May 2017 11:05:04 +0200 Subject: [PATCH] SONAR-9222 disable gravatars by default --- .../test/java/it/user/MyAccountPageTest.java | 10 +- .../should_display_user_details.html | 105 ------------------ .../core/config/CorePropertyDefinitions.java | 2 +- 3 files changed, 10 insertions(+), 107 deletions(-) delete mode 100644 it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html diff --git a/it/it-tests/src/test/java/it/user/MyAccountPageTest.java b/it/it-tests/src/test/java/it/user/MyAccountPageTest.java index 2539c9f0551..d6736902c77 100644 --- a/it/it-tests/src/test/java/it/user/MyAccountPageTest.java +++ b/it/it-tests/src/test/java/it/user/MyAccountPageTest.java @@ -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 index fbe3a925bb5..00000000000 --- a/it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - should_display_user_details - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
should_display_user_details
open/sonar/sessions/login
typeid=loginaccount-user
typeid=passwordpassword
clickAndWaitcommit
waitForElementPresentcss=.js-user-authenticated
open/sonar/account/
waitForElementPresentid=name
waitForTextid=name*User With Account*
waitForElementPresentid=login
waitForTextid=login*account-user*
waitForElementPresentid=email
waitForTextid=email*user@example.com*
waitForElementPresentid=groups
waitForTextid=groups*sonar-users*
waitForElementPresentid=scm-accounts
waitForTextid=scm-accounts*user@example.com*
waitForElementPresentcss=#avatar img
- - diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 816a60f212e..19c7a49bc12 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -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(), -- 2.39.5