Skip to content
Snippets Groups Projects
Commit 3e35745c authored by srosse's avatar srosse
Browse files

no-jira: prepare for version 15.pre.0.a

parent 2506ebc5
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.openolat</groupId>
<artifactId>openolat-lms</artifactId>
<version>14.2-SNAPSHOT</version>
<version>15.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>OpenOLAT LMS</name>
<url>https://www.openolat.com</url>
......
......@@ -34,6 +34,7 @@ import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.olat.repository.RepositoryEntryStatusEnum;
import org.olat.selenium.page.LoginPage;
import org.olat.selenium.page.NavigationPage;
import org.olat.selenium.page.Participant;
......@@ -160,6 +161,7 @@ public class CourseElementTest extends Deployments {
OOGraphene.waitElement(By.xpath("//h2[text()='Lorem Ipsum']"), browser);
}
/**
* This test an edge case where a course start automatically its first
* course element, which is a structure node which start itself its first
......@@ -173,6 +175,8 @@ public class CourseElementTest extends Deployments {
throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createRandomAuthor();
UserVO participant = new UserRestClient(deploymentUrl).createRandomUser("Ryomou");
LoginPage loginPage = LoginPage.load(browser, deploymentUrl);
loginPage.loginAs(author.getLogin(), author.getPassword());
......@@ -198,22 +202,43 @@ public class CourseElementTest extends Deployments {
.assertOnStart();
// make the author a participant too
MembersPage members = course
.members();
members
.addMember()
.searchMember(participant, true)
.nextUsers()
.nextOverview()
.nextPermissions()
.finish();
members
.clickToolbarBack();
course
.members()
.selectMembers()
.openMembership(author.getFirstName())
.editRepositoryMembership(Boolean.TRUE)
.saveMembership()
.settings()
.accessConfiguration()
.setUserAccess(UserAccess.registred)
.save()
.clickToolbarBack();
course
.changeStatus(RepositoryEntryStatusEnum.published);
String courseUrl = browser.getCurrentUrl();
if(courseUrl.indexOf("CourseNode") >= 0) {
courseUrl = courseUrl.substring(0, courseUrl.indexOf("CourseNode"));
}
//log out
new UserToolsPage(browser)
.logout();
//log in and resume test
loginPage
.loginAs(author.getLogin(), author.getPassword())
.resume();
// participant log in and go directly to the course with the SCORM
LoginPage participantLoginPage = LoginPage.load(browser, new URL(courseUrl));
participantLoginPage
.loginAs(participant.getLogin(), participant.getPassword(), By.className("o_scorm_content"));
// direct jump in SCORM content
ScormPage.getScormPage(browser)
.passVerySimpleScorm()
......
......@@ -146,6 +146,11 @@ public class LoginPage {
* @param password
*/
public LoginPage loginAs(String username, String password) {
By footerUserBy = By.cssSelector("#o_footer_user #o_username");
return loginAs(username, password, footerUserBy);
}
public LoginPage loginAs(String username, String password, By landingPointBy) {
//fill login form
By usernameId = By.id("o_fiooolat_login_name");
OOGraphene.waitElement(usernameId, browser);//wait the login page
......@@ -168,8 +173,7 @@ public class LoginPage {
}
//wait until the content appears
By footerUserBy = By.cssSelector("#o_footer_user #o_username");
OOGraphene.waitElement(footerUserBy, 30, browser);
OOGraphene.waitElement(landingPointBy, 30, browser);
return this;
}
......
......@@ -47,7 +47,7 @@ public class ArquillianDeployments {
public static final String WEBINF = "src/main/webapp/WEB-INF";
public static final String WEBINF_TOMCAT = "src/main/webapp-tomcat/WEB-INF";
public static final String TEST_RSRC = "src/test/resources";
public static final String LIB_DIR = "target/openolat-lms-14.2-SNAPSHOT/WEB-INF/lib";
public static final String LIB_DIR = "target/openolat-lms-15.0-SNAPSHOT/WEB-INF/lib";
public static WebArchive createDeployment() {
Map<String,String> overrideProperties = new HashMap<>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment