From daecd67d182a23e4e2696a241a580f5bfbcf740c Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 14 Jul 2016 00:42:36 +0200 Subject: [PATCH] SONAR-7880 Fix IT due to refactoring of projects management page --- .../authorisation/ProvisioningPermissionTest.java | 15 ++++++--------- .../should-be-able-to-provision-project.html | 9 +++++++-- .../should-not-be-able-to-provision-project.html | 9 +++++++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/it/it-tests/src/test/java/it/authorisation/ProvisioningPermissionTest.java b/it/it-tests/src/test/java/it/authorisation/ProvisioningPermissionTest.java index 27a621ac910..8666a1c09a6 100644 --- a/it/it-tests/src/test/java/it/authorisation/ProvisioningPermissionTest.java +++ b/it/it-tests/src/test/java/it/authorisation/ProvisioningPermissionTest.java @@ -39,6 +39,7 @@ import org.sonarqube.ws.client.permission.PermissionsService; import org.sonarqube.ws.client.permission.RemoveGroupWsRequest; import org.sonarqube.ws.client.permission.RemoveUserWsRequest; import util.QaOnly; +import util.selenium.SeleneseTest; import util.user.UserRule; import static org.assertj.core.api.Assertions.assertThat; @@ -98,11 +99,9 @@ public class ProvisioningPermissionTest { * SONAR-4709 */ @Test - public void should_not_be_able_to_provision_projec() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should-not-be-able-to-provision-project", - "/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html" - ).build(); - orchestrator.executeSelenese(selenese); + public void should_not_be_able_to_provision_project() { + new SeleneseTest(Selenese.builder().setHtmlTestsInClasspath("should-not-be-able-to-provision-project", + "/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html").build()).runOn(orchestrator); } /** @@ -111,10 +110,8 @@ public class ProvisioningPermissionTest { */ @Test public void should_be_able_to_provision_project() { - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should-be-able-to-provision-project", - "/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html" - ).build(); - orchestrator.executeSelenese(selenese); + new SeleneseTest(Selenese.builder().setHtmlTestsInClasspath("should-be-able-to-provision-project", + "/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html").build()).runOn(orchestrator); } /** diff --git a/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html b/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html index d88d5f532de..e968d015676 100644 --- a/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html +++ b/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html @@ -33,6 +33,11 @@ name=commit + + waitForElementPresent + css=.js-user-authenticated + + open /projects @@ -44,9 +49,9 @@ - assertElementPresent + assertText css=.page-actions button - + *Create Project* diff --git a/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html b/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html index 2a114a66173..428cf851541 100644 --- a/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html +++ b/it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html @@ -33,6 +33,11 @@ name=commit + + waitForElementPresent + css=.js-user-authenticated + + open /projects @@ -44,9 +49,9 @@ - assertElementNotPresent + assertNotText css=.page-actions button - + *Create Project* -- 2.39.5