use of org.olat.selenium.page.wiki.WikiPage in project openolat by klemens.
the class PortfolioV2Test method collectWikiMediaInWikiResource.
/**
* Create a wiki as resource, add and fill a page. The author
* picks the page as media and go in its media center to see it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void collectWikiMediaInWikiResource(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String title = "PF-Wiki-" + UUID.randomUUID();
// create a wiki and launch it
authoringEnv.openCreateDropDown().clickCreate(ResourceType.wiki).fillCreateForm(title).assertOnGeneralTab().clickToolbarBack();
// create a page in the wiki
String page = "LMS-" + UUID.randomUUID();
String content = "Learning Management System";
WikiPage wiki = WikiPage.getWiki(browser);
// create page and add it as artefact to portfolio
String mediaTitle = "My own wiki page";
wiki.createPage(page, content).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.wiki.WikiPage in project OpenOLAT by OpenOLAT.
the class PortfolioV2Test method collectWikiMediaInWikiResource.
/**
* Create a wiki as resource, add and fill a page. The author
* picks the page as media and go in its media center to see it.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void collectWikiMediaInWikiResource(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String title = "PF-Wiki-" + UUID.randomUUID();
// create a wiki and launch it
authoringEnv.openCreateDropDown().clickCreate(ResourceType.wiki).fillCreateForm(title).assertOnGeneralTab().clickToolbarBack();
// create a page in the wiki
String page = "LMS-" + UUID.randomUUID();
String content = "Learning Management System";
WikiPage wiki = WikiPage.getWiki(browser);
// create page and add it as artefact to portfolio
String mediaTitle = "My own wiki page";
wiki.createPage(page, content).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