/**
   * Open Repository Page: Default View
   *
   * @param driver WebDrone Instance
   * @return RepositoryPage
   */
  public static RepositoryPage openRepository(WebDrone driver) {
    SharePage page = ShareUser.getSharePage(driver);

    RepositoryPage repositorypage = page.getNav().selectRepository().render();
    logger.info("Opened RepositoryPage");
    return repositorypage;
  }
  /**
   * Navigate to the User Language page.
   *
   * @param drone
   * @return
   */
  public static LanguageSettingsPage navigateToLanguage(WebDrone drone) {
    SharePage sharePage = getSharePage(drone);

    if (sharePage instanceof LanguageSettingsPage) {
      return ((LanguageSettingsPage) sharePage).render();
    } else {
      MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render();
      return myProfilePage.getProfileNav().selectLanguage().render();
    }
  }
  /**
   * Open Repository Page: Top Level Assumes User is logged in Opens repository in simple View
   *
   * @param driver WebDrone Instance
   * @return RepositoryPage
   */
  public static RepositoryPage openRepositoryGalleryView(WebDrone driver) {

    // Assumes User is logged in
    SharePage page = ShareUser.getSharePage(driver);

    RepositoryPage repositorypage = page.getNav().selectRepository();
    repositorypage = ((RepositoryPage) ShareUserSitePage.selectView(driver, ViewType.GALLERY_VIEW));
    logger.info("Opened RepositoryPage");
    return repositorypage;
  }
  /**
   * Navigate to the User Notification page.
   *
   * @param drone
   * @return
   */
  public static NotificationPage navigateToNotifications(WebDrone drone) {
    SharePage sharePage = getSharePage(drone);

    if (sharePage instanceof NotificationPage) {
      return ((NotificationPage) sharePage).render();
    } else {
      MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render();
      return myProfilePage.getProfileNav().selectNotification().render();
    }
  }
  /**
   * Navigate to the User Sites List page.
   *
   * @param drone
   * @return
   */
  public static UserSitesPage navigateToUserSites(WebDrone drone) {
    SharePage sharePage = getSharePage(drone);

    if (sharePage instanceof UserSitesPage) {
      return ((UserSitesPage) sharePage).render();
    } else {
      MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render();
      return myProfilePage.getProfileNav().selectSites().render();
    }
  }
  /**
   * @param drone
   * @return
   */
  public static TrashCanPage navigateToTrashCan(WebDrone drone) {
    SharePage sharePage = getSharePage(drone);

    if (sharePage instanceof TrashCanPage) {
      return ((TrashCanPage) sharePage).render();
    } else {
      MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render();
      return myProfilePage.getProfileNav().selectTrashCan().render();
    }
  }
 @Test(groups = "Enterprise-only", timeOut = 400000)
 public void checkThatFactoryReturnCategoryManagerPage() throws Exception {
   SharePage page = loginAs("admin", "admin");
   page.getNav().getCategoryManagerPage().render();
   assertTrue(drone.getCurrentPage().render() instanceof CategoryManagerPage);
 }
Exemplo n.º 8
0
 @Test(groups = "Enterprise-only")
 public void checkThatFactoryReturnTagManagerPage() throws Exception {
   SharePage page = loginAs("admin", "admin");
   page.getNav().getTagManagerPage().render();
   drone.getCurrentPage().render();
 }