diff options
Diffstat (limited to 'it/it-tests/src/test')
-rw-r--r-- | it/it-tests/src/test/java/it/projectSearch/ProjectsPageTest.java | 20 | ||||
-rw-r--r-- | it/it-tests/src/test/java/pageobjects/projects/FacetItem.java | 5 |
2 files changed, 23 insertions, 2 deletions
diff --git a/it/it-tests/src/test/java/it/projectSearch/ProjectsPageTest.java b/it/it-tests/src/test/java/it/projectSearch/ProjectsPageTest.java index 280bd54cb7d..45dceeac2c6 100644 --- a/it/it-tests/src/test/java/it/projectSearch/ProjectsPageTest.java +++ b/it/it-tests/src/test/java/it/projectSearch/ProjectsPageTest.java @@ -26,6 +26,7 @@ import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; +import org.sonarqube.ws.client.PostRequest; import org.sonarqube.ws.client.WsClient; import pageobjects.Navigation; import pageobjects.projects.ProjectsPage; @@ -118,7 +119,7 @@ public class ProjectsPageTest { } @Test - public void should_add_language() { + public void should_add_language_to_facet() { ProjectsPage page = nav.openProjects(); page.getFacetByProperty("languages") .selectOptionItem("xoo2") @@ -126,6 +127,23 @@ public class ProjectsPageTest { } @Test + public void should_add_tag_to_facet() { + // Add some tags to this project + wsClient.wsConnector().call( + new PostRequest("api/project_tags/set") + .setParam("project", PROJECT_KEY) + .setParam("tags", "aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,zz") + ); + + ProjectsPage page = nav.openProjects(); + page.getFacetByProperty("tags") + .shouldHaveValue("aa", "1") + .shouldHaveValue("ii", "1") + .selectOptionItem("zz") + .shouldHaveValue("zz", "1"); + } + + @Test public void should_sort_by_facet() { ProjectsPage page = nav.openProjects(); page.getFacetByProperty("duplications") diff --git a/it/it-tests/src/test/java/pageobjects/projects/FacetItem.java b/it/it-tests/src/test/java/pageobjects/projects/FacetItem.java index 79ff84d1005..528cb3c2505 100644 --- a/it/it-tests/src/test/java/pageobjects/projects/FacetItem.java +++ b/it/it-tests/src/test/java/pageobjects/projects/FacetItem.java @@ -42,7 +42,10 @@ public class FacetItem { } public FacetItem selectOptionItem(String value) { - this.elt.$(".Select-input input").val(value).pressEnter(); + SelenideElement selectInput = this.elt.$(".Select-input input"); + selectInput.val(value); + this.elt.$("div.Select-option.is-focused").should(Condition.exist); + selectInput.pressEnter(); return this; } |