Search in sources :

Example 1 with ProfileEditPage

use of org.xwiki.user.test.po.ProfileEditPage in project xwiki-platform by xwiki.

the class UserProfileTest method testEditProfile.

/**
 * Functionality check: changing profile information.
 */
@Test
@IgnoreBrowsers({ @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason = "See https://jira.xwiki.org/browse/XE-1146"), @IgnoreBrowser(value = "internet.*", version = "9\\.*", reason = "See https://jira.xwiki.org/browse/XE-1177") })
public void testEditProfile() {
    ProfileEditPage profileEditPage = this.customProfilePage.editProfile();
    profileEditPage.setUserFirstName(USER_FIRST_NAME);
    profileEditPage.setUserLastName(USER_LAST_NAME);
    profileEditPage.setUserCompany(USER_COMPANY);
    profileEditPage.setUserAbout(USER_ABOUT);
    profileEditPage.setUserEmail(USER_EMAIL);
    profileEditPage.setUserPhone(USER_PHONE);
    profileEditPage.setUserAddress(USER_ADDRESS);
    profileEditPage.setUserBlog(USER_BLOG);
    profileEditPage.setUserBlogFeed(USER_BLOGFEED);
    profileEditPage.clickSaveAndView();
    // Check that the information was updated
    Assert.assertEquals(USER_FIRST_NAME, this.customProfilePage.getUserFirstName());
    Assert.assertEquals(USER_LAST_NAME, this.customProfilePage.getUserLastName());
    Assert.assertEquals(USER_COMPANY, this.customProfilePage.getUserCompany());
    Assert.assertEquals(USER_ABOUT, this.customProfilePage.getUserAbout());
    Assert.assertEquals(USER_EMAIL, this.customProfilePage.getUserEmail());
    Assert.assertEquals(USER_PHONE, this.customProfilePage.getUserPhone());
    Assert.assertEquals(USER_ADDRESS, this.customProfilePage.getUserAddress());
    Assert.assertEquals(USER_BLOG, this.customProfilePage.getUserBlog());
    Assert.assertEquals(USER_BLOGFEED, this.customProfilePage.getUserBlogFeed());
}
Also used : ProfileEditPage(org.xwiki.user.test.po.ProfileEditPage) IgnoreBrowsers(org.xwiki.test.ui.browser.IgnoreBrowsers) Test(org.junit.Test) AbstractTest(org.xwiki.test.ui.AbstractTest)

Example 2 with ProfileEditPage

use of org.xwiki.user.test.po.ProfileEditPage in project xwiki-platform by xwiki.

the class NotificationsIT method setUpUsers.

@Before
public void setUpUsers() throws Exception {
    // Create the two users we will be using
    getUtil().createUser(FIRST_USER_NAME, FIRST_USER_PASSWORD, "", "");
    getUtil().createUser(SECOND_USER_NAME, SECOND_USER_PASSWORD, "", "");
    NotificationsUserProfilePage p;
    getUtil().login(FIRST_USER_NAME, FIRST_USER_PASSWORD);
    p = NotificationsUserProfilePage.gotoPage(FIRST_USER_NAME);
    p.disableAllParameters();
    getUtil().login(SECOND_USER_NAME, SECOND_USER_PASSWORD);
    p = NotificationsUserProfilePage.gotoPage(SECOND_USER_NAME);
    p.disableAllParameters();
    ProfileEditPage profileEditPage = ProfileUserProfilePage.gotoPage(SECOND_USER_NAME).editProfile();
    profileEditPage.setUserEmail("test@xwiki.org");
    profileEditPage.clickSaveAndView(true);
}
Also used : NotificationsUserProfilePage(org.xwiki.platform.notifications.test.po.NotificationsUserProfilePage) ProfileEditPage(org.xwiki.user.test.po.ProfileEditPage) Before(org.junit.Before)

Aggregations

ProfileEditPage (org.xwiki.user.test.po.ProfileEditPage)2 Before (org.junit.Before)1 Test (org.junit.Test)1 NotificationsUserProfilePage (org.xwiki.platform.notifications.test.po.NotificationsUserProfilePage)1 AbstractTest (org.xwiki.test.ui.AbstractTest)1 IgnoreBrowsers (org.xwiki.test.ui.browser.IgnoreBrowsers)1