Search in sources :

Example 1 with MembersWizardPage

use of org.olat.selenium.page.group.MembersWizardPage in project OpenOLAT by OpenOLAT.

the class MembersPage method importMembers.

public MembersWizardPage importMembers() {
    By importMembersBy = By.className("o_sel_course_import_members");
    browser.findElement(importMembersBy).click();
    OOGraphene.waitModalWizard(browser);
    OOGraphene.waitElement(By.cssSelector("div.o_sel_user_import textarea.form-control"), 5, browser);
    return new MembersWizardPage(browser);
}
Also used : MembersWizardPage(org.olat.selenium.page.group.MembersWizardPage) By(org.openqa.selenium.By)

Example 2 with MembersWizardPage

use of org.olat.selenium.page.group.MembersWizardPage in project OpenOLAT by OpenOLAT.

the class BusinessGroupTest method groupMembersVisibility.

/**
 * An author create a group, set the visibility to
 * show owners and participants. Add a member to the
 * group.
 *
 * The participant log in, search the group and open it.
 *
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test
@RunAsClient
public void groupMembersVisibility(@InitialPage LoginPage loginPage, @Drone @Participant WebDriver participantBrowser) throws IOException, URISyntaxException {
    UserVO author = new UserRestClient(deploymentUrl).createRandomUser("Selena");
    UserVO participant = new UserRestClient(deploymentUrl).createRandomUser("Aoi");
    loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
    // go to groups
    String groupName = "Group-1-" + UUID.randomUUID();
    GroupPage group = navBar.openGroups(browser).createGroup(groupName, "A very little group");
    MembersWizardPage members = group.openAdministration().openAdminMembers().setVisibility(true, true, false).addMember();
    members.searchMember(participant, false).nextUsers().nextOverview().nextPermissions().finish();
    LoginPage participantLoginPage = LoginPage.getLoginPage(participantBrowser, deploymentUrl);
    // tools
    participantLoginPage.loginAs(participant.getLogin(), participant.getPassword()).resume();
    NavigationPage participantNavBar = new NavigationPage(participantBrowser);
    participantNavBar.openGroups(participantBrowser).selectGroup(groupName);
    WebElement contentEl = participantBrowser.findElement(By.id("o_main_center_content_inner"));
    String content = contentEl.getText();
    Assert.assertTrue(content.contains(groupName));
}
Also used : MembersWizardPage(org.olat.selenium.page.group.MembersWizardPage) UserVO(org.olat.user.restapi.UserVO) NavigationPage(org.olat.selenium.page.NavigationPage) GroupPage(org.olat.selenium.page.group.GroupPage) WebElement(org.openqa.selenium.WebElement) LoginPage(org.olat.selenium.page.LoginPage) UserRestClient(org.olat.test.rest.UserRestClient) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 3 with MembersWizardPage

use of org.olat.selenium.page.group.MembersWizardPage in project openolat by klemens.

the class BusinessGroupTest method groupMembersVisibility.

/**
 * An author create a group, set the visibility to
 * show owners and participants. Add a member to the
 * group.
 *
 * The participant log in, search the group and open it.
 *
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test
@RunAsClient
public void groupMembersVisibility(@InitialPage LoginPage loginPage, @Drone @Participant WebDriver participantBrowser) throws IOException, URISyntaxException {
    UserVO author = new UserRestClient(deploymentUrl).createRandomUser("Selena");
    UserVO participant = new UserRestClient(deploymentUrl).createRandomUser("Aoi");
    loginPage.loginAs(author.getLogin(), author.getPassword()).resume();
    // go to groups
    String groupName = "Group-1-" + UUID.randomUUID();
    GroupPage group = navBar.openGroups(browser).createGroup(groupName, "A very little group");
    MembersWizardPage members = group.openAdministration().openAdminMembers().setVisibility(true, true, false).addMember();
    members.searchMember(participant, false).nextUsers().nextOverview().nextPermissions().finish();
    LoginPage participantLoginPage = LoginPage.getLoginPage(participantBrowser, deploymentUrl);
    // tools
    participantLoginPage.loginAs(participant.getLogin(), participant.getPassword()).resume();
    NavigationPage participantNavBar = new NavigationPage(participantBrowser);
    participantNavBar.openGroups(participantBrowser).selectGroup(groupName);
    WebElement contentEl = participantBrowser.findElement(By.id("o_main_center_content_inner"));
    String content = contentEl.getText();
    Assert.assertTrue(content.contains(groupName));
}
Also used : MembersWizardPage(org.olat.selenium.page.group.MembersWizardPage) UserVO(org.olat.user.restapi.UserVO) NavigationPage(org.olat.selenium.page.NavigationPage) GroupPage(org.olat.selenium.page.group.GroupPage) WebElement(org.openqa.selenium.WebElement) LoginPage(org.olat.selenium.page.LoginPage) UserRestClient(org.olat.test.rest.UserRestClient) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 4 with MembersWizardPage

use of org.olat.selenium.page.group.MembersWizardPage in project OpenOLAT by OpenOLAT.

the class MembersPage method addMember.

public MembersWizardPage addMember() {
    By addMemberBy = By.className("o_sel_course_add_member");
    browser.findElement(addMemberBy).click();
    OOGraphene.waitModalWizard(browser);
    OOGraphene.waitElement(By.cssSelector("fieldset.o_sel_usersearch_searchform"), 5, browser);
    return new MembersWizardPage(browser);
}
Also used : MembersWizardPage(org.olat.selenium.page.group.MembersWizardPage) By(org.openqa.selenium.By)

Example 5 with MembersWizardPage

use of org.olat.selenium.page.group.MembersWizardPage in project openolat by klemens.

the class MembersPage method addMember.

public MembersWizardPage addMember() {
    By addMemberBy = By.className("o_sel_course_add_member");
    browser.findElement(addMemberBy).click();
    OOGraphene.waitModalWizard(browser);
    OOGraphene.waitElement(By.cssSelector("fieldset.o_sel_usersearch_searchform"), 5, browser);
    return new MembersWizardPage(browser);
}
Also used : MembersWizardPage(org.olat.selenium.page.group.MembersWizardPage) By(org.openqa.selenium.By)

Aggregations

MembersWizardPage (org.olat.selenium.page.group.MembersWizardPage)6 By (org.openqa.selenium.By)4 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)2 Test (org.junit.Test)2 LoginPage (org.olat.selenium.page.LoginPage)2 NavigationPage (org.olat.selenium.page.NavigationPage)2 GroupPage (org.olat.selenium.page.group.GroupPage)2 UserRestClient (org.olat.test.rest.UserRestClient)2 UserVO (org.olat.user.restapi.UserVO)2 WebElement (org.openqa.selenium.WebElement)2