diff options
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"); |