Package org.xwiki.test.ui.framework.elements.editor

Examples of org.xwiki.test.ui.framework.elements.editor.ChangePasswordPage.submit()


        // Change the password
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        String newPassword = RandomStringUtils.randomAlphanumeric(6);
        changePasswordPage.changePassword(newPassword, newPassword);
        changePasswordPage.submit();

        // Logout
        getUtil().forceGuestUser();
        HomePage home = new HomePage();
        home.gotoPage();
View Full Code Here


    public void testChangePasswordWithTwoDifferentPasswords()
    {
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        changePasswordPage.changePassword(PASSWORD_1, PASSWORD_2);
        changePasswordPage.submit();
        Alert alert = getDriver().switchTo().alert();
        Assert.assertEquals(PASSWORD_MISMATCH, alert.getText());
        alert.accept();
    }
View Full Code Here

    @Test
    public void testChangePasswordWithoutEnteringPasswords()
    {
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        changePasswordPage.submit();
        Alert alert = getDriver().switchTo().alert();
        Assert.assertEquals(PASSWORD_IS_EMPTY, alert.getText());
        alert.accept();
    }
View Full Code Here

        getUtil().getURLToLoginAsAdminAndGotoPage(this.customProfilePage.getURL());
        getUtil().recacheSecretToken();
        PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
        ChangePasswordPage changePasswordPage = preferencesPage.changePassword();
        changePasswordPage.changePassword(PASSWORD_1, PASSWORD_2);
        changePasswordPage.submit();
        Alert alert = getDriver().switchTo().alert();
        Assert.assertEquals(PASSWORD_MISMATCH, alert.getText());
        alert.accept();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.