]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7880 Fix IT due to refactoring of projects management page
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 13 Jul 2016 22:42:36 +0000 (00:42 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 13 Jul 2016 22:42:36 +0000 (00:42 +0200)
it/it-tests/src/test/java/it/authorisation/ProvisioningPermissionTest.java
it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-be-able-to-provision-project.html
it/it-tests/src/test/resources/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html

index 27a621ac91010e6ccc7961f05a60ad17d4f56dd6..8666a1c09a61b6d7e13c89a9a558d474a923d959 100644 (file)
@@ -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);
   }
 
   /**
index d88d5f532de24d2dc94fc3cd4df4749f9f64e838..e968d015676fdd4bd0a4411f91f8d6265df182fa 100644 (file)
     <td>name=commit</td>
     <td></td>
   </tr>
+  <tr>
+    <td>waitForElementPresent</td>
+    <td>css=.js-user-authenticated</td>
+    <td></td>
+  </tr>
   <tr>
     <td>open</td>
     <td>/projects</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>
index 2a114a6617310b74f00c08a3db118c5cac5bfa94..428cf8515414f0cdac94300906af4f7c5cab16c0 100644 (file)
     <td>name=commit</td>
     <td></td>
   </tr>
+  <tr>
+    <td>waitForElementPresent</td>
+    <td>css=.js-user-authenticated</td>
+    <td></td>
+  </tr>
   <tr>
     <td>open</td>
     <td>/projects</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>