Exemplo n.º 1
0
  @Test
  public void shouldNotFindAnything() {
    BrowseApiPage browseApiPage =
        open(BrowseApiPage.class).search("ThisOrganizationDoesNotExistForSure");

    browseApiPage.noContentInfo().shouldBe(present);
  }
Exemplo n.º 2
0
  @Test
  public void shouldFindSingleResult() {
    BrowseApiPage browseApiPage = open(BrowseApiPage.class).search(firstApiBean.getName());

    browseApiPage.noContentInfo().shouldNotBe(visible);
    browseApiPage.resultEntries().shouldHaveSize(1);
  }
Exemplo n.º 3
0
  @Test
  public void shouldLandOnCorrectPageWhenClickOnResult() {
    BrowseApiPage browseOrgPage = open(BrowseApiPage.class).search(firstApiBean.getName());

    browseOrgPage.openResult(firstApiBean.getName());

    PageAssert.assertBrowseApiDetail(firstApiBean);
  }
Exemplo n.º 4
0
  @Test
  public void shouldFindMultipleResults() {
    BrowseApiPage browseOrgPage = open(BrowseApiPage.class).search(ApiUtils.TEST_API_NAME_BASE);

    browseOrgPage.noContentInfo().shouldNotBe(visible);
    browseOrgPage
        .resultEntries()
        .filterBy(or("name equal to", text(firstApiBean.getName()), text(secondApiBean.getName())))
        .shouldHaveSize(2);
  }
Exemplo n.º 5
0
  @Test
  public void shouldNotListAnyResultBeforeSearch() {
    BrowseApiPage browseApiPage = open(BrowseApiPage.class, "");

    browseApiPage.noContentInfo().shouldBe(present);
  }