use of org.olat.selenium.page.portfolio.BindersPage in project OpenOLAT by OpenOLAT.
the class PortfolioV2Test method deleteBinder.
/**
* A user create a binder with section and pages, move it to
* the trash. Then it goes to the trash restore it. Return to
* the list of binders, move the binder again to the trash and
* goes there to delete it definitively.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void deleteBinder(@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 ephemere " + UUID.randomUUID();
BindersPage myBinders = portfolio.openMyBinders();
BinderPage binder = myBinders.createBinder(binderTitle, "A binder that I want to delete");
String sectionTitle = "Section one " + UUID.randomUUID();
binder.selectEntries().createSection(sectionTitle).assertOnSectionTitleInEntries(sectionTitle);
for (int i = 1; i < 3; i++) {
String pageTitle = "Page " + i;
binder.createEntry(pageTitle).assertOnPage(pageTitle).selectEntries();
}
binder.selectTableOfContent().selectEntryInToc("Page 1");
// reload the binder
portfolio.clickToolbarBack().clickToolbarBack();
myBinders.selectBinder(binderTitle);
// move the binder to the trash
binder.assertOnPageInToc("Page 1").moveBinderToTrash();
// go in the trash to restore it
portfolio.clickToolbarBack().openDeletedBinders().switchTableView().restoreBinder(binderTitle);
// move it to the trash again
portfolio.clickToolbarBack().openMyBinders().selectBinder(binderTitle).moveBinderToTrash();
// go to the trash to delete it definitively
portfolio.clickToolbarBack().openDeletedBinders().selectBinderInTableView(binderTitle).assertOnPageInToc("Page 2").deleteBinder().assertEmptyTableView();
}
use of org.olat.selenium.page.portfolio.BindersPage in project openolat by klemens.
the class PortfolioV2Test method deleteBinder.
/**
* A user create a binder with section and pages, move it to
* the trash. Then it goes to the trash restore it. Return to
* the list of binders, move the binder again to the trash and
* goes there to delete it definitively.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void deleteBinder(@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 ephemere " + UUID.randomUUID();
BindersPage myBinders = portfolio.openMyBinders();
BinderPage binder = myBinders.createBinder(binderTitle, "A binder that I want to delete");
String sectionTitle = "Section one " + UUID.randomUUID();
binder.selectEntries().createSection(sectionTitle).assertOnSectionTitleInEntries(sectionTitle);
for (int i = 1; i < 3; i++) {
String pageTitle = "Page " + i;
binder.createEntry(pageTitle).assertOnPage(pageTitle).selectEntries();
}
binder.selectTableOfContent().selectEntryInToc("Page 1");
// reload the binder
portfolio.clickToolbarBack().clickToolbarBack();
myBinders.selectBinder(binderTitle);
// move the binder to the trash
binder.assertOnPageInToc("Page 1").moveBinderToTrash();
// go in the trash to restore it
portfolio.clickToolbarBack().openDeletedBinders().switchTableView().restoreBinder(binderTitle);
// move it to the trash again
portfolio.clickToolbarBack().openMyBinders().selectBinder(binderTitle).moveBinderToTrash();
// go to the trash to delete it definitively
portfolio.clickToolbarBack().openDeletedBinders().selectBinderInTableView(binderTitle).assertOnPageInToc("Page 2").deleteBinder().assertEmptyTableView();
}
Aggregations