/** * This method is used to delete the given user profile. * * @param testUser String * @param drone WebDrone * @return {@link UserSearchPage} */ protected UserSearchPage deleteUser(WebDrone drone, String testUser) { if (isAlfrescoVersionCloud(drone)) { throw new UnsupportedOperationException("Delete user is available in cloud"); } DashBoardPage dashBoard = drone.getCurrentPage().render(); UserSearchPage page = dashBoard.getNav().getUsersPage().render(); page = page.searchFor(testUser).render(); UserProfilePage userProfile = page.clickOnUser(testUser).render(); return userProfile.deleteUser().render(); }
/** * Log a user into Alfresco with valid credentials and then logout * * @throws Exception if error */ @Test public void loginAndLogout() throws Exception { drone.navigateTo(shareUrl); LoginPage page = drone.getCurrentPage().render(); Assert.assertTrue(page.isBrowserTitle("login")); Assert.assertFalse(page.hasErrorMessage()); DashBoardPage dashboardPage = (DashBoardPage) ShareUtil.loginAs(drone, shareUrl, username, password); dashboardPage.render(); Assert.assertFalse(page.isBrowserTitle("login")); Assert.assertTrue(dashboardPage.isBrowserTitle("dashboard")); Assert.assertTrue(dashboardPage.isLoggedIn()); SharePage pageResponse = dashboardPage.getNav().logout().render(); Assert.assertTrue(pageResponse.isBrowserTitle("login")); }