use of org.olat.selenium.page.portfolio.EntriesPage in project openolat by klemens.
the class PortfolioV2Test method deletePage.
/**
* A user create a binder with a section and two pages. It deletes
* one, go to the trash, find the delete page, restore it and go
* again in the binder. It move a second time the page to the trash
* and delete it definitively.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void deletePage(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createRandomUser("rei");
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
UserToolsPage userTools = new UserToolsPage(browser);
PortfolioV2HomePage portfolio = userTools.openUserToolsMenu().openPortfolioV2();
String binderTitle = "Binder del " + UUID.randomUUID();
BinderPage binder = portfolio.openMyBinders().createBinder(binderTitle, "A binder where I want to delete some pages");
String sectionTitle = "Section one " + UUID.randomUUID();
binder.selectEntries().createSection(sectionTitle).assertOnSectionTitleInEntries(sectionTitle);
String pageTitle = "Page two " + UUID.randomUUID();
String pageToDelete = "Page del " + UUID.randomUUID();
binder.createEntry(pageToDelete).assertOnPage(pageToDelete).selectEntries().createEntry(pageTitle).assertOnPage(pageTitle).selectTableOfContent().selectEntryInToc(pageToDelete).moveEntryToTrash().assertOnPageInToc(pageTitle).assertOnPageNotInToc(pageToDelete);
EntriesPage trash = portfolio.clickToolbarBack().clickToolbarBack().openDeletedEntries();
trash.assertOnPage(pageToDelete).switchTableView().restore(pageToDelete, binderTitle, sectionTitle);
portfolio.clickToolbarBack().openMyBinders().selectBinder(binderTitle).assertOnPageInToc(pageToDelete).selectEntryInToc(pageToDelete).moveEntryToTrash();
trash = portfolio.clickToolbarBack().clickToolbarBack().openDeletedEntries();
trash.switchTableView().assertOnPageTableView(pageToDelete).switchTableView().selectPageInTableView(pageToDelete).deleteEntry().assertEmptyTableView();
}
use of org.olat.selenium.page.portfolio.EntriesPage in project OpenOLAT by OpenOLAT.
the class PortfolioV2Test method deletePage.
/**
* A user create a binder with a section and two pages. It deletes
* one, go to the trash, find the delete page, restore it and go
* again in the binder. It move a second time the page to the trash
* and delete it definitively.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void deletePage(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createRandomUser("rei");
loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
UserToolsPage userTools = new UserToolsPage(browser);
PortfolioV2HomePage portfolio = userTools.openUserToolsMenu().openPortfolioV2();
String binderTitle = "Binder del " + UUID.randomUUID();
BinderPage binder = portfolio.openMyBinders().createBinder(binderTitle, "A binder where I want to delete some pages");
String sectionTitle = "Section one " + UUID.randomUUID();
binder.selectEntries().createSection(sectionTitle).assertOnSectionTitleInEntries(sectionTitle);
String pageTitle = "Page two " + UUID.randomUUID();
String pageToDelete = "Page del " + UUID.randomUUID();
binder.createEntry(pageToDelete).assertOnPage(pageToDelete).selectEntries().createEntry(pageTitle).assertOnPage(pageTitle).selectTableOfContent().selectEntryInToc(pageToDelete).moveEntryToTrash().assertOnPageInToc(pageTitle).assertOnPageNotInToc(pageToDelete);
EntriesPage trash = portfolio.clickToolbarBack().clickToolbarBack().openDeletedEntries();
trash.assertOnPage(pageToDelete).switchTableView().restore(pageToDelete, binderTitle, sectionTitle);
portfolio.clickToolbarBack().openMyBinders().selectBinder(binderTitle).assertOnPageInToc(pageToDelete).selectEntryInToc(pageToDelete).moveEntryToTrash();
trash = portfolio.clickToolbarBack().clickToolbarBack().openDeletedEntries();
trash.switchTableView().assertOnPageTableView(pageToDelete).switchTableView().selectPageInTableView(pageToDelete).deleteEntry().assertEmptyTableView();
}
Aggregations