コード例 #1
0
  @Feature(
      summary = "The user can search for another user",
      tcmsTestPlanIds = 5316,
      tcmsTestCaseIds = 0)
  @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
  public void successfulPersonSearchAndDisplay() throws Exception {
    ExplorePage explorePage =
        new BasicWorkFlow()
            .goToHome()
            .gotoExplore()
            .enterSearch("trans")
            .expectPersonListContains("translator");

    assertThat(explorePage.getUserSearchResults())
        .contains("translator")
        .as("Normal user can see the person listed");

    ProfilePage profilePage = explorePage.clickUserSearchEntry("translator");

    assertThat(profilePage.getUsername().trim()).isEqualTo("translator");
    assertThat(profilePage.getDisplayName().trim()).isEqualTo("translator");
    String languages = profilePage.getLanguages().trim();
    assertThat(Splitter.on(",").trimResults().split(languages))
        .contains("Hindi", "Polish", "French");
  }
コード例 #2
0
  @Feature(
      summary = "The system will provide no results on an " + "unsuccessful search",
      tcmsTestPlanIds = 5316,
      tcmsTestCaseIds = 0)
  @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
  public void unsuccessfulPersonSearch() throws Exception {
    ExplorePage explorePage = new BasicWorkFlow().goToHome().gotoExplore().enterSearch("snart");

    assertThat(explorePage.getUserSearchResults().isEmpty())
        .isTrue()
        .as("The user is not displayed");
  }