use of org.olat.selenium.page.repository.FeedPage in project openolat by klemens.
the class CourseElementTest method createCourseWithPodcast_externalFeed.
/**
* Create a course with a course element of type podcast. Create
* a podcast, publish the course, go the the course and configure
* the podcast to read an external feed.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourseWithPodcast_externalFeed(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-With-Podcast-" + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String podcastNodeTitle = "Podcats-1";
String podcastTitle = "Podcast - " + UUID.randomUUID();
// create a course element of type podcast
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("podcast").nodeTitle(podcastNodeTitle).selectTabLearnContent().createFeed(podcastTitle);
// publish the course
courseEditor.publish().quickPublish();
// open the course and see the podcast
CoursePageFragment course = courseEditor.clickToolbarBack();
course.clickTree().selectWithTitle(podcastNodeTitle);
// check that the title of the podcast is correct
WebElement podcastH2 = browser.findElement(By.cssSelector("div.o_podcast_info>h2>i.o_FileResource-PODCAST_icon"));
Assert.assertNotNull(podcastH2);
// Assert.assertEquals(podcastTitle, podcastH2.getText().trim());
FeedPage feed = FeedPage.getFeedPage(browser);
feed.newExternalPodcast(podcastTitle, "http://podcasts.srf.ch/rock_special_mpx.xml");
// check only that the "episodes" title is visible
/*
By episodeTitleby = By.cssSelector("div.o_podcast_episodes>h4.o_title");
OOGraphene.waitElement(episodeTitleby, 20, browser);
WebElement episodeH4 = browser.findElement(episodeTitleby);
Assert.assertNotNull(episodeH4);
*/
}
use of org.olat.selenium.page.repository.FeedPage in project openolat by klemens.
the class CourseElementTest method createCourseWithBlog_externalFeed.
@Test
@RunAsClient
public void createCourseWithBlog_externalFeed(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-With-Blog-" + UUID.randomUUID().toString();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String blogNodeTitle = "Blog-1";
String blogTitle = "Blog - " + UUID.randomUUID();
// create a course element of type 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);
// check that the title of the podcast is correct
WebElement podcastH2 = browser.findElement(By.cssSelector("div.o_blog_info>h2>i.o_FileResource-BLOG_icon"));
Assert.assertNotNull(podcastH2);
// Assert.assertEquals(blogTitle, podcastH2.getText().trim());
FeedPage feed = FeedPage.getFeedPage(browser);
feed.newExternalBlog(blogTitle, "https://www.openolat.com/feed/");
// check only that the subscription link is visible
/*
By subscriptionBy = By.cssSelector("div.o_subscription>a");
OOGraphene.waitElement(subscriptionBy, 20, browser);
WebElement subscriptionLink = browser.findElement(subscriptionBy);
Assert.assertTrue(subscriptionLink.isDisplayed());
*/
}
use of org.olat.selenium.page.repository.FeedPage in project OpenOLAT by OpenOLAT.
the class CourseElementTest method createCourseWithBlog_externalFeed.
@Test
@RunAsClient
public void createCourseWithBlog_externalFeed(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-With-Blog-" + UUID.randomUUID().toString();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String blogNodeTitle = "Blog-1";
String blogTitle = "Blog - " + UUID.randomUUID();
// create a course element of type 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);
// check that the title of the podcast is correct
WebElement podcastH2 = browser.findElement(By.cssSelector("div.o_blog_info>h2>i.o_FileResource-BLOG_icon"));
Assert.assertNotNull(podcastH2);
// Assert.assertEquals(blogTitle, podcastH2.getText().trim());
FeedPage feed = FeedPage.getFeedPage(browser);
feed.newExternalBlog(blogTitle, "https://www.openolat.com/feed/");
// check only that the subscription link is visible
/*
By subscriptionBy = By.cssSelector("div.o_subscription>a");
OOGraphene.waitElement(subscriptionBy, 20, browser);
WebElement subscriptionLink = browser.findElement(subscriptionBy);
Assert.assertTrue(subscriptionLink.isDisplayed());
*/
}
use of org.olat.selenium.page.repository.FeedPage in project OpenOLAT by OpenOLAT.
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);
}
use of org.olat.selenium.page.repository.FeedPage in project OpenOLAT by OpenOLAT.
the class CourseElementTest method createCourseWithPodcast_externalFeed.
/**
* Create a course with a course element of type podcast. Create
* a podcast, publish the course, go the the course and configure
* the podcast to read an external feed.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourseWithPodcast_externalFeed(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// create a course
String courseTitle = "Course-With-Podcast-" + UUID.randomUUID();
navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
String podcastNodeTitle = "Podcats-1";
String podcastTitle = "Podcast - " + UUID.randomUUID();
// create a course element of type podcast
CourseEditorPageFragment courseEditor = CoursePageFragment.getCourse(browser).edit();
courseEditor.createNode("podcast").nodeTitle(podcastNodeTitle).selectTabLearnContent().createFeed(podcastTitle);
// publish the course
courseEditor.publish().quickPublish();
// open the course and see the podcast
CoursePageFragment course = courseEditor.clickToolbarBack();
course.clickTree().selectWithTitle(podcastNodeTitle);
// check that the title of the podcast is correct
WebElement podcastH2 = browser.findElement(By.cssSelector("div.o_podcast_info>h2>i.o_FileResource-PODCAST_icon"));
Assert.assertNotNull(podcastH2);
// Assert.assertEquals(podcastTitle, podcastH2.getText().trim());
FeedPage feed = FeedPage.getFeedPage(browser);
feed.newExternalPodcast(podcastTitle, "http://podcasts.srf.ch/rock_special_mpx.xml");
// check only that the "episodes" title is visible
/*
By episodeTitleby = By.cssSelector("div.o_podcast_episodes>h4.o_title");
OOGraphene.waitElement(episodeTitleby, 20, browser);
WebElement episodeH4 = browser.findElement(episodeTitleby);
Assert.assertNotNull(episodeH4);
*/
}
Aggregations