From: Julien Lancelot Date: Wed, 13 Jul 2016 22:42:36 +0000 (+0200) Subject: SONAR-7880 Fix IT due to refactoring of projects management page X-Git-Tag: 6.0-RC1~54 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=daecd67d182a23e4e2696a241a580f5bfbcf740c;p=sonarqube.git SONAR-7880 Fix IT due to refactoring of projects management page --- 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*