Пример #1
0
  @Test
  public void shouldNotFindAnything() {
    BrowseApiPage browseApiPage =
        open(BrowseApiPage.class).search("ThisOrganizationDoesNotExistForSure");

    browseApiPage.noContentInfo().shouldBe(present);
  }
Пример #2
0
  @Test
  public void shouldFindSingleResult() {
    BrowseApiPage browseApiPage = open(BrowseApiPage.class).search(firstApiBean.getName());

    browseApiPage.noContentInfo().shouldNotBe(visible);
    browseApiPage.resultEntries().shouldHaveSize(1);
  }
Пример #3
0
  @Test
  public void shouldLandOnCorrectPageWhenClickOnResult() {
    BrowseApiPage browseOrgPage = open(BrowseApiPage.class).search(firstApiBean.getName());

    browseOrgPage.openResult(firstApiBean.getName());

    PageAssert.assertBrowseApiDetail(firstApiBean);
  }
Пример #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);
  }
Пример #5
0
  @Test
  public void shouldNotListAnyResultBeforeSearch() {
    BrowseApiPage browseApiPage = open(BrowseApiPage.class, "");

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