use of org.olat.selenium.page.user.UserProfilePage in project openolat by klemens.
the class UserTest method restUrlAfterLogin.
/**
* Check if a user can use the rest url in OpenOLAT.
* It jump from the static sites to its home, user tools,
* to the visiting card of an other user.
*
* @param loginPage
* @param authorBrowser
* @param participantBrowser
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void restUrlAfterLogin(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
// create a random user
UserRestClient userClient = new UserRestClient(deploymentUrl);
UserVO user = userClient.createRandomUser("Kanu");
UserVO ryomou = userClient.createRandomUser("Ryomou");
// load dmz
loginPage.assertOnLoginPage().loginAs(user.getLogin(), user.getPassword());
// go to courses
navBar.openMyCourses();
// use url to go to the other users business card
String ryomouBusinessCardUrl = deploymentUrl.toString() + "auth/Identity/" + ryomou.getKey();
browser.get(ryomouBusinessCardUrl);
new VisitingCardPage(browser).assertOnVisitingCard().assertOnLastName(ryomou.getLastName());
// return to my courses
navBar.openMyCourses().assertOnMyCourses();
// go to profile by url
String userUrl = deploymentUrl.toString() + "url/Identity/" + user.getKey();
browser.get(userUrl);
new UserProfilePage(browser).assertOnProfile().assertOnUsername(user.getLogin());
// go to groups
String groupsUrl = deploymentUrl.toString() + "url/GroupsSite/0/AllGroups/0";
browser.get(groupsUrl);
new GroupsPage(browser).assertOnMyGroupsSelected();
// go to my calendar
String calendarUrl = deploymentUrl.toString() + "auth/HomeSite/0/calendar/0";
browser.get(calendarUrl);
new UserToolsPage(browser).assertOnCalendar();
// go to my folder
String folderUrl = deploymentUrl.toString() + "auth/HomeSite/" + user.getKey() + "/userfolder/0";
browser.get(folderUrl);
new UserToolsPage(browser).assertOnFolder();
}
use of org.olat.selenium.page.user.UserProfilePage in project OpenOLAT by OpenOLAT.
the class UserTest method restUrlAfterLogin.
/**
* Check if a user can use the rest url in OpenOLAT.
* It jump from the static sites to its home, user tools,
* to the visiting card of an other user.
*
* @param loginPage
* @param authorBrowser
* @param participantBrowser
* @param reiBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void restUrlAfterLogin(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
// create a random user
UserRestClient userClient = new UserRestClient(deploymentUrl);
UserVO user = userClient.createRandomUser("Kanu");
UserVO ryomou = userClient.createRandomUser("Ryomou");
// load dmz
loginPage.assertOnLoginPage().loginAs(user.getLogin(), user.getPassword());
// go to courses
navBar.openMyCourses();
// use url to go to the other users business card
String ryomouBusinessCardUrl = deploymentUrl.toString() + "auth/Identity/" + ryomou.getKey();
browser.get(ryomouBusinessCardUrl);
new VisitingCardPage(browser).assertOnVisitingCard().assertOnLastName(ryomou.getLastName());
// return to my courses
navBar.openMyCourses().assertOnMyCourses();
// go to profile by url
String userUrl = deploymentUrl.toString() + "url/Identity/" + user.getKey();
browser.get(userUrl);
new UserProfilePage(browser).assertOnProfile().assertOnUsername(user.getLogin());
// go to groups
String groupsUrl = deploymentUrl.toString() + "url/GroupsSite/0/AllGroups/0";
browser.get(groupsUrl);
new GroupsPage(browser).assertOnMyGroupsSelected();
// go to my calendar
String calendarUrl = deploymentUrl.toString() + "auth/HomeSite/0/calendar/0";
browser.get(calendarUrl);
new UserToolsPage(browser).assertOnCalendar();
// go to my folder
String folderUrl = deploymentUrl.toString() + "auth/HomeSite/" + user.getKey() + "/userfolder/0";
browser.get(folderUrl);
new UserToolsPage(browser).assertOnFolder();
}
Aggregations