aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-11-08 15:37:48 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-11-09 16:47:34 +0100
commit1ee9b49c233fc00abb1f41b751a74cb538b4cc90 (patch)
treec30d162a2c244cd68dc9eededf262797b3bcbf8a /it
parent046911d801c040ce4f0ad371ad2f4751522077d0 (diff)
downloadsonarqube-1ee9b49c233fc00abb1f41b751a74cb538b4cc90.tar.gz
sonarqube-1ee9b49c233fc00abb1f41b751a74cb538b4cc90.zip
SONAR-8355 Fix IT using /all_projects page
Diffstat (limited to 'it')
-rw-r--r--it/it-tests/src/test/java/it/Category4Suite.java3
-rw-r--r--it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java55
-rw-r--r--it/it-tests/src/test/resources/componentSearch/AllProjectsTest/test_all_projects_page.html34
-rw-r--r--it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-deletion/project-deletion.html14
4 files changed, 12 insertions, 94 deletions
diff --git a/it/it-tests/src/test/java/it/Category4Suite.java b/it/it-tests/src/test/java/it/Category4Suite.java
index 0924e5bd957..9d9c8b61501 100644
--- a/it/it-tests/src/test/java/it/Category4Suite.java
+++ b/it/it-tests/src/test/java/it/Category4Suite.java
@@ -24,7 +24,6 @@ import it.analysisExclusion.FileExclusionsTest;
import it.analysisExclusion.IssueExclusionsTest;
import it.component.ComponentsWsTest;
import it.component.ProjectSearchTest;
-import it.componentSearch.AllProjectsTest;
import it.dbCleaner.PurgeTest;
import it.duplication.CrossProjectDuplicationsOnRemoveFileTest;
import it.duplication.CrossProjectDuplicationsTest;
@@ -87,8 +86,6 @@ import static util.ItUtils.xooPlugin;
ProjectComparisonTest.class,
// project search
SearchProjectsTest.class,
- // component search
- AllProjectsTest.class,
// http
HttpHeadersTest.class,
// ui
diff --git a/it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java b/it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java
deleted file mode 100644
index 524eb6cf74a..00000000000
--- a/it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java
+++ /dev/null
@@ -1,55 +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 it.componentSearch;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarScanner;
-import com.sonar.orchestrator.selenium.Selenese;
-import it.Category4Suite;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import util.selenium.SeleneseTest;
-
-import static util.ItUtils.projectDir;
-
-public class AllProjectsTest {
-
- @ClassRule
- public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR;
-
- @BeforeClass
- public static void inspectProject() {
- orchestrator.executeBuild(
- SonarScanner.create(projectDir("shared/xoo-sample"))
- .setProjectKey("all-project-test-project")
- .setProjectName("AllProjectsTest Project")
- );
- }
-
- @Test
- public void test_all_projects_page() {
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_all_projects_page",
- "/componentSearch/AllProjectsTest/test_all_projects_page.html"
- ).build();
- new SeleneseTest(selenese).runOn(orchestrator);
- }
-
-}
diff --git a/it/it-tests/src/test/resources/componentSearch/AllProjectsTest/test_all_projects_page.html b/it/it-tests/src/test/resources/componentSearch/AllProjectsTest/test_all_projects_page.html
deleted file mode 100644
index 551ede118ed..00000000000
--- a/it/it-tests/src/test/resources/componentSearch/AllProjectsTest/test_all_projects_page.html
+++ /dev/null
@@ -1,34 +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"/>
- <title>should-display-all-projects-page</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<tbody>
-<tr>
- <td>open</td>
- <td>/all_projects?qualifier=TRK</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>id=content</td>
- <td>*All Projects*</td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>id=content</td>
- <td>*Name*</td>
-</tr>
-<tr>
- <td>waitForText</td>
- <td>id=content</td>
- <td>*AllProjectsTest Project*</td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-deletion/project-deletion.html b/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-deletion/project-deletion.html
index e14c673dfdb..da3efc1eb67 100644
--- a/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-deletion/project-deletion.html
+++ b/it/it-tests/src/test/resources/projectAdministration/ProjectAdministrationTest/project-deletion/project-deletion.html
@@ -45,10 +45,15 @@
</tr>
<tr>
<td>open</td>
- <td>/all_projects?qualifier=TRK</td>
+ <td>/projects</td>
<td></td>
</tr>
<tr>
+ <td>waitForText</td>
+ <td>css=.page-main</td>
+ <td>*1 projects*</td>
+</tr>
+<tr>
<td>assertTextPresent</td>
<td>Sample</td>
<td></td>
@@ -85,10 +90,15 @@
</tr>
<tr>
<td>open</td>
- <td>/all_projects?qualifier=TRK</td>
+ <td>/projects</td>
<td></td>
</tr>
<tr>
+ <td>waitForText</td>
+ <td>css=.page-main</td>
+ <td>*0 projects*</td>
+</tr>
+<tr>
<td>assertTextNotPresent</td>
<td>content</td>
<td>*Sample*</td>