From 548073320479de0adac1c79db0766dcfa70137d8 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 15 Feb 2016 13:34:44 +0100 Subject: Reorganize some ITs --- it/it-tests/src/test/java/it/Category1Suite.java | 41 +++++---- it/it-tests/src/test/java/it/Category4Suite.java | 22 ++--- .../java/it/componentSearch/AllProjectsTest.java | 55 ++++++++++++ .../java/it/customMeasure/CustomMeasuresTest.java | 4 +- .../java/it/highlighting/HighlightingTest.java | 70 ---------------- .../src/test/java/it/measure/MeasuresWsTest.java | 4 +- .../java/it/measure/NewDebtRatioMeasureTest.java | 4 +- .../test/java/it/measure/ProjectDrilldownTest.java | 55 ++++++++++++ .../test/java/it/measure/ProjectOverviewTest.java | 98 ++++++++++++++++++++++ .../test/java/it/measure/ProjectWidgetsTest.java | 88 +++++++++++++++++++ .../measure/TechnicalDebtMeasureVariationTest.java | 4 +- .../java/it/measureFilter/MeasureFiltersTest.java | 4 +- .../projectComparison/ProjectComparisonTest.java | 62 ++++++++++++++ .../java/it/projectServices/AllProjectsTest.java | 55 ------------ .../java/it/projectServices/ProjectCodeTest.java | 65 -------------- .../it/projectServices/ProjectComparisonTest.java | 62 -------------- .../it/projectServices/ProjectDrilldownTest.java | 60 ------------- .../it/projectServices/ProjectOverviewTest.java | 92 -------------------- .../it/projectServices/ProjectWidgetsTest.java | 88 ------------------- .../test/java/it/sourceCode/HighlightingTest.java | 70 ++++++++++++++++ .../test/java/it/sourceCode/ProjectCodeTest.java | 65 ++++++++++++++ .../AllProjectsTest/test_all_projects_page.html | 34 ++++++++ .../symbol-usages-highlighting.html | 49 ----------- .../HighlightingTest/syntax-highlighting-v1.html | 60 ------------- .../HighlightingTest/syntax-highlighting-v2.html | 59 ------------- .../HighlightingTest/syntax-highlighting.html | 59 ------------- .../should_display_measure_drilldown.html | 54 ++++++++++++ ...ould-display-nice-error-on-unknown-project.html | 24 ++++++ .../test_it_coverage_on_project_overview.html | 70 ++++++++++++++++ .../test_overall_coverage_on_project_overview.html | 90 ++++++++++++++++++++ ...test_project_overview_after_first_analysis.html | 61 ++++++++++++++ .../test_ut_coverage_on_project_overview.html | 75 +++++++++++++++++ .../complexity/complexity-widget.html | 44 ++++++++++ .../should-exclude-new-metrics.html | 74 ++++++++++++++++ .../description/description-widget.html | 29 +++++++ .../hotspots/hide-if-no-measures.html | 29 +++++++ .../hotspots/hotspot-metric-widget.html | 34 ++++++++ .../ProjectComparisonTest/should-add-metrics.html | 39 +++++++++ .../ProjectComparisonTest/should-add-projects.html | 44 ++++++++++ .../should-display-basic-set-of-metrics.html | 24 ++++++ .../should-move-and-remove-metrics.html | 69 +++++++++++++++ .../should-move-and-remove-projects.html | 54 ++++++++++++ .../should-not-add-differential-metrics.html | 44 ++++++++++ .../AllProjectsTest/test_all_projects_page.html | 34 -------- .../code_page_should_expand_root_dir.html | 30 ------- .../ProjectCodeTest/test_project_code_page.html | 55 ------------ .../ProjectComparisonTest/should-add-metrics.html | 39 --------- .../ProjectComparisonTest/should-add-projects.html | 44 ---------- .../should-display-basic-set-of-metrics.html | 24 ------ .../should-move-and-remove-metrics.html | 69 --------------- .../should-move-and-remove-projects.html | 54 ------------ .../should-not-add-differential-metrics.html | 44 ---------- .../should_display_measure_drilldown.html | 54 ------------ ...ould-display-nice-error-on-unknown-project.html | 24 ------ .../test_it_coverage_on_project_overview.html | 70 ---------------- .../test_overall_coverage_on_project_overview.html | 90 -------------------- ...test_project_overview_after_first_analysis.html | 61 -------------- .../test_ut_coverage_on_project_overview.html | 75 ----------------- .../complexity/complexity-widget.html | 44 ---------- .../should-exclude-new-metrics.html | 74 ---------------- .../description/description-widget.html | 29 ------- .../hotspots/hide-if-no-measures.html | 29 ------- .../hotspots/hotspot-metric-widget.html | 34 -------- .../symbol-usages-highlighting.html | 49 +++++++++++ .../HighlightingTest/syntax-highlighting-v1.html | 60 +++++++++++++ .../HighlightingTest/syntax-highlighting-v2.html | 59 +++++++++++++ .../HighlightingTest/syntax-highlighting.html | 59 +++++++++++++ .../code_page_should_expand_root_dir.html | 30 +++++++ .../ProjectCodeTest/test_project_code_page.html | 55 ++++++++++++ 69 files changed, 1741 insertions(+), 1735 deletions(-) create mode 100644 it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java delete mode 100644 it/it-tests/src/test/java/it/highlighting/HighlightingTest.java create mode 100644 it/it-tests/src/test/java/it/measure/ProjectDrilldownTest.java create mode 100644 it/it-tests/src/test/java/it/measure/ProjectOverviewTest.java create mode 100644 it/it-tests/src/test/java/it/measure/ProjectWidgetsTest.java create mode 100644 it/it-tests/src/test/java/it/projectComparison/ProjectComparisonTest.java delete mode 100644 it/it-tests/src/test/java/it/projectServices/AllProjectsTest.java delete mode 100644 it/it-tests/src/test/java/it/projectServices/ProjectCodeTest.java delete mode 100644 it/it-tests/src/test/java/it/projectServices/ProjectComparisonTest.java delete mode 100644 it/it-tests/src/test/java/it/projectServices/ProjectDrilldownTest.java delete mode 100644 it/it-tests/src/test/java/it/projectServices/ProjectOverviewTest.java delete mode 100644 it/it-tests/src/test/java/it/projectServices/ProjectWidgetsTest.java create mode 100644 it/it-tests/src/test/java/it/sourceCode/HighlightingTest.java create mode 100644 it/it-tests/src/test/java/it/sourceCode/ProjectCodeTest.java create mode 100644 it/it-tests/src/test/resources/componentSearch/AllProjectsTest/test_all_projects_page.html delete mode 100644 it/it-tests/src/test/resources/highlighting/HighlightingTest/symbol-usages-highlighting.html delete mode 100644 it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v1.html delete mode 100644 it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v2.html delete mode 100644 it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectDrilldownTest/should_display_measure_drilldown.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_it_coverage_on_project_overview.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_overall_coverage_on_project_overview.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_project_overview_after_first_analysis.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_ut_coverage_on_project_overview.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectWidgetsTest/complexity/complexity-widget.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectWidgetsTest/description/description-widget.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hide-if-no-measures.html create mode 100644 it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html create mode 100644 it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-metrics.html create mode 100644 it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-projects.html create mode 100644 it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-display-basic-set-of-metrics.html create mode 100644 it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-metrics.html create mode 100644 it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-projects.html create mode 100644 it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-not-add-differential-metrics.html delete mode 100644 it/it-tests/src/test/resources/projectServices/AllProjectsTest/test_all_projects_page.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectCodeTest/code_page_should_expand_root_dir.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectCodeTest/test_project_code_page.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-metrics.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-projects.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-display-basic-set-of-metrics.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-metrics.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-projects.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-not-add-differential-metrics.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectDrilldownTest/should_display_measure_drilldown.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_it_coverage_on_project_overview.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_overall_coverage_on_project_overview.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_project_overview_after_first_analysis.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_ut_coverage_on_project_overview.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/complexity/complexity-widget.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/description/description-widget.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hide-if-no-measures.html delete mode 100644 it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html create mode 100644 it/it-tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html create mode 100644 it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html create mode 100644 it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html create mode 100644 it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html create mode 100644 it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html create mode 100644 it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html (limited to 'it') diff --git a/it/it-tests/src/test/java/it/Category1Suite.java b/it/it-tests/src/test/java/it/Category1Suite.java index 06bd1bb8598..791c7675887 100644 --- a/it/it-tests/src/test/java/it/Category1Suite.java +++ b/it/it-tests/src/test/java/it/Category1Suite.java @@ -48,7 +48,15 @@ import it.authorisation.PermissionSearchTest; import it.authorisation.ProvisioningPermissionTest; import it.authorisation.QualityProfileAdminPermissionTest; import it.authorisation.SystemAdminPermissionTest; +import it.customMeasure.CustomMeasuresTest; import it.i18n.I18nTest; +import it.measure.MeasuresWsTest; +import it.measure.NewDebtRatioMeasureTest; +import it.measure.ProjectDrilldownTest; +import it.measure.ProjectOverviewTest; +import it.measure.ProjectWidgetsTest; +import it.measure.TechnicalDebtMeasureVariationTest; +import it.measureFilter.MeasureFiltersTest; import it.measureHistory.DifferentialPeriodsTest; import it.measureHistory.HistoryUiTest; import it.measureHistory.SincePreviousVersionHistoryTest; @@ -57,12 +65,6 @@ import it.measureHistory.TimeMachineTest; import it.projectAdministration.BackgroundTasksTest; import it.projectAdministration.BulkDeletionTest; import it.projectAdministration.ProjectAdministrationTest; -import it.projectServices.AllProjectsTest; -import it.projectServices.ProjectCodeTest; -import it.projectServices.ProjectComparisonTest; -import it.projectServices.ProjectDrilldownTest; -import it.projectServices.ProjectOverviewTest; -import it.projectServices.ProjectWidgetsTest; import it.qualityGate.QualityGateNotificationTest; import it.qualityGate.QualityGateTest; import it.qualityGate.QualityGateUiTest; @@ -70,6 +72,8 @@ import it.settings.PropertySetsTest; import it.settings.SettingsTest; import it.settings.SubCategoriesTest; import it.sourceCode.EncodingTest; +import it.sourceCode.HighlightingTest; +import it.sourceCode.ProjectCodeTest; import org.junit.ClassRule; import org.junit.runner.RunWith; import org.junit.runners.Suite; @@ -85,14 +89,6 @@ import static util.ItUtils.xooPlugin; BulkDeletionTest.class, ProjectAdministrationTest.class, BackgroundTasksTest.class, - // project pages - ProjectOverviewTest.class, - ProjectCodeTest.class, - ProjectDrilldownTest.class, - ProjectComparisonTest.class, - AllProjectsTest.class, - ProjectWidgetsTest.class, - EncodingTest.class, // settings PropertySetsTest.class, SubCategoriesTest.class, @@ -111,6 +107,16 @@ import static util.ItUtils.xooPlugin; ProvisioningPermissionTest.class, QualityProfileAdminPermissionTest.class, SystemAdminPermissionTest.class, + // custom measure + CustomMeasuresTest.class, + // measure + NewDebtRatioMeasureTest.class, + ProjectDrilldownTest.class, + ProjectOverviewTest.class, + ProjectWidgetsTest.class, + MeasureFiltersTest.class, + MeasuresWsTest.class, + TechnicalDebtMeasureVariationTest.class, // measure history DifferentialPeriodsTest.class, HistoryUiTest.class, @@ -119,7 +125,12 @@ import static util.ItUtils.xooPlugin; TimeMachineTest.class, // action plan ActionPlanTest.class, - ActionPlanUiTest.class + ActionPlanUiTest.class, + // source code + EncodingTest.class, + HighlightingTest.class, + ProjectCodeTest.class + }) public class Category1Suite { diff --git a/it/it-tests/src/test/java/it/Category4Suite.java b/it/it-tests/src/test/java/it/Category4Suite.java index dbe3f376edb..5dfc77d90a4 100644 --- a/it/it-tests/src/test/java/it/Category4Suite.java +++ b/it/it-tests/src/test/java/it/Category4Suite.java @@ -25,15 +25,12 @@ import it.analysisExclusion.IssueExclusionsTest; import it.component.ComponentsWsTest; import it.component.ProjectSearchTest; import it.componentDashboard.DashboardTest; -import it.customMeasure.CustomMeasuresTest; +import it.componentSearch.AllProjectsTest; import it.dbCleaner.PurgeTest; import it.duplication.CrossProjectDuplicationsOnRemoveFileTest; import it.duplication.CrossProjectDuplicationsTest; import it.duplication.DuplicationsTest; -import it.highlighting.HighlightingTest; -import it.measure.NewDebtRatioMeasureTest; -import it.measure.TechnicalDebtMeasureVariationTest; -import it.measureFilter.MeasureFiltersTest; +import it.projectComparison.ProjectComparisonTest; import it.projectEvent.EventTest; import it.serverSystem.ServerSystemTest; import it.user.BaseIdentityProviderTest; @@ -51,12 +48,6 @@ import static util.ItUtils.xooPlugin; @RunWith(Suite.class) @Suite.SuiteClasses({ - // custom measure - CustomMeasuresTest.class, - // measure - TechnicalDebtMeasureVariationTest.class, - NewDebtRatioMeasureTest.class, - MeasureFiltersTest.class, // server system ServerSystemTest.class, // user @@ -81,9 +72,12 @@ import static util.ItUtils.xooPlugin; PurgeTest.class, // project event EventTest.class, - // highlighting - HighlightingTest.class, - DashboardTest.class + // component dashboard + DashboardTest.class, + // project comparison + ProjectComparisonTest.class, + // component search + AllProjectsTest.class }) public class Category4Suite { diff --git a/it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java b/it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java new file mode 100644 index 00000000000..b3f6bd3651f --- /dev/null +++ b/it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java @@ -0,0 +1,55 @@ +/* + * 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.SonarRunner; +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( + SonarRunner.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/java/it/customMeasure/CustomMeasuresTest.java b/it/it-tests/src/test/java/it/customMeasure/CustomMeasuresTest.java index efeb1f238d7..5aa1c2d8296 100644 --- a/it/it-tests/src/test/java/it/customMeasure/CustomMeasuresTest.java +++ b/it/it-tests/src/test/java/it/customMeasure/CustomMeasuresTest.java @@ -21,7 +21,7 @@ package it.customMeasure; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.build.SonarRunner; -import it.Category4Suite; +import it.Category1Suite; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.junit.Before; @@ -38,7 +38,7 @@ public class CustomMeasuresTest { public static final String PROJECT_KEY = "sample"; @ClassRule - public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; @Before public void deleteProjects() { diff --git a/it/it-tests/src/test/java/it/highlighting/HighlightingTest.java b/it/it-tests/src/test/java/it/highlighting/HighlightingTest.java deleted file mode 100644 index 41dc60b3b08..00000000000 --- a/it/it-tests/src/test/java/it/highlighting/HighlightingTest.java +++ /dev/null @@ -1,70 +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.highlighting; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.selenium.Selenese; -import it.Category4Suite; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Test; - -import static util.ItUtils.runProjectAnalysis; - -public class HighlightingTest { - - @ClassRule - public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; - - @Before - public void deleteData() { - orchestrator.resetData(); - } - - @Test - public void highlight_source_code_and_symbols_usage() throws Exception { - runProjectAnalysis(orchestrator, "highlighting/xoo-sample-with-highlighting-v2"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("highlight_source_code_and_symbols_usage", - // SONAR-3893 & SONAR-4247 - "/highlighting/HighlightingTest/syntax-highlighting.html", - // SONAR-4249 & SONAR-4250 - "/highlighting/HighlightingTest/symbol-usages-highlighting.html" - ).build(); - orchestrator.executeSelenese(selenese); - } - - // Check that E/S index is updated when file content is unchanged but plugin generates different syntax/symbol highlighting - @Test - public void update_highlighting_even_when_code_unchanged() throws Exception { - runProjectAnalysis(orchestrator, "highlighting/xoo-sample-with-highlighting-v1"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("syntax-highlighting-v1", - "/highlighting/HighlightingTest/syntax-highlighting-v1.html").build(); - orchestrator.executeSelenese(selenese); - - runProjectAnalysis(orchestrator, "highlighting/xoo-sample-with-highlighting-v2"); - - selenese = Selenese.builder().setHtmlTestsInClasspath("syntax-highlighting-v2", - "/highlighting/HighlightingTest/syntax-highlighting-v2.html", - "/highlighting/HighlightingTest/symbol-usages-highlighting.html").build(); - orchestrator.executeSelenese(selenese); - } -} diff --git a/it/it-tests/src/test/java/it/measure/MeasuresWsTest.java b/it/it-tests/src/test/java/it/measure/MeasuresWsTest.java index 8a0ab35148c..42f513aa795 100644 --- a/it/it-tests/src/test/java/it/measure/MeasuresWsTest.java +++ b/it/it-tests/src/test/java/it/measure/MeasuresWsTest.java @@ -21,7 +21,7 @@ package it.measure; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.build.SonarRunner; -import it.Category4Suite; +import it.Category1Suite; import java.util.List; import org.junit.AfterClass; import org.junit.Before; @@ -44,7 +44,7 @@ import static util.ItUtils.setServerProperty; public class MeasuresWsTest { @ClassRule - public static final Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + public static final Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; private static final String FILE_KEY = "sample:src/main/xoo/sample/Sample.xoo"; WsClient wsClient; diff --git a/it/it-tests/src/test/java/it/measure/NewDebtRatioMeasureTest.java b/it/it-tests/src/test/java/it/measure/NewDebtRatioMeasureTest.java index 21c6fd89c15..d6198be3e97 100644 --- a/it/it-tests/src/test/java/it/measure/NewDebtRatioMeasureTest.java +++ b/it/it-tests/src/test/java/it/measure/NewDebtRatioMeasureTest.java @@ -21,7 +21,7 @@ package it.measure; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.locator.FileLocation; -import it.Category4Suite; +import it.Category1Suite; import java.util.List; import javax.annotation.Nullable; import org.junit.AfterClass; @@ -46,7 +46,7 @@ public class NewDebtRatioMeasureTest { private static final String NEW_DEBT_RATIO_METRIC_KEY = "new_sqale_debt_ratio"; @ClassRule - public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; @BeforeClass public static void initPeriods() throws Exception { diff --git a/it/it-tests/src/test/java/it/measure/ProjectDrilldownTest.java b/it/it-tests/src/test/java/it/measure/ProjectDrilldownTest.java new file mode 100644 index 00000000000..60b4db48715 --- /dev/null +++ b/it/it-tests/src/test/java/it/measure/ProjectDrilldownTest.java @@ -0,0 +1,55 @@ +/* + * 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.measure; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.build.SonarRunner; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category1Suite; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import util.selenium.SeleneseTest; + +import static util.ItUtils.projectDir; + +public class ProjectDrilldownTest { + + @ClassRule + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; + + @BeforeClass + public static void inspectProject() { + orchestrator.executeBuild( + SonarRunner.create(projectDir("shared/xoo-sample")) + .setProjectKey("project-drilldown-test-project") + .setProjectName("ProjectDrilldownTest Project") + ); + } + + @Test + public void should_display_measure_drilldown() { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should_display_measure_drilldown", + "/measure/ProjectDrilldownTest/should_display_measure_drilldown.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + +} diff --git a/it/it-tests/src/test/java/it/measure/ProjectOverviewTest.java b/it/it-tests/src/test/java/it/measure/ProjectOverviewTest.java new file mode 100644 index 00000000000..069fd101e24 --- /dev/null +++ b/it/it-tests/src/test/java/it/measure/ProjectOverviewTest.java @@ -0,0 +1,98 @@ +/* + * 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.measure; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.build.SonarRunner; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category1Suite; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; +import util.selenium.SeleneseTest; + +import static util.ItUtils.projectDir; + +public class ProjectOverviewTest { + + @ClassRule + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; + + @Before + public void resetData() throws Exception { + orchestrator.resetData(); + } + + @Test + public void test_project_overview_after_first_analysis() throws Exception { + executeBuild("shared/xoo-sample", "project-for-overview", "Project For Overview"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_project_overview_after_first_analysis", + "/measure/ProjectOverviewTest/test_project_overview_after_first_analysis.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void test_ut_coverage_on_project_overview() throws Exception { + executeBuild("testing/xoo-sample-ut-coverage", "project-for-overview-ut-coverage", "Project For Overview UT"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_ut_coverage_on_project_overview", + "/measure/ProjectOverviewTest/test_ut_coverage_on_project_overview.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void test_it_coverage_on_project_overview() throws Exception { + executeBuild("testing/xoo-sample-it-coverage", "project-for-overview-it-coverage", "Project For Overview IT"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_it_coverage_onfi_project_overview", + "/measure/ProjectOverviewTest/test_it_coverage_on_project_overview.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void test_overall_coverage_on_project_overview() throws Exception { + executeBuild("testing/xoo-sample-overall-coverage", "project-for-overview-overall-coverage", "Project For Overview Overall"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_overall_coverage_on_project_overview", + "/measure/ProjectOverviewTest/test_overall_coverage_on_project_overview.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void should_display_a_nice_error_when_requesting_unknown_project() { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should_display_a_nice_error_when_requesting_unknown_project", + "/measure/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html").build(); + orchestrator.executeSelenese(selenese); + } + + private void executeBuild(String projectLocation, String projectKey, String projectName) { + orchestrator.executeBuild( + SonarRunner.create(projectDir(projectLocation)) + .setProjectKey(projectKey) + .setProjectName(projectName) + ); + } + +} diff --git a/it/it-tests/src/test/java/it/measure/ProjectWidgetsTest.java b/it/it-tests/src/test/java/it/measure/ProjectWidgetsTest.java new file mode 100644 index 00000000000..d5c2bdff52c --- /dev/null +++ b/it/it-tests/src/test/java/it/measure/ProjectWidgetsTest.java @@ -0,0 +1,88 @@ +/* + * 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.measure; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.build.SonarRunner; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category1Suite; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Ignore; +import org.junit.Test; +import org.sonar.wsclient.services.ResourceQuery; +import util.selenium.SeleneseTest; + +import static util.ItUtils.projectDir; + +public class ProjectWidgetsTest { + + @ClassRule + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; + + @BeforeClass + public static void inspectProject() { + orchestrator.executeBuild( + SonarRunner.create(projectDir("shared/xoo-sample")) + .setProjectKey("project-widgets-test-project") + .setProjectName("ProjectWidgetsTest Project") + ); + } + + @Test + public void hotspots() { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("hotspots", + "/measure/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html", + "/measure/ProjectWidgetsTest/hotspots/hide-if-no-measures.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void complexity() { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("complexity", + "/measure/ProjectWidgetsTest/complexity/complexity-widget.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void description() { + long projectId = orchestrator.getServer().getWsClient() + .find(ResourceQuery.create("project-widgets-test-project")).getId(); + long qualityGateId = orchestrator.getServer().adminWsClient().qualityGateClient().show("SonarQube way").id(); + orchestrator.getServer().adminWsClient().qualityGateClient().selectProject(qualityGateId, projectId); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("description", + "/measure/ProjectWidgetsTest/description/description-widget.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + @Ignore + public void custom_measures() { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("custom_measures", + "/measure/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + +} diff --git a/it/it-tests/src/test/java/it/measure/TechnicalDebtMeasureVariationTest.java b/it/it-tests/src/test/java/it/measure/TechnicalDebtMeasureVariationTest.java index 675a88eaf0d..f5369071e94 100644 --- a/it/it-tests/src/test/java/it/measure/TechnicalDebtMeasureVariationTest.java +++ b/it/it-tests/src/test/java/it/measure/TechnicalDebtMeasureVariationTest.java @@ -21,7 +21,7 @@ package it.measure; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.locator.FileLocation; -import it.Category4Suite; +import it.Category1Suite; import java.util.List; import org.junit.AfterClass; import org.junit.Before; @@ -42,7 +42,7 @@ import static util.ItUtils.setServerProperty; public class TechnicalDebtMeasureVariationTest { @ClassRule - public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; @BeforeClass public static void initPeriods() throws Exception { diff --git a/it/it-tests/src/test/java/it/measureFilter/MeasureFiltersTest.java b/it/it-tests/src/test/java/it/measureFilter/MeasureFiltersTest.java index 77674ae969e..01b09402103 100644 --- a/it/it-tests/src/test/java/it/measureFilter/MeasureFiltersTest.java +++ b/it/it-tests/src/test/java/it/measureFilter/MeasureFiltersTest.java @@ -22,7 +22,7 @@ package it.measureFilter; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.build.SonarRunner; import com.sonar.orchestrator.selenium.Selenese; -import it.Category4Suite; +import it.Category1Suite; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; @@ -39,7 +39,7 @@ import static util.ItUtils.projectDir; public class MeasureFiltersTest { @ClassRule - public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; public static WsClient adminWsClient; @BeforeClass diff --git a/it/it-tests/src/test/java/it/projectComparison/ProjectComparisonTest.java b/it/it-tests/src/test/java/it/projectComparison/ProjectComparisonTest.java new file mode 100644 index 00000000000..b06d762b80b --- /dev/null +++ b/it/it-tests/src/test/java/it/projectComparison/ProjectComparisonTest.java @@ -0,0 +1,62 @@ +/* + * 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.projectComparison; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.build.SonarRunner; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category4Suite; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Ignore; +import org.junit.Test; +import util.selenium.SeleneseTest; + +import static util.ItUtils.projectDir; + +public class ProjectComparisonTest { + + @ClassRule + public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + + @BeforeClass + public static void inspectProject() { + orchestrator.executeBuild( + SonarRunner.create(projectDir("shared/xoo-sample")) + .setProjectKey("project-comparison-test-project") + .setProjectName("ProjectComparisonTest Project") + ); + } + + @Test + @Ignore("need to find a way to type into invisible input fields") + public void test_project_comparison_service() { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_project_comparison_service", + "/projectComparison/ProjectComparisonTest/should-display-basic-set-of-metrics.html", + "/projectComparison/ProjectComparisonTest/should-add-projects.html", + "/projectComparison/ProjectComparisonTest/should-move-and-remove-projects.html", + "/projectComparison/ProjectComparisonTest/should-add-metrics.html", + "/projectComparison/ProjectComparisonTest/should-not-add-differential-metrics.html", + "/projectComparison/ProjectComparisonTest/should-move-and-remove-metrics.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + +} diff --git a/it/it-tests/src/test/java/it/projectServices/AllProjectsTest.java b/it/it-tests/src/test/java/it/projectServices/AllProjectsTest.java deleted file mode 100644 index 57af7d162af..00000000000 --- a/it/it-tests/src/test/java/it/projectServices/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.projectServices; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.build.SonarRunner; -import com.sonar.orchestrator.selenium.Selenese; -import it.Category1Suite; -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 = Category1Suite.ORCHESTRATOR; - - @BeforeClass - public static void inspectProject() { - orchestrator.executeBuild( - SonarRunner.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", - "/projectServices/AllProjectsTest/test_all_projects_page.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - -} diff --git a/it/it-tests/src/test/java/it/projectServices/ProjectCodeTest.java b/it/it-tests/src/test/java/it/projectServices/ProjectCodeTest.java deleted file mode 100644 index 56c62273cd2..00000000000 --- a/it/it-tests/src/test/java/it/projectServices/ProjectCodeTest.java +++ /dev/null @@ -1,65 +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.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); - } - - @Test - public void code_page_should_expand_root_dir() throws Exception { - executeBuild("shared/xoo-sample-with-root-dir", "project-for-code-root-dir", "Project For Code"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("code_page_should_expand_root_dir", - "/projectServices/ProjectCodeTest/code_page_should_expand_root_dir.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) - ); - } - -} diff --git a/it/it-tests/src/test/java/it/projectServices/ProjectComparisonTest.java b/it/it-tests/src/test/java/it/projectServices/ProjectComparisonTest.java deleted file mode 100644 index f0696412bf7..00000000000 --- a/it/it-tests/src/test/java/it/projectServices/ProjectComparisonTest.java +++ /dev/null @@ -1,62 +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.projectServices; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.build.SonarRunner; -import com.sonar.orchestrator.selenium.Selenese; -import it.Category1Suite; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Test; -import util.selenium.SeleneseTest; - -import static util.ItUtils.projectDir; - -public class ProjectComparisonTest { - - @ClassRule - public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; - - @BeforeClass - public static void inspectProject() { - orchestrator.executeBuild( - SonarRunner.create(projectDir("shared/xoo-sample")) - .setProjectKey("project-comparison-test-project") - .setProjectName("ProjectComparisonTest Project") - ); - } - - @Test - @Ignore("need to find a way to type into invisible input fields") - public void test_project_comparison_service() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_project_comparison_service", - "/projectServices/ProjectComparisonTest/should-display-basic-set-of-metrics.html", - "/projectServices/ProjectComparisonTest/should-add-projects.html", - "/projectServices/ProjectComparisonTest/should-move-and-remove-projects.html", - "/projectServices/ProjectComparisonTest/should-add-metrics.html", - "/projectServices/ProjectComparisonTest/should-not-add-differential-metrics.html", - "/projectServices/ProjectComparisonTest/should-move-and-remove-metrics.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - -} diff --git a/it/it-tests/src/test/java/it/projectServices/ProjectDrilldownTest.java b/it/it-tests/src/test/java/it/projectServices/ProjectDrilldownTest.java deleted file mode 100644 index 9a37eb4aac8..00000000000 --- a/it/it-tests/src/test/java/it/projectServices/ProjectDrilldownTest.java +++ /dev/null @@ -1,60 +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.projectServices; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.build.SonarRunner; -import com.sonar.orchestrator.selenium.Selenese; -import it.Category1Suite; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.sonar.wsclient.Sonar; -import org.sonar.wsclient.services.Resource; -import org.sonar.wsclient.services.ResourceQuery; -import util.selenium.SeleneseTest; - -import java.util.List; - -import static util.ItUtils.projectDir; - -public class ProjectDrilldownTest { - - @ClassRule - public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; - - @BeforeClass - public static void inspectProject() { - orchestrator.executeBuild( - SonarRunner.create(projectDir("shared/xoo-sample")) - .setProjectKey("project-drilldown-test-project") - .setProjectName("ProjectDrilldownTest Project") - ); - } - - @Test - public void should_display_measure_drilldown() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should_display_measure_drilldown", - "/projectServices/ProjectDrilldownTest/should_display_measure_drilldown.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - -} diff --git a/it/it-tests/src/test/java/it/projectServices/ProjectOverviewTest.java b/it/it-tests/src/test/java/it/projectServices/ProjectOverviewTest.java deleted file mode 100644 index c079be46c25..00000000000 --- a/it/it-tests/src/test/java/it/projectServices/ProjectOverviewTest.java +++ /dev/null @@ -1,92 +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.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 ProjectOverviewTest { - - @ClassRule - public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; - - @Test - public void test_project_overview_after_first_analysis() throws Exception { - executeBuild("shared/xoo-sample", "project-for-overview", "Project For Overview"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_project_overview_after_first_analysis", - "/projectServices/ProjectOverviewTest/test_project_overview_after_first_analysis.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - public void test_ut_coverage_on_project_overview() throws Exception { - executeBuild("testing/xoo-sample-ut-coverage", "project-for-overview-ut-coverage", "Project For Overview UT"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_ut_coverage_on_project_overview", - "/projectServices/ProjectOverviewTest/test_ut_coverage_on_project_overview.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - public void test_it_coverage_on_project_overview() throws Exception { - executeBuild("testing/xoo-sample-it-coverage", "project-for-overview-it-coverage", "Project For Overview IT"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_it_coverage_onfi_project_overview", - "/projectServices/ProjectOverviewTest/test_it_coverage_on_project_overview.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - public void test_overall_coverage_on_project_overview() throws Exception { - executeBuild("testing/xoo-sample-overall-coverage", "project-for-overview-overall-coverage", "Project For Overview Overall"); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("test_overall_coverage_on_project_overview", - "/projectServices/ProjectOverviewTest/test_overall_coverage_on_project_overview.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - public void should_display_a_nice_error_when_requesting_unknown_project() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should_display_a_nice_error_when_requesting_unknown_project", - "/projectServices/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html").build(); - orchestrator.executeSelenese(selenese); - } - - private void executeBuild(String projectLocation, String projectKey, String projectName) { - orchestrator.executeBuild( - SonarRunner.create(projectDir(projectLocation)) - .setProjectKey(projectKey) - .setProjectName(projectName) - ); - } - -} diff --git a/it/it-tests/src/test/java/it/projectServices/ProjectWidgetsTest.java b/it/it-tests/src/test/java/it/projectServices/ProjectWidgetsTest.java deleted file mode 100644 index c3012367b9f..00000000000 --- a/it/it-tests/src/test/java/it/projectServices/ProjectWidgetsTest.java +++ /dev/null @@ -1,88 +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.projectServices; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.build.SonarRunner; -import com.sonar.orchestrator.selenium.Selenese; -import it.Category1Suite; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Test; -import org.sonar.wsclient.services.ResourceQuery; -import util.selenium.SeleneseTest; - -import static util.ItUtils.projectDir; - -public class ProjectWidgetsTest { - - @ClassRule - public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; - - @BeforeClass - public static void inspectProject() { - orchestrator.executeBuild( - SonarRunner.create(projectDir("shared/xoo-sample")) - .setProjectKey("project-widgets-test-project") - .setProjectName("ProjectWidgetsTest Project") - ); - } - - @Test - public void hotspots() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("hotspots", - "/projectServices/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html", - "/projectServices/ProjectWidgetsTest/hotspots/hide-if-no-measures.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - public void complexity() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("complexity", - "/projectServices/ProjectWidgetsTest/complexity/complexity-widget.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - public void description() { - long projectId = orchestrator.getServer().getWsClient() - .find(ResourceQuery.create("project-widgets-test-project")).getId(); - long qualityGateId = orchestrator.getServer().adminWsClient().qualityGateClient().show("SonarQube way").id(); - orchestrator.getServer().adminWsClient().qualityGateClient().selectProject(qualityGateId, projectId); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("description", - "/projectServices/ProjectWidgetsTest/description/description-widget.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - - @Test - @Ignore - public void custom_measures() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("custom_measures", - "/projectServices/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html" - ).build(); - new SeleneseTest(selenese).runOn(orchestrator); - } - -} diff --git a/it/it-tests/src/test/java/it/sourceCode/HighlightingTest.java b/it/it-tests/src/test/java/it/sourceCode/HighlightingTest.java new file mode 100644 index 00000000000..44eef089527 --- /dev/null +++ b/it/it-tests/src/test/java/it/sourceCode/HighlightingTest.java @@ -0,0 +1,70 @@ +/* + * 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.sourceCode; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category1Suite; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; + +import static util.ItUtils.runProjectAnalysis; + +public class HighlightingTest { + + @ClassRule + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; + + @Before + public void deleteData() { + orchestrator.resetData(); + } + + @Test + public void highlight_source_code_and_symbols_usage() throws Exception { + runProjectAnalysis(orchestrator, "highlighting/xoo-sample-with-highlighting-v2"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("highlight_source_code_and_symbols_usage", + // SONAR-3893 & SONAR-4247 + "/sourceCode/HighlightingTest/syntax-highlighting.html", + // SONAR-4249 & SONAR-4250 + "/sourceCode/HighlightingTest/symbol-usages-highlighting.html" + ).build(); + orchestrator.executeSelenese(selenese); + } + + // Check that E/S index is updated when file content is unchanged but plugin generates different syntax/symbol highlighting + @Test + public void update_highlighting_even_when_code_unchanged() throws Exception { + runProjectAnalysis(orchestrator, "highlighting/xoo-sample-with-highlighting-v1"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("syntax-highlighting-v1", + "/sourceCode/HighlightingTest/syntax-highlighting-v1.html").build(); + orchestrator.executeSelenese(selenese); + + runProjectAnalysis(orchestrator, "highlighting/xoo-sample-with-highlighting-v2"); + + selenese = Selenese.builder().setHtmlTestsInClasspath("syntax-highlighting-v2", + "/sourceCode/HighlightingTest/syntax-highlighting-v2.html", + "/sourceCode/HighlightingTest/symbol-usages-highlighting.html").build(); + orchestrator.executeSelenese(selenese); + } +} diff --git a/it/it-tests/src/test/java/it/sourceCode/ProjectCodeTest.java b/it/it-tests/src/test/java/it/sourceCode/ProjectCodeTest.java new file mode 100644 index 00000000000..bd794bf6682 --- /dev/null +++ b/it/it-tests/src/test/java/it/sourceCode/ProjectCodeTest.java @@ -0,0 +1,65 @@ +/* + * 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.sourceCode; + +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", + "/sourceCode/ProjectCodeTest/test_project_code_page.html" + ).build(); + new SeleneseTest(selenese).runOn(orchestrator); + } + + @Test + public void code_page_should_expand_root_dir() throws Exception { + executeBuild("shared/xoo-sample-with-root-dir", "project-for-code-root-dir", "Project For Code"); + + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("code_page_should_expand_root_dir", + "/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.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) + ); + } + +} 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 new file mode 100644 index 00000000000..551ede118ed --- /dev/null +++ b/it/it-tests/src/test/resources/componentSearch/AllProjectsTest/test_all_projects_page.html @@ -0,0 +1,34 @@ + + + + + + should-display-all-projects-page + + + + + + + + + + + + + + + + + + + + + + + + + +
open/all_projects?qualifier=TRK
waitForTextid=content*All Projects*
waitForTextid=content*Name*
waitForTextid=content*AllProjectsTest Project*
+ + diff --git a/it/it-tests/src/test/resources/highlighting/HighlightingTest/symbol-usages-highlighting.html b/it/it-tests/src/test/resources/highlighting/HighlightingTest/symbol-usages-highlighting.html deleted file mode 100644 index 42e1fc154f2..00000000000 --- a/it/it-tests/src/test/resources/highlighting/HighlightingTest/symbol-usages-highlighting.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - highlight-symbol-usages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
highlight-symbol-usages
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
waitForXpathCount//span[contains(@class, 'sym')]3
waitForXpathCount//span[contains(@class, 'sym highlighted')]0
click//span[contains(@class, 'sym')][2]
waitForXpathCount//span[contains(@class, 'sym highlighted')]2
- - diff --git a/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v1.html b/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v1.html deleted file mode 100644 index 368c3bdf58e..00000000000 --- a/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v1.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - java-syntax-highlighting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
highlight-syntax-v1
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
storeHtmlSource
verifyHtmlSourceglob:*<span class="k">package</span>*
verifyHtmlSourceglob:*<span class="k">public</span>*
verifyHtmlSourceglob:*<span class="k">class</span>*
verifyHtmlSourceglob:*<span class="s">return</span>*
verifyHtmlSourceglob:*<span class="s">"hello"</span>*
- - diff --git a/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v2.html b/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v2.html deleted file mode 100644 index 57c535a10d3..00000000000 --- a/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting-v2.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - java-syntax-highlighting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
highlight-syntax-v2
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
storeHtmlSource
verifyHtmlSourceglob:*<span class="k">package</span>*
verifyHtmlSourceglob:*<span class="k">public</span>*
verifyHtmlSourceglob:*<span class="k">class</span>*
verifyHtmlSourceglob:*<span class="k">return</span>*
verifyHtmlSourceglob:*<span class="s">"hello"</span>*
- - diff --git a/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting.html b/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting.html deleted file mode 100644 index 24d0ac63903..00000000000 --- a/it/it-tests/src/test/resources/highlighting/HighlightingTest/syntax-highlighting.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - java-syntax-highlighting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
highlight-syntax
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
storeHtmlSource
verifyHtmlSourceglob:*<span class="k">package</span>*
verifyHtmlSourceglob:*<span class="k">public</span>*
verifyHtmlSourceglob:*<span class="k">class</span>*
verifyHtmlSourceglob:*<span class="k">return</span>*
verifyHtmlSourceglob:*<span class="s">"hello"</span>*
- - diff --git a/it/it-tests/src/test/resources/measure/ProjectDrilldownTest/should_display_measure_drilldown.html b/it/it-tests/src/test/resources/measure/ProjectDrilldownTest/should_display_measure_drilldown.html new file mode 100644 index 00000000000..ce89d3df2df --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectDrilldownTest/should_display_measure_drilldown.html @@ -0,0 +1,54 @@ + + + + + + should_display_measure_drilldown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/drilldown/measures?id=project-drilldown-test-project&metric=ncloc
waitForTextid=drilldown*Sample.xoo*
waitForElementPresentcss=a[data-key="project-drilldown-test-project:src/main/xoo/sample/Sample.xoo"]
waitForElementPresentcss=a.js-drilldown-link.js-ready
clickcss=a[data-key="project-drilldown-test-project:src/main/xoo/sample/Sample.xoo"]
waitForElementPresentcss=.source-viewer
waitForTextcss=.source-viewer*src/main/xoo/sample/*Sample.xoo*
waitForTextcss=.source-viewer*public class Sample {*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html new file mode 100644 index 00000000000..3cbf2bf44fa --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html @@ -0,0 +1,24 @@ + + + + + + static-files + + + + + + + + + + + + + + + +
open/dashboard/index?id=unknown
waitForTexterror*The requested project does not exist. Either it has never been analyzed successfully or it has been deleted.*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_it_coverage_on_project_overview.html b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_it_coverage_on_project_overview.html new file mode 100644 index 00000000000..09d5b93211e --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_it_coverage_on_project_overview.html @@ -0,0 +1,70 @@ + + + + + + + test_project_overview_after_first_analysis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
test_project_overview_after_first_analysis
open/overview?id=project-for-overview-it-coverage
waitForTextid=content*50.0%*Coverage*
open/overview/coverage?id=project-for-overview-it-coverage
waitForTextid=content*IT coverage*50.0%*
waitForTextid=content*IT line coverage*50.0%*
waitForTextid=content*IT condition coverage*50.0%*
waitForTextid=content*IT uncovered conditions*1*
waitForTextid=content*IT uncovered lines*2*
waitForTextid=content*Size*IT uncovered lines*
waitForTextid=content*Size*Lines of code*Color*IT coverage*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_overall_coverage_on_project_overview.html b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_overall_coverage_on_project_overview.html new file mode 100644 index 00000000000..8ef8b08e055 --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_overall_coverage_on_project_overview.html @@ -0,0 +1,90 @@ + + + + + + + test_project_overview_after_first_analysis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
test_project_overview_after_first_analysis
open/overview?id=project-for-overview-overall-coverage
waitForTextid=content*62.5%*Coverage*
open/overview/coverage?id=project-for-overview-overall-coverage
waitForTextid=content*Overall coverage*62.5%*
waitForTextid=content*Overall line coverage*75.0%*
waitForTextid=content*Overall condition coverage*50.0%*
waitForTextid=content*Uncovered conditions*3*
waitForTextid=content*IT uncovered conditions*3*
waitForTextid=content*Overall uncovered conditions*2*
waitForTextid=content*Uncovered lines*2*
waitForTextid=content*IT uncovered lines*2*
waitForTextid=content*Overall uncovered lines*1*
waitForTextid=content*Size*Overall uncovered lines*
waitForTextid=content*Size*Lines of code*Color*Overall coverage*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_project_overview_after_first_analysis.html b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_project_overview_after_first_analysis.html new file mode 100644 index 00000000000..57852d8531a --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_project_overview_after_first_analysis.html @@ -0,0 +1,61 @@ + + + + + + + test_project_overview_after_first_analysis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
test_project_overview_after_first_analysis
open/overview?id=project-for-overview
waitForTextid=content*Quality Gate*Passed*
waitForTextid=content*A*0*Debt*0*Issues*
waitForTextid=content*0.0%*Duplications*0*Duplicated Blocks*
waitForTextid=content*13*Lines of Code*
assertNotTextid=content*Coverage*
waitForTextid=content*Quality Gate*SonarQube way*
waitForTextid=content*Quality Profiles*Xoo*Basic*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_ut_coverage_on_project_overview.html b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_ut_coverage_on_project_overview.html new file mode 100644 index 00000000000..158ddb02de3 --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectOverviewTest/test_ut_coverage_on_project_overview.html @@ -0,0 +1,75 @@ + + + + + + + test_project_overview_after_first_analysis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
test_project_overview_after_first_analysis
open/overview?id=project-for-overview-ut-coverage
waitForTextid=content*50.0%*Coverage*
open/overview/coverage?id=project-for-overview-ut-coverage
waitForTextid=content*Coverage*50.0%*
waitForTextid=content*Line coverage*50.0%*
waitForTextid=content*Condition coverage*50.0%*
waitForTextid=content*Lines to cover*4*
waitForTextid=content*Uncovered conditions*1*
waitForTextid=content*Uncovered lines*2*
waitForTextid=content*Size*Uncovered lines*
waitForTextid=content*Size*Lines of code*Color*Coverage*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/complexity/complexity-widget.html b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/complexity/complexity-widget.html new file mode 100644 index 00000000000..e29192aa467 --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/complexity/complexity-widget.html @@ -0,0 +1,44 @@ + + + + + + complexity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
complexity
open/widget?id=complexity&resource=project-widgets-test-project&metric1=complexity&metric2=ncloc&chartTitle=MyWidget
assertTextblock_1*Complexity*
assertTextm_class_complexity3.0
assertTextm_file_complexity3.0
assertTextm_complexity3
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html new file mode 100644 index 00000000000..1f059bb1017 --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html @@ -0,0 +1,74 @@ + + + + + + should-exclude-new-metrics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
should-exclude-new-metrics
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
clickAndWaitlink=Configure widgets
waitForTextid=content*History Table*
clickAndWaitid=add-widget-custom_measures
waitForTextid=content*Metric 1*
assertElementPresent//div[@class='widget_props' and @style='']//option[text()='Overall condition coverage']
assertElementNotPresent//div[@class='widget_props' and @style='']//option[text()='Overall new condition coverage']
clicklink=Delete
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/description/description-widget.html b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/description/description-widget.html new file mode 100644 index 00000000000..a3f2b8fdcb6 --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/description/description-widget.html @@ -0,0 +1,29 @@ + + + + + + description-widget + + + + + + + + + + + + + + + + + + + + +
description-widget
open/widget?id=description&resource=project-widgets-test-project
assertTextblock_1*ProjectWidgetsTest Project*project-widgets-test-project*Profiles:*Basic*Quality Gate*SonarQube way*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hide-if-no-measures.html b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hide-if-no-measures.html new file mode 100644 index 00000000000..53abb62658a --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hide-if-no-measures.html @@ -0,0 +1,29 @@ + + + + + + hide-if-no-measures + + + + + + + + + + + + + + + + + + + + +
open/widget?id=hotspot_metric&resource=project-widgets-test-project&metric=dit
assertElementPresentblock_1
assertNotTextblock_1*Depth*
+ + diff --git a/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html new file mode 100644 index 00000000000..9d2358b703a --- /dev/null +++ b/it/it-tests/src/test/resources/measure/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html @@ -0,0 +1,34 @@ + + + + + + hotspot_metric + + + + + + + + + + + + + + + + + + + + + + + + + +
hotspot_metric
open/widget?id=hotspot_metric&resource=project-widgets-test-project&metric=ncloc&title=NewTitle
assertTextclass=hotspot_metric*NewTitle*Sample.xoo*
assertElementPresentlink=Sample.xoo
+ + diff --git a/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-metrics.html b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-metrics.html new file mode 100644 index 00000000000..7ed09d6219a --- /dev/null +++ b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-metrics.html @@ -0,0 +1,39 @@ + + + + + + should-add-metrics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/comparison/index
assertNotTextcomparison-page*Major issues*
waitForElementPresentnew_metric
typeAndWaitnew_metricmajor_violations
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*Major issues*
+ + diff --git a/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-projects.html b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-projects.html new file mode 100644 index 00000000000..18c882331ad --- /dev/null +++ b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-add-projects.html @@ -0,0 +1,44 @@ + + + + + + should-add-projects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/comparison/index
waitForElementPresentnew_resource
typenew_resourceproject-comparison-test-project
waitForElementPresent//option[text()='1.0-SNAPSHOT']
selectAndWaitnew_version1.0-SNAPSHOT
waitForTextid=content*ProjectComparisonTest Project*1.0-SNAPSHOT*
+ + diff --git a/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-display-basic-set-of-metrics.html b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-display-basic-set-of-metrics.html new file mode 100644 index 00000000000..491a99caee0 --- /dev/null +++ b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-display-basic-set-of-metrics.html @@ -0,0 +1,24 @@ + + + + + + should-display-basic-set-of-metrics + + + + + + + + + + + + + + + +
open/comparison/index
waitForTextid=content*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
+ + diff --git a/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-metrics.html b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-metrics.html new file mode 100644 index 00000000000..c4ae78e748d --- /dev/null +++ b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-metrics.html @@ -0,0 +1,69 @@ + + + + + + should-move-and-remove-metrics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/comparison/index
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
clickAndWaitdown-0
assertTextcomparison-page*Complexity*Lines of code*Comments (%)*Duplicated lines (%)*Issues*Coverage*
clickAndWaitup-5
assertTextcomparison-page*Complexity*Lines of code*Comments (%)*Duplicated lines (%)*Coverage*Issues*
assertTextcomparison-page*%*
clickAndWaitdel-m-2
clickAndWaitdel-m-2
assertTextcomparison-page*Complexity*Lines of code*Coverage*Issues*
assertNotTextcomparison-page*%*
+ + diff --git a/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-projects.html b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-projects.html new file mode 100644 index 00000000000..f7d71dbfd2f --- /dev/null +++ b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-move-and-remove-projects.html @@ -0,0 +1,54 @@ + + + + + + should-move-and-remove-projects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/comparison/index
waitForElementPresentnew_resource
typenew_resourceproject-comparison-test-project
waitForElementPresent//option[text()='1.0-SNAPSHOT']
selectAndWaitnew_version1.0-SNAPSHOT
waitForTextid=content*ProjectComparisonTest Project*1.0-SNAPSHOT*
clickAndWaitdel-r-0
assertNotTextid=content*Sample*
+ + diff --git a/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-not-add-differential-metrics.html b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-not-add-differential-metrics.html new file mode 100644 index 00000000000..a47a119367c --- /dev/null +++ b/it/it-tests/src/test/resources/projectComparison/ProjectComparisonTest/should-not-add-differential-metrics.html @@ -0,0 +1,44 @@ + + + + + + should-not-add-differential-metrics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/comparison/index
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
waitForElementPresentnew_metric
typeAndWaitnew_metricnew_violations
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
assertNotTextcomparison-page*New Issues*
+ + diff --git a/it/it-tests/src/test/resources/projectServices/AllProjectsTest/test_all_projects_page.html b/it/it-tests/src/test/resources/projectServices/AllProjectsTest/test_all_projects_page.html deleted file mode 100644 index 551ede118ed..00000000000 --- a/it/it-tests/src/test/resources/projectServices/AllProjectsTest/test_all_projects_page.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - should-display-all-projects-page - - - - - - - - - - - - - - - - - - - - - - - - - -
open/all_projects?qualifier=TRK
waitForTextid=content*All Projects*
waitForTextid=content*Name*
waitForTextid=content*AllProjectsTest Project*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectCodeTest/code_page_should_expand_root_dir.html b/it/it-tests/src/test/resources/projectServices/ProjectCodeTest/code_page_should_expand_root_dir.html deleted file mode 100644 index 4cc72851fb5..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectCodeTest/code_page_should_expand_root_dir.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - code_page_should_expand_root_dir - - - - - - - - - - - - - - - - - - - - -
code_page_should_expand_root_dir
open/code?id=project-for-code-root-dir
waitForTextcss=#content*Hello.xoo*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectCodeTest/test_project_code_page.html b/it/it-tests/src/test/resources/projectServices/ProjectCodeTest/test_project_code_page.html deleted file mode 100644 index 9c6b163fa44..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectCodeTest/test_project_code_page.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - test_project_code_page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_project_code_page
open/code?id=project-for-code
waitForTextcss=#content*Project For Code*13*0*0*0.0%*
waitForTextcss=#content*src/main/xoo/sample*
clickcss=.code-name-cell a
waitForTextcss=#content*Sample.xoo*
clickcss=.code-breadcrumbs a
waitForNotTextcss=#content*Sample.xoo*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-metrics.html b/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-metrics.html deleted file mode 100644 index 7ed09d6219a..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-metrics.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - should-add-metrics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/comparison/index
assertNotTextcomparison-page*Major issues*
waitForElementPresentnew_metric
typeAndWaitnew_metricmajor_violations
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*Major issues*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-projects.html b/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-projects.html deleted file mode 100644 index 18c882331ad..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-add-projects.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - should-add-projects - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/comparison/index
waitForElementPresentnew_resource
typenew_resourceproject-comparison-test-project
waitForElementPresent//option[text()='1.0-SNAPSHOT']
selectAndWaitnew_version1.0-SNAPSHOT
waitForTextid=content*ProjectComparisonTest Project*1.0-SNAPSHOT*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-display-basic-set-of-metrics.html b/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-display-basic-set-of-metrics.html deleted file mode 100644 index 491a99caee0..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-display-basic-set-of-metrics.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - should-display-basic-set-of-metrics - - - - - - - - - - - - - - - -
open/comparison/index
waitForTextid=content*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-metrics.html b/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-metrics.html deleted file mode 100644 index c4ae78e748d..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-metrics.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - should-move-and-remove-metrics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/comparison/index
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
clickAndWaitdown-0
assertTextcomparison-page*Complexity*Lines of code*Comments (%)*Duplicated lines (%)*Issues*Coverage*
clickAndWaitup-5
assertTextcomparison-page*Complexity*Lines of code*Comments (%)*Duplicated lines (%)*Coverage*Issues*
assertTextcomparison-page*%*
clickAndWaitdel-m-2
clickAndWaitdel-m-2
assertTextcomparison-page*Complexity*Lines of code*Coverage*Issues*
assertNotTextcomparison-page*%*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-projects.html b/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-projects.html deleted file mode 100644 index f7d71dbfd2f..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-move-and-remove-projects.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - should-move-and-remove-projects - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/comparison/index
waitForElementPresentnew_resource
typenew_resourceproject-comparison-test-project
waitForElementPresent//option[text()='1.0-SNAPSHOT']
selectAndWaitnew_version1.0-SNAPSHOT
waitForTextid=content*ProjectComparisonTest Project*1.0-SNAPSHOT*
clickAndWaitdel-r-0
assertNotTextid=content*Sample*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-not-add-differential-metrics.html b/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-not-add-differential-metrics.html deleted file mode 100644 index a47a119367c..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectComparisonTest/should-not-add-differential-metrics.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - should-not-add-differential-metrics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/comparison/index
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
waitForElementPresentnew_metric
typeAndWaitnew_metricnew_violations
assertTextcomparison-page*Lines of code*Complexity*Comments (%)*Duplicated lines (%)*Issues*Coverage*
assertNotTextcomparison-page*New Issues*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectDrilldownTest/should_display_measure_drilldown.html b/it/it-tests/src/test/resources/projectServices/ProjectDrilldownTest/should_display_measure_drilldown.html deleted file mode 100644 index ce89d3df2df..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectDrilldownTest/should_display_measure_drilldown.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - should_display_measure_drilldown - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/drilldown/measures?id=project-drilldown-test-project&metric=ncloc
waitForTextid=drilldown*Sample.xoo*
waitForElementPresentcss=a[data-key="project-drilldown-test-project:src/main/xoo/sample/Sample.xoo"]
waitForElementPresentcss=a.js-drilldown-link.js-ready
clickcss=a[data-key="project-drilldown-test-project:src/main/xoo/sample/Sample.xoo"]
waitForElementPresentcss=.source-viewer
waitForTextcss=.source-viewer*src/main/xoo/sample/*Sample.xoo*
waitForTextcss=.source-viewer*public class Sample {*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html b/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html deleted file mode 100644 index 3cbf2bf44fa..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/should-display-nice-error-on-unknown-project.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - static-files - - - - - - - - - - - - - - - -
open/dashboard/index?id=unknown
waitForTexterror*The requested project does not exist. Either it has never been analyzed successfully or it has been deleted.*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_it_coverage_on_project_overview.html b/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_it_coverage_on_project_overview.html deleted file mode 100644 index 09d5b93211e..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_it_coverage_on_project_overview.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - test_project_overview_after_first_analysis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_project_overview_after_first_analysis
open/overview?id=project-for-overview-it-coverage
waitForTextid=content*50.0%*Coverage*
open/overview/coverage?id=project-for-overview-it-coverage
waitForTextid=content*IT coverage*50.0%*
waitForTextid=content*IT line coverage*50.0%*
waitForTextid=content*IT condition coverage*50.0%*
waitForTextid=content*IT uncovered conditions*1*
waitForTextid=content*IT uncovered lines*2*
waitForTextid=content*Size*IT uncovered lines*
waitForTextid=content*Size*Lines of code*Color*IT coverage*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_overall_coverage_on_project_overview.html b/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_overall_coverage_on_project_overview.html deleted file mode 100644 index 8ef8b08e055..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_overall_coverage_on_project_overview.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - test_project_overview_after_first_analysis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_project_overview_after_first_analysis
open/overview?id=project-for-overview-overall-coverage
waitForTextid=content*62.5%*Coverage*
open/overview/coverage?id=project-for-overview-overall-coverage
waitForTextid=content*Overall coverage*62.5%*
waitForTextid=content*Overall line coverage*75.0%*
waitForTextid=content*Overall condition coverage*50.0%*
waitForTextid=content*Uncovered conditions*3*
waitForTextid=content*IT uncovered conditions*3*
waitForTextid=content*Overall uncovered conditions*2*
waitForTextid=content*Uncovered lines*2*
waitForTextid=content*IT uncovered lines*2*
waitForTextid=content*Overall uncovered lines*1*
waitForTextid=content*Size*Overall uncovered lines*
waitForTextid=content*Size*Lines of code*Color*Overall coverage*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_project_overview_after_first_analysis.html b/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_project_overview_after_first_analysis.html deleted file mode 100644 index 57852d8531a..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_project_overview_after_first_analysis.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - test_project_overview_after_first_analysis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_project_overview_after_first_analysis
open/overview?id=project-for-overview
waitForTextid=content*Quality Gate*Passed*
waitForTextid=content*A*0*Debt*0*Issues*
waitForTextid=content*0.0%*Duplications*0*Duplicated Blocks*
waitForTextid=content*13*Lines of Code*
assertNotTextid=content*Coverage*
waitForTextid=content*Quality Gate*SonarQube way*
waitForTextid=content*Quality Profiles*Xoo*Basic*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_ut_coverage_on_project_overview.html b/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_ut_coverage_on_project_overview.html deleted file mode 100644 index 158ddb02de3..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectOverviewTest/test_ut_coverage_on_project_overview.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - test_project_overview_after_first_analysis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
test_project_overview_after_first_analysis
open/overview?id=project-for-overview-ut-coverage
waitForTextid=content*50.0%*Coverage*
open/overview/coverage?id=project-for-overview-ut-coverage
waitForTextid=content*Coverage*50.0%*
waitForTextid=content*Line coverage*50.0%*
waitForTextid=content*Condition coverage*50.0%*
waitForTextid=content*Lines to cover*4*
waitForTextid=content*Uncovered conditions*1*
waitForTextid=content*Uncovered lines*2*
waitForTextid=content*Size*Uncovered lines*
waitForTextid=content*Size*Lines of code*Color*Coverage*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/complexity/complexity-widget.html b/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/complexity/complexity-widget.html deleted file mode 100644 index e29192aa467..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/complexity/complexity-widget.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - complexity - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
complexity
open/widget?id=complexity&resource=project-widgets-test-project&metric1=complexity&metric2=ncloc&chartTitle=MyWidget
assertTextblock_1*Complexity*
assertTextm_class_complexity3.0
assertTextm_file_complexity3.0
assertTextm_complexity3
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html b/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html deleted file mode 100644 index 1f059bb1017..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/custom_measures/should-exclude-new-metrics.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - should-exclude-new-metrics - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
should-exclude-new-metrics
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
clickAndWaitlink=Configure widgets
waitForTextid=content*History Table*
clickAndWaitid=add-widget-custom_measures
waitForTextid=content*Metric 1*
assertElementPresent//div[@class='widget_props' and @style='']//option[text()='Overall condition coverage']
assertElementNotPresent//div[@class='widget_props' and @style='']//option[text()='Overall new condition coverage']
clicklink=Delete
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/description/description-widget.html b/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/description/description-widget.html deleted file mode 100644 index a3f2b8fdcb6..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/description/description-widget.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - description-widget - - - - - - - - - - - - - - - - - - - - -
description-widget
open/widget?id=description&resource=project-widgets-test-project
assertTextblock_1*ProjectWidgetsTest Project*project-widgets-test-project*Profiles:*Basic*Quality Gate*SonarQube way*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hide-if-no-measures.html b/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hide-if-no-measures.html deleted file mode 100644 index 53abb62658a..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hide-if-no-measures.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - hide-if-no-measures - - - - - - - - - - - - - - - - - - - - -
open/widget?id=hotspot_metric&resource=project-widgets-test-project&metric=dit
assertElementPresentblock_1
assertNotTextblock_1*Depth*
- - diff --git a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html b/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html deleted file mode 100644 index 9d2358b703a..00000000000 --- a/it/it-tests/src/test/resources/projectServices/ProjectWidgetsTest/hotspots/hotspot-metric-widget.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - hotspot_metric - - - - - - - - - - - - - - - - - - - - - - - - - -
hotspot_metric
open/widget?id=hotspot_metric&resource=project-widgets-test-project&metric=ncloc&title=NewTitle
assertTextclass=hotspot_metric*NewTitle*Sample.xoo*
assertElementPresentlink=Sample.xoo
- - diff --git a/it/it-tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html new file mode 100644 index 00000000000..42e1fc154f2 --- /dev/null +++ b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/symbol-usages-highlighting.html @@ -0,0 +1,49 @@ + + + + + + highlight-symbol-usages + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
highlight-symbol-usages
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
waitForXpathCount//span[contains(@class, 'sym')]3
waitForXpathCount//span[contains(@class, 'sym highlighted')]0
click//span[contains(@class, 'sym')][2]
waitForXpathCount//span[contains(@class, 'sym highlighted')]2
+ + diff --git a/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html new file mode 100644 index 00000000000..368c3bdf58e --- /dev/null +++ b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v1.html @@ -0,0 +1,60 @@ + + + + + + java-syntax-highlighting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
highlight-syntax-v1
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
storeHtmlSource
verifyHtmlSourceglob:*<span class="k">package</span>*
verifyHtmlSourceglob:*<span class="k">public</span>*
verifyHtmlSourceglob:*<span class="k">class</span>*
verifyHtmlSourceglob:*<span class="s">return</span>*
verifyHtmlSourceglob:*<span class="s">"hello"</span>*
+ + diff --git a/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html new file mode 100644 index 00000000000..57c535a10d3 --- /dev/null +++ b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting-v2.html @@ -0,0 +1,59 @@ + + + + + + java-syntax-highlighting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
highlight-syntax-v2
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
storeHtmlSource
verifyHtmlSourceglob:*<span class="k">package</span>*
verifyHtmlSourceglob:*<span class="k">public</span>*
verifyHtmlSourceglob:*<span class="k">class</span>*
verifyHtmlSourceglob:*<span class="k">return</span>*
verifyHtmlSourceglob:*<span class="s">"hello"</span>*
+ + diff --git a/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html new file mode 100644 index 00000000000..24d0ac63903 --- /dev/null +++ b/it/it-tests/src/test/resources/sourceCode/HighlightingTest/syntax-highlighting.html @@ -0,0 +1,59 @@ + + + + + + java-syntax-highlighting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
highlight-syntax
open/component/index?id=sample-with-highlighting%3Asrc%2Fmain%2Fxoo%2Fsample%2FSample.xoo
waitForElementPresentcss=.source-line
storeHtmlSource
verifyHtmlSourceglob:*<span class="k">package</span>*
verifyHtmlSourceglob:*<span class="k">public</span>*
verifyHtmlSourceglob:*<span class="k">class</span>*
verifyHtmlSourceglob:*<span class="k">return</span>*
verifyHtmlSourceglob:*<span class="s">"hello"</span>*
+ + diff --git a/it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html b/it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html new file mode 100644 index 00000000000..4cc72851fb5 --- /dev/null +++ b/it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/code_page_should_expand_root_dir.html @@ -0,0 +1,30 @@ + + + + + + + code_page_should_expand_root_dir + + + + + + + + + + + + + + + + + + + + +
code_page_should_expand_root_dir
open/code?id=project-for-code-root-dir
waitForTextcss=#content*Hello.xoo*
+ + diff --git a/it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html b/it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html new file mode 100644 index 00000000000..9c6b163fa44 --- /dev/null +++ b/it/it-tests/src/test/resources/sourceCode/ProjectCodeTest/test_project_code_page.html @@ -0,0 +1,55 @@ + + + + + + + test_project_code_page + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
test_project_code_page
open/code?id=project-for-code
waitForTextcss=#content*Project For Code*13*0*0*0.0%*
waitForTextcss=#content*src/main/xoo/sample*
clickcss=.code-name-cell a
waitForTextcss=#content*Sample.xoo*
clickcss=.code-breadcrumbs a
waitForNotTextcss=#content*Sample.xoo*
+ + -- cgit v1.2.3