diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-09-05 11:00:00 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-09-11 11:28:29 +0200 |
commit | 71fec25c4056c1dcfe75769c2041b1d56a89a2e5 (patch) | |
tree | e640a76709b242652d3cc274a9d0a98f720ae768 /tests/src/test/java/org | |
parent | 0926670e79d919e0afa3f0a2e11f656bdcd05916 (diff) | |
download | sonarqube-71fec25c4056c1dcfe75769c2041b1d56a89a2e5.tar.gz sonarqube-71fec25c4056c1dcfe75769c2041b1d56a89a2e5.zip |
SONAR-9784 rewrite projects management page
Diffstat (limited to 'tests/src/test/java/org')
-rw-r--r-- | tests/src/test/java/org/sonarqube/pageobjects/ProjectsManagementPage.java | 15 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/authorisation/ProvisioningPermissionTest.java | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/tests/src/test/java/org/sonarqube/pageobjects/ProjectsManagementPage.java b/tests/src/test/java/org/sonarqube/pageobjects/ProjectsManagementPage.java index f359ed761d5..c6dd13c2cbd 100644 --- a/tests/src/test/java/org/sonarqube/pageobjects/ProjectsManagementPage.java +++ b/tests/src/test/java/org/sonarqube/pageobjects/ProjectsManagementPage.java @@ -19,10 +19,9 @@ */ package org.sonarqube.pageobjects; -import com.codeborne.selenide.CollectionCondition; - import static com.codeborne.selenide.Condition.exist; import static com.codeborne.selenide.Condition.text; +import static com.codeborne.selenide.Condition.visible; import static com.codeborne.selenide.Selenide.$; import static com.codeborne.selenide.Selenide.$$; @@ -52,13 +51,11 @@ public class ProjectsManagementPage { } public ProjectsManagementPage bulkApplyPermissionTemplate(String template) { - $(".js-bulk-apply-permission-template").should(exist).click(); - $(".modal .select2-choice").should(exist).click(); - $$(".select2-results li") - .shouldHave(CollectionCondition.sizeGreaterThan(0)) - .findBy(text("foo-template")).should(exist).click(); - $(".modal .js-apply").should(exist).click(); - $(".modal-body .alert-success").should(exist); + $(".js-bulk-apply-permission-template").click(); + $(".modal .Select-value").click(); + $$(".modal .Select-option").findBy(text(template)).click(); + $(".modal-foot button").click(); + $(".modal-body .alert-success").shouldBe(visible); return this; } } diff --git a/tests/src/test/java/org/sonarqube/tests/authorisation/ProvisioningPermissionTest.java b/tests/src/test/java/org/sonarqube/tests/authorisation/ProvisioningPermissionTest.java index 8d3b7ac007a..a71af6eecc5 100644 --- a/tests/src/test/java/org/sonarqube/tests/authorisation/ProvisioningPermissionTest.java +++ b/tests/src/test/java/org/sonarqube/tests/authorisation/ProvisioningPermissionTest.java @@ -95,7 +95,7 @@ public class ProvisioningPermissionTest { * SONAR-4709 */ @Test - public void organization_administrator_cannot_provision_project_if_he_doesnt_have_provisioning_permission() { + public void organization_administrator_cannot_provision_project_if_he_does_not_have_provisioning_permission() { runSelenese(orchestrator, "/authorisation/ProvisioningPermissionTest/should-not-be-able-to-provision-project.html"); } @@ -131,7 +131,7 @@ public class ProvisioningPermissionTest { * SONAR-4709 */ @Test - public void user_cannot_provision_project_through_ws_if_he_doesnt_have_provisioning_permission() { + public void user_cannot_provision_project_through_ws_if_he_does_not_have_provisioning_permission() { thrown.expect(HttpException.class); thrown.expectMessage("403"); |