use of org.olat.selenium.page.repository.RepositoryAccessPage in project OpenOLAT by OpenOLAT.
the class CourseTest method courseBooking.
/**
* An author creates a course, make it visible for
* members and add an access control by password.
* The user search for the course, books it and give
* the password.<br/>
* The author checks in the list of orders if the booking
* of the user is there and after it checks if the user is
* in the member list too.
*
* @param loginPage
* @param ryomouBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void courseBooking(@InitialPage LoginPage loginPage, @Drone @User WebDriver ryomouBrowser) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
UserVO ryomou = new UserRestClient(deploymentUrl).createRandomUser("Ryomou");
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String title = "Create-Selen-" + UUID.randomUUID().toString();
// create course
authoringEnv.openCreateDropDown().clickCreate(ResourceType.course).fillCreateForm(title).assertOnGeneralTab();
// open course editor
CoursePageFragment course = new CoursePageFragment(browser);
RepositoryAccessPage courseAccess = course.openToolsMenu().edit().createNode("info").autoPublish().accessConfiguration().setUserAccess(UserAccess.registred);
// add booking by secret token
courseAccess.boooking().openAddDropMenu().addTokenMethod().configureTokenMethod("secret", "The password is secret");
courseAccess.clickToolbarBack();
// a user search the course
LoginPage ryomouLoginPage = LoginPage.getLoginPage(ryomouBrowser, deploymentUrl);
ryomouLoginPage.loginAs(ryomou.getLogin(), ryomou.getPassword()).resume();
NavigationPage ryomouNavBar = new NavigationPage(ryomouBrowser);
ryomouNavBar.openMyCourses().openSearch().extendedSearch(title).book(title);
// book the course
BookingPage booking = new BookingPage(ryomouBrowser);
booking.bookToken("secret");
// check the course
CoursePageFragment bookedCourse = CoursePageFragment.getCourse(ryomouBrowser);
bookedCourse.assertOnTitle(title);
// Author go in the list of bookings of the course
BookingPage bookingList = course.openToolsMenu().bookingTool();
bookingList.assertFirstNameInListIsOk(ryomou);
// Author go to members list
course.members().assertFirstNameInList(ryomou);
}
use of org.olat.selenium.page.repository.RepositoryAccessPage in project OpenOLAT by OpenOLAT.
the class QTI21Page method accessConfiguration.
/**
* Open the access configuration
*
* @return
*/
public RepositoryAccessPage accessConfiguration() {
if (!browser.findElement(settingsMenu).isDisplayed()) {
openSettingsMenu();
}
By accessConfigBy = By.cssSelector("a.o_sel_course_access");
browser.findElement(accessConfigBy).click();
OOGraphene.waitBusy(browser);
By mainId = By.id("o_main_container");
OOGraphene.waitElement(mainId, 5, browser);
return new RepositoryAccessPage(browser);
}
use of org.olat.selenium.page.repository.RepositoryAccessPage in project openolat by klemens.
the class CoursePageFragment method accessConfiguration.
public RepositoryAccessPage accessConfiguration() {
if (!browser.findElement(settingsMenu).isDisplayed()) {
openSettingsMenu();
}
browser.findElement(accessConfigBy).click();
OOGraphene.waitBusy(browser);
By mainId = By.id("o_main_container");
OOGraphene.waitElement(mainId, 5, browser);
return new RepositoryAccessPage(browser);
}
use of org.olat.selenium.page.repository.RepositoryAccessPage in project openolat by klemens.
the class QTI21Page method accessConfiguration.
/**
* Open the access configuration
*
* @return
*/
public RepositoryAccessPage accessConfiguration() {
if (!browser.findElement(settingsMenu).isDisplayed()) {
openSettingsMenu();
}
By accessConfigBy = By.cssSelector("a.o_sel_course_access");
browser.findElement(accessConfigBy).click();
OOGraphene.waitBusy(browser);
By mainId = By.id("o_main_container");
OOGraphene.waitElement(mainId, 5, browser);
return new RepositoryAccessPage(browser);
}
use of org.olat.selenium.page.repository.RepositoryAccessPage in project OpenOLAT by OpenOLAT.
the class CoursePageFragment method accessConfiguration.
public RepositoryAccessPage accessConfiguration() {
if (!browser.findElement(settingsMenu).isDisplayed()) {
openSettingsMenu();
}
browser.findElement(accessConfigBy).click();
OOGraphene.waitBusy(browser);
By mainId = By.id("o_main_container");
OOGraphene.waitElement(mainId, 5, browser);
return new RepositoryAccessPage(browser);
}
Aggregations