use of org.olat.selenium.page.portfolio.MediaCenterPage in project OpenOLAT by OpenOLAT.
the class PortfolioV2Test method collectBlogEntryMediaInBlogResource.
/**
* Create a blog as learn resource, create a new entry and publish it.
* Than pick the entry as a media and go to the media center to see it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void collectBlogEntryMediaInBlogResource(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
// create a course
String courseTitle = "Course-With-Blog-" + UUID.randomUUID().toString();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String blogNodeTitle = "Blog-EP-1";
String blogTitle = "Blog - EP - " + UUID.randomUUID().toString();
// create a course element of type blog with a blog
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("blog").nodeTitle(blogNodeTitle).selectTabLearnContent().createFeed(blogTitle);
// publish the course
courseEditor.publish().quickPublish();
// open the course and see the CP
CoursePageFragment course = courseEditor.clickToolbarBack();
course.clickTree().selectWithTitle(blogNodeTitle);
String postTitle = "Post-EP-" + UUID.randomUUID();
String postSummary = "Some explantations as teaser";
String postContent = "Content of the post";
FeedPage feed = FeedPage.getFeedPage(browser);
feed.newBlog().fillPostForm(postTitle, postSummary, postContent).publishPost();
String mediaTitle = "My very own entry";
feed.addAsMedia().fillForumMedia(mediaTitle, "A post I write");
UserToolsPage userTools = new UserToolsPage(browser);
MediaCenterPage mediaCenter = userTools.openUserToolsMenu().openPortfolioV2().openMediaCenter();
mediaCenter.assertOnMedia(mediaTitle).selectMedia(mediaTitle).assertOnMediaDetails(mediaTitle);
}
use of org.olat.selenium.page.portfolio.MediaCenterPage in project openolat by klemens.
the class PortfolioV2Test method collectBlogEntryMediaInBlogResource.
/**
* Create a blog as learn resource, create a new entry and publish it.
* Than pick the entry as a media and go to the media center to see it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void collectBlogEntryMediaInBlogResource(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
// create a course
String courseTitle = "Course-With-Blog-" + UUID.randomUUID().toString();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String blogNodeTitle = "Blog-EP-1";
String blogTitle = "Blog - EP - " + UUID.randomUUID().toString();
// create a course element of type blog with a blog
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("blog").nodeTitle(blogNodeTitle).selectTabLearnContent().createFeed(blogTitle);
// publish the course
courseEditor.publish().quickPublish();
// open the course and see the CP
CoursePageFragment course = courseEditor.clickToolbarBack();
course.clickTree().selectWithTitle(blogNodeTitle);
String postTitle = "Post-EP-" + UUID.randomUUID();
String postSummary = "Some explantations as teaser";
String postContent = "Content of the post";
FeedPage feed = FeedPage.getFeedPage(browser);
feed.newBlog().fillPostForm(postTitle, postSummary, postContent).publishPost();
String mediaTitle = "My very own entry";
feed.addAsMedia().fillForumMedia(mediaTitle, "A post I write");
UserToolsPage userTools = new UserToolsPage(browser);
MediaCenterPage mediaCenter = userTools.openUserToolsMenu().openPortfolioV2().openMediaCenter();
mediaCenter.assertOnMedia(mediaTitle).selectMedia(mediaTitle).assertOnMediaDetails(mediaTitle);
}
use of org.olat.selenium.page.portfolio.MediaCenterPage in project openolat by klemens.
the class PortfolioV2Test method collectForumMediaInCourse.
/**
* Create a course with a forum, open a new thread and pick it as
* a media. Go in the media center and check that the media
* is waiting there, click the details and check again.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void collectForumMediaInCourse(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
String courseTitle = "Collect-Forum-" + UUID.randomUUID();
String forumTitle = ("Forum-" + UUID.randomUUID()).substring(0, 24);
// go to authoring, create a course with a forum
navBar.openAuthoringEnvironment().openCreateDropDown().clickCreate(ResourceType.course).fillCreateForm(courseTitle).clickToolbarBack();
// open course editor
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("fo").nodeTitle(forumTitle).publish().quickPublish();
courseEditor.clickToolbarBack();
CoursePageFragment course = CoursePageFragment.getCourse(browser);
course.clickTree().selectWithTitle(forumTitle);
String mediaTitle = "A post";
String threadTitle = "Very interessant thread";
ForumPage forum = ForumPage.getCourseForumPage(browser);
forum.createThread(threadTitle, "With a lot of content", null).addAsMedia().fillForumMedia(mediaTitle, "A post I write");
UserToolsPage userTools = new UserToolsPage(browser);
MediaCenterPage mediaCenter = userTools.openUserToolsMenu().openPortfolioV2().openMediaCenter();
mediaCenter.assertOnMedia(mediaTitle).selectMedia(mediaTitle).assertOnMediaDetails(mediaTitle);
}
Aggregations