From: Julien Lancelot Date: Fri, 12 Feb 2016 10:43:14 +0000 (+0100) Subject: Move SystemAdminPermissionTest to authorisation X-Git-Tag: 5.5-M1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=640ae85cdd30643c8c58ab092b998274422758d0;p=sonarqube.git Move SystemAdminPermissionTest to authorisation --- diff --git a/it/it-tests/src/test/java/it/Category1Suite.java b/it/it-tests/src/test/java/it/Category1Suite.java index 8e5b1bdeac5..a81080064be 100644 --- a/it/it-tests/src/test/java/it/Category1Suite.java +++ b/it/it-tests/src/test/java/it/Category1Suite.java @@ -47,6 +47,7 @@ import it.authorisation.IssuePermissionTest; import it.authorisation.PermissionSearchTest; import it.authorisation.ProvisioningPermissionTest; import it.authorisation.QualityProfileAdminPermissionTest; +import it.authorisation.SystemAdminPermissionTest; import it.i18n.I18nTest; import it.measureHistory.DifferentialPeriodsTest; import it.measureHistory.HistoryUiTest; @@ -100,13 +101,14 @@ import static util.ItUtils.xooPlugin; QualityGateTest.class, QualityGateUiTest.class, QualityGateNotificationTest.class, - // permission + // authorisation DashboardSharingPermissionTest.class, ExecuteAnalysisPermissionTest.class, IssuePermissionTest.class, PermissionSearchTest.class, ProvisioningPermissionTest.class, QualityProfileAdminPermissionTest.class, + SystemAdminPermissionTest.class, // measure history DifferentialPeriodsTest.class, HistoryUiTest.class, diff --git a/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java b/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java new file mode 100644 index 00000000000..cb893b6a49b --- /dev/null +++ b/it/it-tests/src/test/java/it/authorisation/SystemAdminPermissionTest.java @@ -0,0 +1,102 @@ +/* + * 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.authorisation; + +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.selenium.Selenese; +import it.Category1Suite; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.sonarqube.ws.client.permission.AddUserWsRequest; +import org.sonarqube.ws.client.permission.PermissionsService; +import util.user.UserRule; + +import static util.ItUtils.newAdminWsClient; +import static util.ItUtils.runProjectAnalysis; + +public class SystemAdminPermissionTest { + + @ClassRule + public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR; + + @ClassRule + public static UserRule userRule = UserRule.from(orchestrator); + + @BeforeClass + public static void setUpUsers() { + orchestrator.resetData(); + + PermissionsService permissionsWsClient = newAdminWsClient(orchestrator).permissions(); + + userRule.createUser("can_share", "password"); + permissionsWsClient.addUser(new AddUserWsRequest().setLogin("can_share").setPermission("shareDashboard")); + + userRule.createUser("cannot_share", "password"); + } + + @AfterClass + public static void reset() { + userRule.resetUsers(); + } + + /** + * SONAR-4398 + */ + @Test + public void should_change_ownership_of_shared_measure_filter() throws Exception { + // change-own-measure-filter-owner.html + // 1 - as admin, create measure filter, shared with every one + // 2 - as admin, edit filter and set owner to can_share + seleniumSuite("change-measure-filter-ownership", + "/authorisation/SystemAdminPermissionTest/change-own-measure-filter-owner.html", + "/authorisation/SystemAdminPermissionTest/change-other-measure-filter-owner.html", + "/authorisation/SystemAdminPermissionTest/change-system-measure-filter-owner.html"); + } + + /** + * SONAR-4136 + */ + @Test + public void should_change_ownership_of_shared_global_dashboard() throws Exception { + seleniumSuite("change-global-dashboard-ownership", + "/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html", + "/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html"); + } + + /** + * SONAR-4136 + */ + @Test + public void should_change_ownership_of_shared_project_dashboard() throws Exception { + runProjectAnalysis(orchestrator, "shared/xoo-sample"); + + seleniumSuite("change-project-dashboard-ownership", + "/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html", + "/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html"); + } + + private void seleniumSuite(String suiteName, String... tests) { + Selenese selenese = Selenese.builder().setHtmlTestsInClasspath(suiteName, tests).build(); + orchestrator.executeSelenese(selenese); + } + +} diff --git a/it/it-tests/src/test/java/it/permissions/SystemAdminPermissionTest.java b/it/it-tests/src/test/java/it/permissions/SystemAdminPermissionTest.java deleted file mode 100644 index 5f04b26d796..00000000000 --- a/it/it-tests/src/test/java/it/permissions/SystemAdminPermissionTest.java +++ /dev/null @@ -1,120 +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.permissions; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.build.SonarScanner; -import com.sonar.orchestrator.selenium.Selenese; -import it.Category4Suite; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.sonarqube.ws.client.PostRequest; -import org.sonarqube.ws.client.WsClient; -import util.ItUtils; - -public class SystemAdminPermissionTest { - - @ClassRule - public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR; - - @BeforeClass - public static void setUpUsers() { - orchestrator.resetData(); - - WsClient client = ItUtils.newAdminWsClient(orchestrator); - - createUser(client, "can_share", "password"); - addPermission("can_share", "shareDashboard"); - - createUser(client, "cannot_share", "password"); - } - - @AfterClass - public static void reset() { - WsClient client = ItUtils.newAdminWsClient(orchestrator); - deactivateUser(client, "can_share"); - deactivateUser(client, "cannot_share"); - } - - /** - * SONAR-4398 - */ - @Test - public void should_change_ownership_of_shared_measure_filter() throws Exception { - // change-own-measure-filter-owner.html - // 1 - as admin, create measure filter, shared with every one - // 2 - as admin, edit filter and set owner to can_share - seleniumSuite("change-measure-filter-ownership", - "/permissions/SystemAdminPermissionTest/change-own-measure-filter-owner.html", - "/permissions/SystemAdminPermissionTest/change-other-measure-filter-owner.html", - "/permissions/SystemAdminPermissionTest/change-system-measure-filter-owner.html"); - } - - /** - * SONAR-4136 - */ - @Test - public void should_change_ownership_of_shared_global_dashboard() throws Exception { - seleniumSuite("change-global-dashboard-ownership", - "/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html", - "/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html"); - } - - /** - * SONAR-4136 - */ - @Test - public void should_change_ownership_of_shared_project_dashboard() throws Exception { - orchestrator.executeBuild(SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))); - - seleniumSuite("change-project-dashboard-ownership", - "/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html", - "/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html"); - } - - private void seleniumSuite(String suiteName, String... tests) { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath(suiteName, tests).build(); - orchestrator.executeSelenese(selenese); - } - - private static void addPermission(String login, String permission) { - orchestrator.getServer().adminWsClient().post("api/permissions/add_user", - "login", login, - "permission", permission); - } - - private static void createUser(WsClient client, String login, String password) { - client.wsConnector().call( - new PostRequest("api/users/create") - .setParam("login", login) - .setParam("name", login) - .setParam("password", password) - ); - } - - private static void deactivateUser(WsClient client, String login) { - client.wsConnector().call( - new PostRequest("/api/users/deactivate") - .setParam("login", login) - ); - } -} diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-other-measure-filter-owner.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-other-measure-filter-owner.html new file mode 100644 index 00000000000..bd7ab433180 --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-other-measure-filter-owner.html @@ -0,0 +1,164 @@ + + + + + + change-other-measure-filter-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
storeEval'filter_'+(new Date()).getTime()FILTER_NAME
open/sessions/logout
open/sessions/new
typelogincan_share
typepasswordpassword
clickAndWaitcommit
open/measures
waitForElementPresentclass=navigator-filter-submit
clickclass=navigator-filter-submit
waitForTextcontent*Save As*
clicksave-as
waitForTextsave-as-filter-form*Save Filter*
typename${FILTER_NAME}
clickname=shared
clickAndWaitsave-as-submit
waitForTextfilter-titleglob:*${FILTER_NAME}*Shared with all users*
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/measures
waitForElementPresentid=manage-favorites
clickAndWaitid=manage-favorites
assertTextshared-filtersglob:*${FILTER_NAME}*
clickedit_system_${FILTER_NAME}
waitForTextedit-filter-form*Edit Filter*
typeselect-filter-owneradmin
clickAndWaitsave-submit
assertTextfilter-titleglob:*${FILTER_NAME}*Shared with all users*
+ + diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-own-measure-filter-owner.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-own-measure-filter-owner.html new file mode 100644 index 00000000000..fda11c0eb7a --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-own-measure-filter-owner.html @@ -0,0 +1,134 @@ + + + + + + change-own-measure-filter-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
storeEval'filter_'+(new Date()).getTime()FILTER_NAME
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/measures
waitForElementPresentclass=navigator-filter-submit
clickclass=navigator-filter-submit
waitForTextcontent*Save As*
clicksave-as
waitForTextsave-as-filter-form*Save Filter*
typename${FILTER_NAME}
clickname=shared
clickAndWaitsave-as-submit
waitForTextfilter-titleglob:*${FILTER_NAME}*Shared with all users*
waitForElementPresentid=manage-favorites
clickAndWaitid=manage-favorites
assertTextmy-filtersglob:*${FILTER_NAME}*
clickedit_${FILTER_NAME}
waitForTextedit-filter-form*Edit Filter*
typeselect-filter-ownercan_share
clickAndWaitsave-submit
assertTextfilter-titleglob:*${FILTER_NAME}*Shared by can_share*
+ + diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html new file mode 100644 index 00000000000..d89c7cb54af --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html @@ -0,0 +1,104 @@ + + + + + + change-shared-global-dashboard-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/logout
open/dashboards
typeloginadmin
typepasswordadmin
clickAndWaitcommit
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-global-dashboard-fail
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercannot_share
clicksave-submit
waitForVisiblecss=div.modal-body > p.error
assertTextcss=div.modal-body > p.errorglob:*User cannot own this dashboard because of insufficient rights*
+ + diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html new file mode 100644 index 00000000000..46819e977fc --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html @@ -0,0 +1,104 @@ + + + + + + change-shared-global-dashboard-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/logout
open/dashboards
typeloginadmin
typepasswordadmin
clickAndWaitcommit
waitForVisiblecreate-link-dashboard
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-global-dashboard
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercan_share
clickAndWaitsave-submit
assertTextdashboardsglob:*can_share*
+ + diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html new file mode 100644 index 00000000000..7a4545dcfd3 --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html @@ -0,0 +1,109 @@ + + + + + + change-shared-project-dashboard-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards?resource=sample
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-project-dashboard-fail
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercannot_share
clicksave-submit
waitForVisiblecss=div.modal-body > p.error
assertTextcss=div.modal-body > p.errorglob:*User cannot own this dashboard because of insufficient rights*
+ + diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html new file mode 100644 index 00000000000..05bfe502af7 --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html @@ -0,0 +1,104 @@ + + + + + + change-shared-project-dashboard-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards?resource=sample
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-project-dashboard
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercan_share
clickAndWaitsave-submit
assertTextdashboardsglob:*can_share*
+ + diff --git a/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-system-measure-filter-owner.html b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-system-measure-filter-owner.html new file mode 100644 index 00000000000..0379982322e --- /dev/null +++ b/it/it-tests/src/test/resources/authorisation/SystemAdminPermissionTest/change-system-measure-filter-owner.html @@ -0,0 +1,89 @@ + + + + + + change-system-measure-filter-owner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
storeEval'filter_'+(new Date()).getTime()FILTER_NAME
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/measures
waitForElementPresentid=manage-favorites
clickAndWaitid=manage-favorites
assertTextshared-filtersglob:*My favourites*
clickedit_system_my-favourites
waitForTextedit-filter-form*Edit Filter*
typeselect-filter-owneradmin
clickAndWaitsave-submit
assertTextfilter-titleglob:*My favourites*Shared with all users*
+ + diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-other-measure-filter-owner.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-other-measure-filter-owner.html deleted file mode 100644 index bd7ab433180..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-other-measure-filter-owner.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - change-other-measure-filter-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
storeEval'filter_'+(new Date()).getTime()FILTER_NAME
open/sessions/logout
open/sessions/new
typelogincan_share
typepasswordpassword
clickAndWaitcommit
open/measures
waitForElementPresentclass=navigator-filter-submit
clickclass=navigator-filter-submit
waitForTextcontent*Save As*
clicksave-as
waitForTextsave-as-filter-form*Save Filter*
typename${FILTER_NAME}
clickname=shared
clickAndWaitsave-as-submit
waitForTextfilter-titleglob:*${FILTER_NAME}*Shared with all users*
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/measures
waitForElementPresentid=manage-favorites
clickAndWaitid=manage-favorites
assertTextshared-filtersglob:*${FILTER_NAME}*
clickedit_system_${FILTER_NAME}
waitForTextedit-filter-form*Edit Filter*
typeselect-filter-owneradmin
clickAndWaitsave-submit
assertTextfilter-titleglob:*${FILTER_NAME}*Shared with all users*
- - diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-own-measure-filter-owner.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-own-measure-filter-owner.html deleted file mode 100644 index fda11c0eb7a..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-own-measure-filter-owner.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - change-own-measure-filter-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
storeEval'filter_'+(new Date()).getTime()FILTER_NAME
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/measures
waitForElementPresentclass=navigator-filter-submit
clickclass=navigator-filter-submit
waitForTextcontent*Save As*
clicksave-as
waitForTextsave-as-filter-form*Save Filter*
typename${FILTER_NAME}
clickname=shared
clickAndWaitsave-as-submit
waitForTextfilter-titleglob:*${FILTER_NAME}*Shared with all users*
waitForElementPresentid=manage-favorites
clickAndWaitid=manage-favorites
assertTextmy-filtersglob:*${FILTER_NAME}*
clickedit_${FILTER_NAME}
waitForTextedit-filter-form*Edit Filter*
typeselect-filter-ownercan_share
clickAndWaitsave-submit
assertTextfilter-titleglob:*${FILTER_NAME}*Shared by can_share*
- - diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html deleted file mode 100644 index d89c7cb54af..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner-failure.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - change-shared-global-dashboard-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/sessions/logout
open/dashboards
typeloginadmin
typepasswordadmin
clickAndWaitcommit
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-global-dashboard-fail
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercannot_share
clicksave-submit
waitForVisiblecss=div.modal-body > p.error
assertTextcss=div.modal-body > p.errorglob:*User cannot own this dashboard because of insufficient rights*
- - diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html deleted file mode 100644 index 46819e977fc..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-global-dashboard-owner.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - change-shared-global-dashboard-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/sessions/logout
open/dashboards
typeloginadmin
typepasswordadmin
clickAndWaitcommit
waitForVisiblecreate-link-dashboard
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-global-dashboard
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercan_share
clickAndWaitsave-submit
assertTextdashboardsglob:*can_share*
- - diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html deleted file mode 100644 index 7a4545dcfd3..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner-failure.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - change-shared-project-dashboard-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards?resource=sample
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-project-dashboard-fail
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercannot_share
clicksave-submit
waitForVisiblecss=div.modal-body > p.error
assertTextcss=div.modal-body > p.errorglob:*User cannot own this dashboard because of insufficient rights*
- - diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html deleted file mode 100644 index 05bfe502af7..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-shared-project-dashboard-owner.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - change-shared-project-dashboard-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/dashboards?resource=sample
clickcreate-link-dashboard
waitForVisiblecss=div.modal-body
typenameshared-project-dashboard
storeValuenameDASHBOARD_NAME
clickname=shared
clickAndWaitsave-submit
waitForVisibleedit-${DASHBOARD_NAME}
clickedit-${DASHBOARD_NAME}
waitForVisiblecss=div.modal-body
typeselect-dashboard-ownercan_share
clickAndWaitsave-submit
assertTextdashboardsglob:*can_share*
- - diff --git a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-system-measure-filter-owner.html b/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-system-measure-filter-owner.html deleted file mode 100644 index 0379982322e..00000000000 --- a/it/it-tests/src/test/resources/permissions/SystemAdminPermissionTest/change-system-measure-filter-owner.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - change-system-measure-filter-owner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
storeEval'filter_'+(new Date()).getTime()FILTER_NAME
open/sessions/logout
open/sessions/new
typeloginadmin
typepasswordadmin
clickAndWaitcommit
open/measures
waitForElementPresentid=manage-favorites
clickAndWaitid=manage-favorites
assertTextshared-filtersglob:*My favourites*
clickedit_system_my-favourites
waitForTextedit-filter-form*Edit Filter*
typeselect-filter-owneradmin
clickAndWaitsave-submit
assertTextfilter-titleglob:*My favourites*Shared with all users*
- -