aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-11-04 14:31:27 +0100
committerGitHub <noreply@github.com>2016-11-04 14:31:27 +0100
commit3fdea0e46af7cc7080f5d232a192ae934787d0f9 (patch)
tree5aadcebf23cb3e9f80199609ede5e36fa7ace59b /it
parentb4cf2dbd2f3858b6a4e79c7c5b7d758fedd887bd (diff)
downloadsonarqube-3fdea0e46af7cc7080f5d232a192ae934787d0f9.tar.gz
sonarqube-3fdea0e46af7cc7080f5d232a192ae934787d0f9.zip
open projects page by default (#1358)
Diffstat (limited to 'it')
-rw-r--r--it/it-tests/src/test/java/it/user/MyAccountPageTest.java18
-rw-r--r--it/it-tests/src/test/java/pageobjects/MyActivityPage.java48
-rw-r--r--it/it-tests/src/test/java/pageobjects/Navigation.java4
-rw-r--r--it/it-tests/src/test/resources/user/BaseIdentityProviderTest/authenticate_user.html5
-rw-r--r--it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details.html2
-rw-r--r--it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details2.html2
-rw-r--r--it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html2
7 files changed, 3 insertions, 78 deletions
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 63c11f9549d..d21ea961fb5 100644
--- a/it/it-tests/src/test/java/it/user/MyAccountPageTest.java
+++ b/it/it-tests/src/test/java/it/user/MyAccountPageTest.java
@@ -31,13 +31,9 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonarqube.ws.client.PostRequest;
import org.sonarqube.ws.client.WsClient;
-import pageobjects.MyActivityPage;
import pageobjects.Navigation;
import util.selenium.SeleneseTest;
-import static com.codeborne.selenide.Condition.visible;
-import static com.codeborne.selenide.WebDriverRunner.url;
-import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.newAdminWsClient;
import static util.ItUtils.projectDir;
@@ -67,20 +63,6 @@ public class MyAccountPageTest {
}
@Test
- public void should_open_by_default() {
- nav.logIn().asAdmin().openHomepage();
- assertThat(url()).contains("/account");
- }
-
- @Test
- public void should_display_activity () {
- MyActivityPage page = nav.logIn().asAdmin().openMyActivity();
- page.getAllIssues().shouldBe(visible);
- page.getRecentIssues().shouldBe(visible);
- page.assertNoFavoriteProjects();
- }
-
- @Test
public void should_display_user_details() throws Exception {
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should_display_user_details",
"/user/MyAccountPageTest/should_display_user_details.html"
diff --git a/it/it-tests/src/test/java/pageobjects/MyActivityPage.java b/it/it-tests/src/test/java/pageobjects/MyActivityPage.java
deleted file mode 100644
index 8bcb376a85b..00000000000
--- a/it/it-tests/src/test/java/pageobjects/MyActivityPage.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package pageobjects;
-
-import com.codeborne.selenide.SelenideElement;
-
-import static com.codeborne.selenide.Condition.visible;
-import static com.codeborne.selenide.Selenide.$;
-
-public class MyActivityPage {
-
- public MyActivityPage() {
- $("#my-activity-page").shouldBe(visible);
- }
-
- public SelenideElement getRecentIssues() {
- return $("#recent-issues");
- }
-
- public SelenideElement getAllIssues() {
- return $("#all-issues");
- }
-
- public SelenideElement getFavoriteProjects() {
- return $("#favorite-projects");
- }
-
- public void assertNoFavoriteProjects() {
- $("#no-favorite-projects").shouldBe(visible);
- }
-}
diff --git a/it/it-tests/src/test/java/pageobjects/Navigation.java b/it/it-tests/src/test/java/pageobjects/Navigation.java
index 8342474a417..071df520c6e 100644
--- a/it/it-tests/src/test/java/pageobjects/Navigation.java
+++ b/it/it-tests/src/test/java/pageobjects/Navigation.java
@@ -108,10 +108,6 @@ public class Navigation extends ExternalResource {
return open("/settings/server_id", ServerIdPage.class);
}
- public MyActivityPage openMyActivity() {
- return open("/account", MyActivityPage.class);
- }
-
public void open(String relativeUrl) {
Selenide.open(relativeUrl);
}
diff --git a/it/it-tests/src/test/resources/user/BaseIdentityProviderTest/authenticate_user.html b/it/it-tests/src/test/resources/user/BaseIdentityProviderTest/authenticate_user.html
index 809e73272c4..adb819dd425 100644
--- a/it/it-tests/src/test/resources/user/BaseIdentityProviderTest/authenticate_user.html
+++ b/it/it-tests/src/test/resources/user/BaseIdentityProviderTest/authenticate_user.html
@@ -20,11 +20,6 @@
<td></td>
</tr>
<tr>
- <td>waitForVisible</td>
- <td>id=my-activity-page</td>
- <td></td>
- </tr>
- <tr>
<td>waitForText</td>
<td>id=global-navigation</td>
<td>*John*</td>
diff --git a/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details.html b/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details.html
index f073c8718fb..a3e02770e40 100644
--- a/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details.html
+++ b/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details.html
@@ -40,7 +40,7 @@
</tr>
<tr>
<td>open</td>
- <td>/account/profile</td>
+ <td>/account/</td>
<td></td>
</tr>
<tr>
diff --git a/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details2.html b/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details2.html
index ca5bd80f9c9..03da75e66ed 100644
--- a/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details2.html
+++ b/it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details2.html
@@ -40,7 +40,7 @@
</tr>
<tr>
<td>open</td>
- <td>/account/profile</td>
+ <td>/account</td>
<td></td>
</tr>
<tr>
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
index 71efda227c6..fbe3a925bb5 100644
--- 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
@@ -41,7 +41,7 @@
</tr>
<tr>
<td>open</td>
- <td>/sonar/account/profile/</td>
+ <td>/sonar/account/</td>
<td></td>
</tr>
<tr>