import it.projectAdministration.BackgroundTasksTest;
import it.projectAdministration.BulkDeletionTest;
import it.projectAdministration.ProjectAdministrationTest;
+import it.projectServices.ProjectCodeTest;
import it.projectOverview.ProjectOverviewTest;
import it.qualityGate.QualityGateNotificationTest;
import it.qualityGate.QualityGateTest;
BackgroundTasksTest.class,
// project pages
ProjectOverviewTest.class,
+ ProjectCodeTest.class,
// settings
PropertySetsTest.class,
SubCategoriesTest.class,
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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.projectServices;
+
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.selenium.Selenese;
+import it.Category1Suite;
+import org.junit.ClassRule;
+import org.junit.Test;
+import util.selenium.SeleneseTest;
+
+import static util.ItUtils.projectDir;
+
+public class ProjectCodeTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
+
+ @Test
+ public void test_project_code_page() throws Exception {
+ executeBuild("shared/xoo-sample", "project-for-code", "Project For Code");
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_project_code_page",
+ "/projectServices/ProjectCodeTest/test_project_code_page.html"
+ ).build();
+ new SeleneseTest(selenese).runOn(orchestrator);
+ }
+
+ private void executeBuild(String projectLocation, String projectKey, String projectName) {
+ orchestrator.executeBuild(
+ SonarRunner.create(projectDir(projectLocation))
+ .setProjectKey(projectKey)
+ .setProjectName(projectName)
+ );
+ }
+
+}
--- /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>test_project_code_page</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">test_project_code_page</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/code?id=project-for-code</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Project For Code*13*0*0*0.0%*</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*src/main/xoo/sample*</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.code-name-cell a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Sample.xoo*</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=.code-breadcrumbs a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForNotText</td>
+ <td>css=#content</td>
+ <td>*Sample.xoo*</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>css=.search-box-input</td>
+ <td>Sam</td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=#content</td>
+ <td>*Sample.xoo*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>