diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-07-14 00:42:36 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-07-14 00:42:36 +0200 |
commit | daecd67d182a23e4e2696a241a580f5bfbcf740c (patch) | |
tree | 3104fc596ad27c778a9041fc9268d23ecb5ec1ec /it | |
parent | 3f785d11349584c856b0c55a014e4714037ddd84 (diff) | |
download | sonarqube-daecd67d182a23e4e2696a241a580f5bfbcf740c.tar.gz sonarqube-daecd67d182a23e4e2696a241a580f5bfbcf740c.zip |
SONAR-7880 Fix IT due to refactoring of projects management page
Diffstat (limited to 'it')
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 @@ -34,6 +34,11 @@ <td></td> </tr> <tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> + </tr> + <tr> <td>open</td> <td>/projects</td> <td></td> @@ -44,9 +49,9 @@ <td></td> </tr> <tr> - <td>assertElementPresent</td> + <td>assertText</td> <td>css=.page-actions button</td> - <td></td> + <td>*Create Project*</td> </tr> </tbody> </table> 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 @@ -34,6 +34,11 @@ <td></td> </tr> <tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> + </tr> + <tr> <td>open</td> <td>/projects</td> <td></td> @@ -44,9 +49,9 @@ <td></td> </tr> <tr> - <td>assertElementNotPresent</td> + <td>assertNotText</td> <td>css=.page-actions button</td> - <td></td> + <td>*Create Project*</td> </tr> </tbody> </table> |