use of org.olat.selenium.page.repository.RepositoryEditDescriptionPage in project OpenOLAT by OpenOLAT.
the class CourseTest method createCourseWithSpecialCharacters.
/**
* Check if we can create and open a course with this
* name: It's me, the "course".
* @see https://jira.openolat.org/browse/OO-1839
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourseWithSpecialCharacters(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String marker = Long.toString(System.currentTimeMillis());
String title = "It's me, the \"course\" number " + marker;
// create course
RepositoryEditDescriptionPage editDescription = authoringEnv.openCreateDropDown().clickCreate(ResourceType.course).fillCreateForm(title).assertOnGeneralTab();
// from description editor, back to the course
editDescription.clickToolbarBack();
// close the course
navBar.closeTab();
// select the authoring
navBar.openAuthoringEnvironment().selectResource(marker);
new CoursePageFragment(browser).assertOnCoursePage();
}
use of org.olat.selenium.page.repository.RepositoryEditDescriptionPage in project openolat by klemens.
the class CourseTest method createCourse_withWizard.
/**
* Create a course, use the course wizard, select all course
* elements and go further with the standard settings.
*
* Go from the description editor to the course, check
* that the course is automatically published and that
* the five course elements are there.
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourse_withWizard(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String title = "Create-Course-Wizard-" + UUID.randomUUID().toString();
// create course
CourseWizardPage courseWizard = authoringEnv.openCreateDropDown().clickCreate(ResourceType.course).fillCreateFormAndStartWizard(title);
courseWizard.selectAllCourseElements().nextNodes().nextCatalog().finish();
// OOGraphene.closeErrorBox(browser);//STMP error
RepositoryEditDescriptionPage editDescription = new RepositoryEditDescriptionPage(browser);
// from description editor, back to details and launch the course
editDescription.assertOnGeneralTab();
// close mail error
OOGraphene.closeErrorBox(browser);
editDescription.clickToolbarBack();
// open course editor
CoursePageFragment course = CoursePageFragment.getCourse(browser);
course.assertOnCoursePage().assertOnTitle(title);
// assert the 5 nodes are there and click them
By nodeBy = By.cssSelector("span.o_tree_link.o_tree_l1.o_tree_level_label_leaf>a");
List<WebElement> nodes = browser.findElements(nodeBy);
Assert.assertEquals(5, nodes.size());
for (WebElement node : nodes) {
node.click();
OOGraphene.waitBusy(browser);
}
}
use of org.olat.selenium.page.repository.RepositoryEditDescriptionPage in project openolat by klemens.
the class CourseTest method createCourseWithSpecialCharacters.
/**
* Check if we can create and open a course with this
* name: It's me, the "course".
* @see https://jira.openolat.org/browse/OO-1839
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void createCourseWithSpecialCharacters(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
loginPage.loginAs(author.getLogin(), author.getPassword());
// go to authoring
AuthoringEnvPage authoringEnv = navBar.assertOnNavigationPage().openAuthoringEnvironment();
String marker = Long.toString(System.currentTimeMillis());
String title = "It's me, the \"course\" number " + marker;
// create course
RepositoryEditDescriptionPage editDescription = authoringEnv.openCreateDropDown().clickCreate(ResourceType.course).fillCreateForm(title).assertOnGeneralTab();
// from description editor, back to the course
editDescription.clickToolbarBack();
// close the course
navBar.closeTab();
// select the authoring
navBar.openAuthoringEnvironment().selectResource(marker);
new CoursePageFragment(browser).assertOnCoursePage();
}
Aggregations