use of org.olat.selenium.page.repository.FeedPage 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.repository.FeedPage 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.repository.FeedPage in project openolat by klemens.
the class CourseElementTest method blogWithMultipleUsers.
/**
* An author create a course with a blog, open it, add a post. A student
* open the course, see the blog post. The author add a new post, the
* student must see it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void blogWithMultipleUsers(@InitialPage LoginPage loginPage, @Drone @Participant WebDriver participantDrone) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
UserVO participant = new UserRestClient(deploymentUrl).createRandomUser("Ryomou");
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course with a blog
String courseTitle = "Course-Blog-1-" + UUID.randomUUID().toString();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String blogNodeTitle = "Blog-RW-1";
String blogTitle = "Blog - RW - " + 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 blog
CoursePageFragment course = courseEditor.clickToolbarBack();
course.clickTree().selectWithTitle(blogNodeTitle);
String postTitle = "Blog-RW-1-" + 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();
// participant go to the blog
participantDrone.navigate().to(deploymentUrl);
LoginPage participantLogin = LoginPage.getLoginPage(participantDrone, deploymentUrl);
participantLogin.loginAs(participant.getLogin(), participant.getPassword());
// search the course in "My courses"
NavigationPage participantNavigation = new NavigationPage(participantDrone);
participantNavigation.openMyCourses().openSearch().extendedSearch(courseTitle).select(courseTitle).start();
// Navigate the course to the blog
CoursePageFragment participantCourse = new CoursePageFragment(participantDrone);
participantCourse.clickTree().selectWithTitle(blogNodeTitle);
FeedPage participantFeed = FeedPage.getFeedPage(participantDrone);
participantFeed.assertOnBlogPost(postTitle);
// the author publish a second post in its blog
String post2Title = "Blog-RW-2-" + UUID.randomUUID();
String post2Summary = "Some explantations as teaser";
String post2Content = "Content of the post";
feed.addBlogPost().fillPostForm(post2Title, post2Summary, post2Content).publishPost();
// the participant must see the new post after some click
participantFeed.clickFirstMonthOfPager().assertOnBlogPost(post2Title);
}
Aggregations