From 32f6a67a429623f9ccc14944f11aa75260441aed Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 12 Feb 2016 14:42:19 +0100 Subject: [PATCH] Move DashboardTest ITs --- it/it-plugins/dashboard-plugin/pom.xml | 37 +++ .../src/main/java/FakeDashboardTemplate.java | 42 ++++ .../src/main/java/UiPlugin.java | 28 +++ .../java/WidgetWithMandatoryProperties.java | 46 ++++ .../org/sonar/l10n/dashboardplugin.properties | 1 + .../sonar/l10n/dashboardplugin_fr.properties | 1 + .../widget-with-mandatory-properties.html.erb | 16 ++ it/it-plugins/pom.xml | 1 + .../src/test/java/it/Category4Suite.java | 7 +- .../it/componentDashboard/DashboardTest.java | 168 +++++++++++++ .../java/it/duplication/DuplicationsTest.java | 11 + .../configure_dashboard/filter_widgets.html | 78 ++++++ .../keep_filter_after_adding_widget.html | 73 ++++++ .../configure_dashboard/main_dashboard.html | 33 +++ ...ject_widget_with_mandatory_properties.html | 89 +++++++ .../dashboard-should-be-registered.html | 29 +++ .../test-location-of-widgets.html | 48 ++++ .../dashboard_extension/xss.html | 94 +++++++ .../documentation_and_comments_widget.html | 49 ++++ .../default_widgets/welcome_widget.html | 24 ++ .../create-global-dashboards-error.html | 155 ++++++++++++ .../global_dashboard/default-dashboards.html | 104 ++++++++ .../edit-global-dashboards.html | 135 +++++++++++ .../edit-project-dashboards.html | 229 ++++++++++++++++++ .../global_dashboard/filter-widget-admin.html | 134 ++++++++++ .../filter-widget-anonymous.html | 44 ++++ .../global-admin-dashboards.html | 89 +++++++ ...-dashboard-applies-project-permission.html | 79 ++++++ .../manage-global-dashboard.html | 214 ++++++++++++++++ .../order-global-dashboard.html | 119 +++++++++ .../order-project-default-dashboards.html | 89 +++++++ .../global_dashboard/project-widget.html | 109 +++++++++ .../share_dashboard/follow-unfollow.html | 73 ++++++ .../should-not-unshare-default-dashboard.html | 188 ++++++++++++++ .../DuplicationsTest/duplications_widget.html | 44 ++++ .../should_display_measure_drilldown.html | 5 + 36 files changed, 2684 insertions(+), 1 deletion(-) create mode 100644 it/it-plugins/dashboard-plugin/pom.xml create mode 100644 it/it-plugins/dashboard-plugin/src/main/java/FakeDashboardTemplate.java create mode 100644 it/it-plugins/dashboard-plugin/src/main/java/UiPlugin.java create mode 100644 it/it-plugins/dashboard-plugin/src/main/java/WidgetWithMandatoryProperties.java create mode 100644 it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin.properties create mode 100644 it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin_fr.properties create mode 100644 it/it-plugins/dashboard-plugin/src/main/resources/widgets/widget-with-mandatory-properties.html.erb create mode 100644 it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/filter_widgets.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/keep_filter_after_adding_widget.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/main_dashboard.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_widget/add_project_widget_with_mandatory_properties.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/dashboard-should-be-registered.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/test-location-of-widgets.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/xss.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/documentation_and_comments_widget.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/welcome_widget.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/create-global-dashboards-error.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/default-dashboards.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-global-dashboards.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-admin.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-anonymous.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-admin-dashboards.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-dashboard-applies-project-permission.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/manage-global-dashboard.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-global-dashboard.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-project-default-dashboards.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/project-widget.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html create mode 100644 it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html create mode 100644 it/it-tests/src/test/resources/duplication/DuplicationsTest/duplications_widget.html diff --git a/it/it-plugins/dashboard-plugin/pom.xml b/it/it-plugins/dashboard-plugin/pom.xml new file mode 100644 index 00000000000..469554e8c10 --- /dev/null +++ b/it/it-plugins/dashboard-plugin/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + org.sonarsource.sonarqube + it-plugins + 5.5-SNAPSHOT + + + dashboard-plugin + 1.0-SNAPSHOT + sonar-plugin + SonarQube Integration Tests :: Plugins :: UI + Main plugin for UI tests + + + + org.sonarsource.sonarqube + sonar-plugin-api + ${apiVersion} + provided + + + + + + + org.sonarsource.sonar-packaging-maven-plugin + sonar-packaging-maven-plugin + true + + UiPlugin + + + + + diff --git a/it/it-plugins/dashboard-plugin/src/main/java/FakeDashboardTemplate.java b/it/it-plugins/dashboard-plugin/src/main/java/FakeDashboardTemplate.java new file mode 100644 index 00000000000..581201a495e --- /dev/null +++ b/it/it-plugins/dashboard-plugin/src/main/java/FakeDashboardTemplate.java @@ -0,0 +1,42 @@ +/* + * 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. + */ +import org.sonar.api.web.Dashboard; +import org.sonar.api.web.DashboardLayout; +import org.sonar.api.web.DashboardTemplate; + +public class FakeDashboardTemplate extends DashboardTemplate { + + @Override + public Dashboard createDashboard() { + Dashboard dashboard = Dashboard.create() + .setLayout(DashboardLayout.TWO_COLUMNS_30_70) + .setDescription("Fake dashboard for integration tests"); + dashboard.addWidget("lcom4", 1); + dashboard.addWidget("description", 1); + dashboard.addWidget("documentation_comments", 2); + dashboard.addWidget("complexity", 3); // should be ignored because the layout is 2 columns + return dashboard; + } + + @Override + public String getName() { + return "Fake"; + } +} diff --git a/it/it-plugins/dashboard-plugin/src/main/java/UiPlugin.java b/it/it-plugins/dashboard-plugin/src/main/java/UiPlugin.java new file mode 100644 index 00000000000..79495a14c55 --- /dev/null +++ b/it/it-plugins/dashboard-plugin/src/main/java/UiPlugin.java @@ -0,0 +1,28 @@ +/* + * 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. + */ +import java.util.Arrays; +import java.util.List; +import org.sonar.api.SonarPlugin; + +public class UiPlugin extends SonarPlugin { + public List getExtensions() { + return Arrays.asList(FakeDashboardTemplate.class, WidgetWithMandatoryProperties.class); + } +} diff --git a/it/it-plugins/dashboard-plugin/src/main/java/WidgetWithMandatoryProperties.java b/it/it-plugins/dashboard-plugin/src/main/java/WidgetWithMandatoryProperties.java new file mode 100644 index 00000000000..eb966a33901 --- /dev/null +++ b/it/it-plugins/dashboard-plugin/src/main/java/WidgetWithMandatoryProperties.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +import org.sonar.api.web.AbstractRubyTemplate; +import org.sonar.api.web.RubyRailsWidget; +import org.sonar.api.web.WidgetProperties; +import org.sonar.api.web.WidgetProperty; +import org.sonar.api.web.WidgetPropertyType; + +@WidgetProperties({ + @WidgetProperty(key = "mandatoryString", optional = false), + @WidgetProperty(key = "mandatoryInt", optional = false, type = WidgetPropertyType.INTEGER) + +}) +public class WidgetWithMandatoryProperties extends AbstractRubyTemplate implements RubyRailsWidget { + + public String getId() { + return "widget-with-mandatory-properties"; + } + + public String getTitle() { + return "Widget with Mandatory Properties"; + } + + @Override + protected String getTemplatePath() { + return "/widgets/widget-with-mandatory-properties.html.erb"; + } +} + diff --git a/it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin.properties b/it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin.properties new file mode 100644 index 00000000000..8db961d7486 --- /dev/null +++ b/it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin.properties @@ -0,0 +1 @@ +dashboard.Fake.name=Fake \ No newline at end of file diff --git a/it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin_fr.properties b/it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin_fr.properties new file mode 100644 index 00000000000..4bbe9f6250b --- /dev/null +++ b/it/it-plugins/dashboard-plugin/src/main/resources/org/sonar/l10n/dashboardplugin_fr.properties @@ -0,0 +1 @@ +dashboard.Fake.name=Artificiel \ No newline at end of file diff --git a/it/it-plugins/dashboard-plugin/src/main/resources/widgets/widget-with-mandatory-properties.html.erb b/it/it-plugins/dashboard-plugin/src/main/resources/widgets/widget-with-mandatory-properties.html.erb new file mode 100644 index 00000000000..5e57af614da --- /dev/null +++ b/it/it-plugins/dashboard-plugin/src/main/resources/widgets/widget-with-mandatory-properties.html.erb @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +
PropertyValue
mandatoryString<%= widget_properties['mandatoryString'] -%>
mandatoryInt<%= widget_properties['mandatoryInt'] -%>
diff --git a/it/it-plugins/pom.xml b/it/it-plugins/pom.xml index fa1df6e5231..a44beb0b8f2 100644 --- a/it/it-plugins/pom.xml +++ b/it/it-plugins/pom.xml @@ -33,6 +33,7 @@ access-secured-props-plugin base-auth-plugin batch-plugin + dashboard-plugin extension-lifecycle-plugin global-property-change-plugin issue-action-plugin diff --git a/it/it-tests/src/test/java/it/Category4Suite.java b/it/it-tests/src/test/java/it/Category4Suite.java index 6ecd8a7fd60..dbe3f376edb 100644 --- a/it/it-tests/src/test/java/it/Category4Suite.java +++ b/it/it-tests/src/test/java/it/Category4Suite.java @@ -24,6 +24,7 @@ import it.analysisExclusion.FileExclusionsTest; import it.analysisExclusion.IssueExclusionsTest; import it.component.ComponentsWsTest; import it.component.ProjectSearchTest; +import it.componentDashboard.DashboardTest; import it.customMeasure.CustomMeasuresTest; import it.dbCleaner.PurgeTest; import it.duplication.CrossProjectDuplicationsOnRemoveFileTest; @@ -81,7 +82,8 @@ import static util.ItUtils.xooPlugin; // project event EventTest.class, // highlighting - HighlightingTest.class + HighlightingTest.class, + DashboardTest.class }) public class Category4Suite { @@ -95,5 +97,8 @@ public class Category4Suite { // Used in OAuth2IdentityProviderTest .addPlugin(pluginArtifact("oauth2-auth-plugin")) + // Used in DashboardTest + .addPlugin(pluginArtifact("dashboard-plugin")) + .build(); } diff --git a/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java b/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java new file mode 100644 index 00000000000..b4e57a57af9 --- /dev/null +++ b/it/it-tests/src/test/java/it/componentDashboard/DashboardTest.java @@ -0,0 +1,168 @@ +/* + * 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.componentDashboard; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category4Suite; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; + +import static util.ItUtils.runProjectAnalysis; + +public class DashboardTest { + + @ClassRule + public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; + + @BeforeClass + public static void scanProject() { + orchestrator.resetData(); + runProjectAnalysis(orchestrator, "shared/xoo-sample"); + } + + /** + * SONAR-1929 + */ + @Test + public void dashboard_extension() { + seleniumSuite("dashboard_extension", + "/componentDashboard/DashboardTest/dashboard_extension/dashboard-should-be-registered.html", + "/componentDashboard/DashboardTest/dashboard_extension/test-location-of-widgets.html", + + // SSF-19 + "/componentDashboard/DashboardTest/dashboard_extension/xss.html"); + } + + /** + * SONAR-3103 + */ + @Test + public void share_dashboard() { + seleniumSuite("share_dashboard", + "/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html", + "/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html"); + } + + @Test + public void configure_dashboard() { + seleniumSuite("configure_dashboard", + "/componentDashboard/DashboardTest/configure_dashboard/main_dashboard.html", + "/componentDashboard/DashboardTest/configure_dashboard/filter_widgets.html", + "/componentDashboard/DashboardTest/configure_dashboard/keep_filter_after_adding_widget.html"); + } + + @Test + public void configure_widget() { + seleniumSuite("configure_widget", + "/componentDashboard/DashboardTest/configure_widget/add_project_widget_with_mandatory_properties.html"); + } + + @Test + public void global_dashboard() { + seleniumSuite("global_dashboard", + // SONAR-3462 + "/componentDashboard/DashboardTest/global_dashboard/edit-global-dashboards.html", + + // SONAR-4630 + "/componentDashboard/DashboardTest/global_dashboard/create-global-dashboards-error.html", + + // SONAR-3462 + "/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html", + + // SONAR-3461 + "/componentDashboard/DashboardTest/global_dashboard/order-project-default-dashboards.html", + + // SONAR-3462 + "/componentDashboard/DashboardTest/global_dashboard/order-global-dashboard.html", + + // SONAR-1927 SONAR-3467 + "/componentDashboard/DashboardTest/global_dashboard/manage-global-dashboard.html", + + // SONAR-2073 SONAR-3459 + "/componentDashboard/DashboardTest/global_dashboard/filter-widget-admin.html", + + // SONAR-2073 + "/componentDashboard/DashboardTest/global_dashboard/filter-widget-anonymous.html", + + // SONAR-3460 + "/componentDashboard/DashboardTest/global_dashboard/global-admin-dashboards.html", + + // SONAR-3461 + "/componentDashboard/DashboardTest/global_dashboard/default-dashboards.html", + + // SONAR-3457 SONAR-3563 + "/componentDashboard/DashboardTest/global_dashboard/project-widget.html"); + + // Remove permission from anonymous user + removeGroupPermission("anyone", "sample", "user"); + addUserPermission("admin", "sample", "user"); + seleniumSuite("global_dashboard_project_permissions", + // SONAR-6004 + "/componentDashboard/DashboardTest/global_dashboard/global-dashboard-applies-project-permission.html"); + + // Put back permissions + addGroupPermission("anyone", "sample", "user"); + removeUserPermission("admin", "sample", "user"); + } + + @Test + public void default_widgets() { + seleniumSuite("default_widgets", + "/componentDashboard/DashboardTest/default_widgets/welcome_widget.html", + + // SONAR-4448 + "/componentDashboard/DashboardTest/default_widgets/documentation_and_comments_widget.html"); + } + + private void seleniumSuite(String suiteName, String... tests) { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath(suiteName, tests).build(); + orchestrator.executeSelenese(selenese); + } + + private static void addUserPermission(String login, String projectKey, String permission) { + orchestrator.getServer().adminWsClient().post("api/permissions/add_user", + "login", login, + "projectKey", projectKey, + "permission", permission); + } + + private static void removeUserPermission(String login, String projectKey, String permission) { + orchestrator.getServer().adminWsClient().post("api/permissions/remove_user", + "login", login, + "projectKey", projectKey, + "permission", permission); + } + + private static void addGroupPermission(String groupName, String projectKey, String permission) { + orchestrator.getServer().adminWsClient().post("api/permissions/add_group", + "groupName", groupName, + "projectKey", projectKey, + "permission", permission); + } + + private static void removeGroupPermission(String groupName, String projectKey, String permission) { + orchestrator.getServer().adminWsClient().post("api/permissions/remove_group", + "groupName", groupName, + "projectKey", projectKey, + "permission", permission); + } +} diff --git a/it/it-tests/src/test/java/it/duplication/DuplicationsTest.java b/it/it-tests/src/test/java/it/duplication/DuplicationsTest.java index ef8f8222181..688cffd5d90 100644 --- a/it/it-tests/src/test/java/it/duplication/DuplicationsTest.java +++ b/it/it-tests/src/test/java/it/duplication/DuplicationsTest.java @@ -21,6 +21,7 @@ package it.duplication; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.locator.FileLocation; +import com.sonar.orchestrator.selenium.Selenese; import it.Category4Suite; import java.util.List; import org.apache.commons.io.IOUtils; @@ -32,6 +33,7 @@ import org.sonar.wsclient.issue.Issue; import org.sonar.wsclient.issue.IssueQuery; import org.sonar.wsclient.services.Resource; import org.sonar.wsclient.services.ResourceQuery; +import util.selenium.SeleneseTest; import static org.assertj.core.api.Assertions.assertThat; import static org.skyscreamer.jsonassert.JSONAssert.assertEquals; @@ -132,6 +134,15 @@ public class DuplicationsTest { "api/duplications/show", "duplications_show-expected.json"); } + @Test + public void duplications_widget() throws Exception { + new SeleneseTest( + Selenese.builder().setHtmlTestsInClasspath("duplications_widget", + // SONAR-4347 + "/duplication/DuplicationsTest/duplications_widget.html").build()) + .runOn(orchestrator); + } + private static Resource getComponent(String key) { Resource component = orchestrator.getServer().getWsClient() .find(ResourceQuery.createForMetrics(key, "duplicated_lines", "duplicated_blocks", "duplicated_files", "duplicated_lines_density")); diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/filter_widgets.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/filter_widgets.html new file mode 100644 index 00000000000..ba749b60263 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/filter_widgets.html @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/logout
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboard/index?id=sample&name=Custom
clickAndWaitlink=Configure widgets
assertTextcss=#widget-filters li.selectedAny
assertVisibledef_hotspotmetric
assertVisibledef_complexity
clickid=widget-filter-Hotspots
assertVisibledef_hotspotmetric
waitForElementNotPresentdef_complexity
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/keep_filter_after_adding_widget.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/keep_filter_after_adding_widget.html new file mode 100644 index 00000000000..50dffd02f96 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/keep_filter_after_adding_widget.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/logout
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboard/index?id=sample&name=Custom
clickAndWaitlink=Configure widgets
waitForVisibleid=add-widget-complexity
clickid=widget-filter-Hotspots
waitForElementNotPresentid=add-widget-complexity
clickAndWaitadd-widget-hotspot_metric
waitForTextcss=#widget-filters li.selectedglob:*Hotspots*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/main_dashboard.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/main_dashboard.html new file mode 100644 index 00000000000..aedb5674a4e --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_dashboard/main_dashboard.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/dashboard/index?id=sample&name=Custom
assertElementPresentdashboard
assertElementPresentdashboard-column-1
assertElementPresentdashboard-column-2
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_widget/add_project_widget_with_mandatory_properties.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_widget/add_project_widget_with_mandatory_properties.html new file mode 100644 index 00000000000..9ff4a11d3a4 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/configure_widget/add_project_widget_with_mandatory_properties.html @@ -0,0 +1,89 @@ + + + + + + add_project_widget_with_mandatory_properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_project_widget_with_mandatory_properties
open/sessions/new
typeid=loginadmin
typeid=passwordadmin
clickAndWaitname=commit
open/dashboard/index?id=sample&name=Custom
clickAndWaitlink=Configure widgets
clickAndWaitid=add-widget-widget-with-mandatory-properties
assertTextdashboard-column-1*Widget with Mandatory Properties*
typeid=mandatoryStringhello
typeid=mandatoryInt123
clickAndWaitname=commit
assertTextdashboard-column-1*Widget with Mandatory Properties*
assertNotVisiblename=commit
assertTextdashboard-column-1*mandatoryString*hello*mandatoryInt*123*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/dashboard-should-be-registered.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/dashboard-should-be-registered.html new file mode 100644 index 00000000000..b681996ec42 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/dashboard-should-be-registered.html @@ -0,0 +1,29 @@ + + + + + + dashboard-should-be-registered + + + + + + + + + + + + + + + + + + + + +
dashboard-should-be-registered
open/dashboard/index/sample?name=Fake
waitForElementPresentlink=Fake
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/test-location-of-widgets.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/test-location-of-widgets.html new file mode 100644 index 00000000000..dda0b275806 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/test-location-of-widgets.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/dashboard/index/sample?name=Fake
assertElementPresentdashboard-column-1
assertElementPresentdashboard-column-2
assertElementNotPresentdashboard-column-3
assertElementPresentcss=#dashboard-column-1 .description
assertElementPresentcss=#dashboard-column-2 .documentation_comments
assertElementNotPresentcss=.complexity
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/xss.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/xss.html new file mode 100644 index 00000000000..ba7f8992fc5 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/dashboard_extension/xss.html @@ -0,0 +1,94 @@ + + + + + + xss + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xss
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
clickid=create-link-dashboard
waitForVisiblecreate-dashboard-form
typeid=name<script>alert('xss in name')</script>
typeid=description<script>alert('xss in description')</script>
clickAndWaitid=save-submit
assertTextdashboards*<script>alert('xss in name')</script>*<script>alert('xss in description')</script>*
clickid=delete-%3Cscript%3Ealert%28%27xss%20in%20name%27%29%3C%2Fscript%3E
waitForVisibledelete-dashboard-form
clickAndWaitid=confirm-submit
assertNotTextdashboards*alert*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/documentation_and_comments_widget.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/documentation_and_comments_widget.html new file mode 100644 index 00000000000..ce47a4ad149 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/documentation_and_comments_widget.html @@ -0,0 +1,49 @@ + + + + + + description-widget + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
description-widget
open/widget?id=documentation_comments&resource=sample
assertTextm_public_documented_api_density*60.0%*
assertTextm_public_api*5*
assertTextm_public_undocumented_api*2*
assertTextm_comment_lines_density*18.8%*
assertTextm_comment_lines*3*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/welcome_widget.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/welcome_widget.html new file mode 100644 index 00000000000..87ab072b9e5 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/default_widgets/welcome_widget.html @@ -0,0 +1,24 @@ + + + + + + welcome_widget + + + + + + + + + + + + + + + +
open/widget/index/welcome
assertTextblock_1*Welcome to SonarQube Dashboard*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/create-global-dashboards-error.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/create-global-dashboards-error.html new file mode 100644 index 00000000000..82292b1a48e --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/create-global-dashboards-error.html @@ -0,0 +1,155 @@ + + + + + + + + create-global-dashboards-error + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
create-global-dashboards-error
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameGLOBAL
clickAndWaitid=save-submit
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameGLOBAL
clickid=save-submit
waitForVisiblecss=p.error
assertTextcss=p.errorA dashboard already exists with the same name
typename=nameGLOBAL2
clickAndWaitid=save-submit
assertTextdashboards*GLOBAL*GLOBAL2*
clickid=delete-GLOBAL
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickAndWaitconfirm-submit
clickid=delete-GLOBAL2
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickAndWaitconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/default-dashboards.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/default-dashboards.html new file mode 100644 index 00000000000..3e401898ae0 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/default-dashboards.html @@ -0,0 +1,104 @@ + + + + + + default-dashboards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
default-dashboards
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/admin_dashboards
assertTextbody*Global Dashboards*
assertTextactiveGlobal*Home*
assertElementNotPresentremove-Home
assertTextactiveProject*Custom*
assertNotTextshared*Custom*
clickAndWaitid=remove-Custom
assertConfirmationAre you sure to remove it from default dashboards?
assertTextshared*Custom*
assertNotTextactiveProject*Custom*
clickAndWaitadd-Custom
assertTextactiveProject*Custom*
assertNotTextshared*Custom*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-global-dashboards.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-global-dashboards.html new file mode 100644 index 00000000000..70185981c2e --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-global-dashboards.html @@ -0,0 +1,135 @@ + + + + + + + + edit-global-dashboards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
edit-global-dashboards
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameGLOBAL
clickAndWaitid=save-submit
clickAndWaitid=unfollow-GLOBAL
assertTableid=shared-dashboards.1.0GLOBAL
assertTableid=shared-dashboards.1.4Configure widgets Edit Delete Follow
clickid=edit-GLOBAL
waitForVisiblecss=div.modal-head > h2
typename=descriptionDescription Shared
clickname=shared
clickAndWaitid=save-submit
waitForTextPresentDescription Shared
clickid=delete-GLOBAL
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickAndWaitconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html new file mode 100644 index 00000000000..4c4eef39d35 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/edit-project-dashboards.html @@ -0,0 +1,229 @@ + + + + + + edit-project-dashboards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
edit-project-dashboards
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards?resource=sample
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameProject Shared
clickname=shared
clickAndWaitid=save-submit
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameProject Not Shared
clickAndWaitid=save-submit
waitForTextPresentMy Project Dashboards
clickAndWaitid=unfollow-Project%20Shared
clickAndWaitid=unfollow-Project%20Not%20Shared
assertTableid=shared-dashboards.1.0Project Not Shared
assertTableid=shared-dashboards.2.0Project Shared
assertElementPresentid=follow-Project%20Shared
assertElementPresentid=follow-Project%20Not%20Shared
clickid=edit-Project%20Shared
waitForVisiblecss=div.modal-head > h2
typename=descriptionDescription Shared
clickAndWaitid=save-submit
waitForTextPresentDescription Shared
clickid=edit-Project%20Not%20Shared
waitForVisiblecss=div.modal-head > h2
typename=descriptionDescription Not Shared
clickAndWaitid=save-submit
waitForTextPresentDescription Not Shared
clickid=delete-Project%20Shared
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
waitForElementNotPresentconfirm-submit
waitForVisibledelete-Project%20Not%20Shared
clickdelete-Project%20Not%20Shared
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
waitForElementNotPresentconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-admin.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-admin.html new file mode 100644 index 00000000000..0287b7760db --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-admin.html @@ -0,0 +1,134 @@ + + + + + + filter-widget-admin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
filter-widget-admin
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameAllFilters
clickAndWaitid=save-submit
clickAndWaitid=configure-AllFilters
clickAndWaitid=add-widget-measure_filter_list
selectid=filterlabel=Projects
clickAndWaitname=commit
assertTableid=measures-table.1.2*Sample*
clickAndWaitid=add-widget-measure_filter_list
selectid=filterlabel=My favourites
clickAndWaitname=commit
assertTextxpath=(//div[contains(@class,"widget-title")])[1]My favourites
open/dashboards
clickid=delete-AllFilters
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-anonymous.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-anonymous.html new file mode 100644 index 00000000000..91a0731920d --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/filter-widget-anonymous.html @@ -0,0 +1,44 @@ + + + + + + filter-widget-amonymous + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
filter-widget-amonymous
open/sessions/logout
assertTextPresentHome
assertTextcontent*Welcome to SonarQube Dashboard*
assertNotTextcontent*My favourites*
assertTextcontent*Sample*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-admin-dashboards.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-admin-dashboards.html new file mode 100644 index 00000000000..67911a11d8c --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-admin-dashboards.html @@ -0,0 +1,89 @@ + + + + + + global-admin-dashboards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
global-admin-dashboards
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/
waitForElementPresentlink=Home
clickAndWaitlink=Home
clickAndWaitlink=Configure widgets
clickAndWaitlink=Back to dashboard
open/dashboards
open/settings/index
waitForElementPresentlink=Configuration
clicklink=Configuration
clickAndWaitlink=Default Dashboards
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-dashboard-applies-project-permission.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-dashboard-applies-project-permission.html new file mode 100644 index 00000000000..e647039a2fa --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/global-dashboard-applies-project-permission.html @@ -0,0 +1,79 @@ + + + + + + filter-widget-amonymous + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
filter-widget-amonymous
open/sessions/logout
assertTextPresentHome
assertTextcontent*Welcome to SonarQube Dashboard*
assertNotTextcontent*My favourites*
assertNotTextcontent*Sample*
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
assertTextcontent*Welcome to SonarQube Dashboard*
assertTextcontent*My favourites*
assertTextcontent*Sample*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/manage-global-dashboard.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/manage-global-dashboard.html new file mode 100644 index 00000000000..00f3d3d8604 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/manage-global-dashboard.html @@ -0,0 +1,214 @@ + + + + + + manage-global-dashboard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
manage-global-dashboard
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
assertTextcontent*My Global Dashboards*
assertNotTextcontent*My Project Dashboards*
assertTextcontent*Available Dashboards*
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameNewGlobalDashboard
typename=descriptionDashboard description
clickAndWaitid=save-submit
clickAndWaitid=configure-NewGlobalDashboard
clickAndWaitcss=img[alt="Layout333333"]
clickAndWaitid=add-widget-measure_filter_list
waitForTextdashboard-column-1*Measure Filter as List*
waitForVisiblefilter
selectid=filterlabel=Projects
clickAndWaitname=commit
assertTextdashboard-column-1*Projects*
clickAndWaitid=add-widget-complexity
assertTextdashboard-column-1*Project*
clickcss=a.select2-choice
type//input[@class='widget-select-prj-complexity']sample
clickAndWaitname=commit
assertTextdashboard-column-1*Sample*
waitForElementPresentlink=NewGlobalDashboard
clickAndWaitlink=NewGlobalDashboard
assertTextdashboard-column-1*Sample*
assertTextPresentProjects
clickAndWaitlink=Configure widgets
clicklink=Delete
clickAndWaitlink=Back to dashboard
open/dashboards
clickid=delete-NewGlobalDashboard
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-global-dashboard.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-global-dashboard.html new file mode 100644 index 00000000000..19da8f7f1dd --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-global-dashboard.html @@ -0,0 +1,119 @@ + + + + + + order-global-dashboard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
order-global-dashboard
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=namePersonal
clickAndWaitid=save-submit
assertTextdashboards*Home*Personal*
clickAndWaitid=up-Personal
assertTableid=dashboards.1.0Personal*
assertTableid=dashboards.2.0Home
clickAndWaitid=down-Personal
assertTableid=dashboards.1.0Home*
assertTableid=dashboards.2.0Personal
clickid=delete-Personal
waitForVisiblecss=div.modal-head > h2
assertTextcss=.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-project-default-dashboards.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-project-default-dashboards.html new file mode 100644 index 00000000000..e0281f68124 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/order-project-default-dashboards.html @@ -0,0 +1,89 @@ + + + + + + order-project-default-dashboards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
order-project-default-dashboards
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/admin_dashboards
assertTextPresentProject Dashboards
assertTableid=activeProject.1.0Custom
assertTableid=activeProject.2.0Fake
Fake dashboard for integration tests
clickAndWaitid=up-Fake
assertTableid=activeProject.1.0Fake
Fake dashboard for integration tests
assertTableid=activeProject.2.0Custom
clickAndWaitid=down-Fake
assertTableid=activeProject.1.0Custom
assertTableid=activeProject.2.0Fake
Fake dashboard for integration tests
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/project-widget.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/project-widget.html new file mode 100644 index 00000000000..995085bcf42 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/global_dashboard/project-widget.html @@ -0,0 +1,109 @@ + + + + + + project-widget + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
project-widget
open/sessions/login
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameProjectWidgets
clickAndWaitid=save-submit
clickAndWaitid=configure-ProjectWidgets
clickAndWaitid=add-widget-complexity
assertElementNotPresentxpath=(//div[contains(@class,"widget-title")])
assertTextPresentexact:Project *
type//input[@class='widget-select-prj-complexity']sample
clickname=commit
waitForTextxpath=(//div[contains(@class,"widget-title")])[1]Sample
assertElementPresentlink=Sample
assertElementPresentm_class_complexity
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html new file mode 100644 index 00000000000..21cfbb8ff14 --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/follow-unfollow.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards/index?resource=sample
assertTextdashboardsglob:*Custom*
clickAndWaitid=unfollow-Custom
assertTextshared-dashboardsglob:*Custom*
assertNotTextdashboardsglob:*Custom*
clickAndWaitid=follow-Custom
assertNotTextshared-dashboardsglob:*Custom*
assertTextdashboardsglob:*Custom*
+ + diff --git a/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html new file mode 100644 index 00000000000..4931162125f --- /dev/null +++ b/it/it-tests/src/test/resources/componentDashboard/DashboardTest/share_dashboard/should-not-unshare-default-dashboard.html @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards/index?resource=sample
clickcreate-link-dashboard
waitForVisiblecss=div.modal-head > h2
typename=nameIsDefault
clickname=shared
clickAndWaitsave-submit
open/admin_dashboards/index
clickAndWaitid=add-IsDefault
assertTextactiveProjectglob:*IsDefault*
open/dashboards/index?resource=sample
clickedit-IsDefault
waitForVisiblecss=div.modal-head > h2
clickname=shared
clicksave-submit
waitForVisiblecss=div.modal-body > p.error
assertTextcss=div.modal-body > p.errorglob:*This dashboard can't be unshared*
clicksave-cancel
clickid=delete-IsDefault
waitForVisiblecss=div.modal-head > h2
assertTextcss=div.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
waitForVisiblecss=div.modal-body .alert-danger
assertTextcss=div.modal-body .alert-dangerglob:*This dashboard can't be deleted*
open/admin_dashboards/index
clickid=remove-IsDefault
assertConfirmationAre you sure to remove it from default dashboards?
open/dashboards/index?resource=sample
clickid=delete-IsDefault
waitForVisiblecss=div.modal-head > h2
assertTextcss=div.modal-bodyDo you want to delete this dashboard?
clickconfirm-submit
+ + diff --git a/it/it-tests/src/test/resources/duplication/DuplicationsTest/duplications_widget.html b/it/it-tests/src/test/resources/duplication/DuplicationsTest/duplications_widget.html new file mode 100644 index 00000000000..626ee5e9995 --- /dev/null +++ b/it/it-tests/src/test/resources/duplication/DuplicationsTest/duplications_widget.html @@ -0,0 +1,44 @@ + + + + + + description-widget + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
description-widget
open/widget?id=duplications&resource=file-duplications
assertTextm_duplicated_lines_density*63.7%*
assertTextm_duplicated_lines*293*
assertTextm_duplicated_blocks*9*
assertTextm_duplicated_files*8*
+ + 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 index f39d6888a7f..ce89d3df2df 100644 --- 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 @@ -13,6 +13,11 @@ /drilldown/measures?id=project-drilldown-test-project&metric=ncloc + + waitForText + id=drilldown + *Sample.xoo* + waitForElementPresent css=a[data-key="project-drilldown-test-project:src/main/xoo/sample/Sample.xoo"] -- 2.39.5