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;
@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
+++ /dev/null
-<?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>
.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(),