use of org.olat.selenium.page.course.PublisherPageFragment in project OpenOLAT by OpenOLAT.
the class CourseTest method createCourse.
/**
* An author create a course, jump to it, open the editor
* add an info messages course element, publish the course
* and view it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourse(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String title = "Create-Selen-" + UUID.randomUUID();
// create course
RepositoryEditDescriptionPage editDescription = authoringEnv.openCreateDropDown().clickCreate(ResourceType.course).fillCreateForm(title).assertOnGeneralTab();
// from description editor, back to the course
editDescription.clickToolbarBack();
// open course editor
CoursePageFragment course = CoursePageFragment.getCourse(browser);
CourseEditorPageFragment editor = course.assertOnCoursePage().assertOnTitle(title).openToolsMenu().edit();
// create a course element of type info messages
PublisherPageFragment publisher = editor.assertOnEditor().createNode("info").publish();
// publish
publisher.assertOnPublisher().nextSelectNodes().selectAccess(UserAccess.guest).nextAccess().selectCatalog(false).nextCatalog().finish();
// back to the course
CoursePageFragment publishedCourse = editor.clickToolbarBack();
// review the course
publishedCourse.assertOnCoursePage().clickTree();
}
use of org.olat.selenium.page.course.PublisherPageFragment in project openolat by klemens.
the class CourseTest method createCourse.
/**
* An author create a course, jump to it, open the editor
* add an info messages course element, publish the course
* and view it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourse(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String title = "Create-Selen-" + UUID.randomUUID();
// create course
RepositoryEditDescriptionPage editDescription = authoringEnv.openCreateDropDown().clickCreate(ResourceType.course).fillCreateForm(title).assertOnGeneralTab();
// from description editor, back to the course
editDescription.clickToolbarBack();
// open course editor
CoursePageFragment course = CoursePageFragment.getCourse(browser);
CourseEditorPageFragment editor = course.assertOnCoursePage().assertOnTitle(title).openToolsMenu().edit();
// create a course element of type info messages
PublisherPageFragment publisher = editor.assertOnEditor().createNode("info").publish();
// publish
publisher.assertOnPublisher().nextSelectNodes().selectAccess(UserAccess.guest).nextAccess().selectCatalog(false).nextCatalog().finish();
// back to the course
CoursePageFragment publishedCourse = editor.clickToolbarBack();
// review the course
publishedCourse.assertOnCoursePage().clickTree();
}
Aggregations