Examples of ResetPasswordPage


Examples of org.zanata.page.account.ResetPasswordPage

    @Feature(summary = "The user may reset their password via email",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void resetPasswordSuccessful() {
        ResetPasswordPage resetPasswordPage = new BasicWorkFlow()
                .goToHome()
                .clickSignInLink()
                .goToResetPassword()
                .enterUserName("admin")
                .enterEmail("admin@example.com")
                .resetPassword();

        assertThat(resetPasswordPage.getNotificationMessage())
                .isEqualTo("You will soon receive an email with a link to " +
                        "reset your password.");

        WiserMessage message = hasEmailRule.getMessages().get(0);
        String emailContent = HasEmailRule.getEmailContent(message);
View Full Code Here

Examples of org.zanata.page.account.ResetPasswordPage

    @Feature(summary = "The user must enter a known account and email pair " +
            "to reset their password",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void resetPasswordFailureForInvalidAccount() {
        ResetPasswordPage resetPasswordPage = new BasicWorkFlow()
                .goToHome()
                .clickSignInLink()
                .goToResetPassword()
                .enterUserName("nosuchuser")
                .enterEmail("nosuchuser@nosuchdomain.com")
                .resetFailure();

        assertThat(resetPasswordPage.getNotificationMessage())
                .isEqualTo("No such account found")
                .as("A no such account message is displayed");
    }
View Full Code Here

Examples of org.zanata.page.account.ResetPasswordPage

    @Feature(summary = "The user must enter a valid account and email pair " +
            "to reset their password",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void invalidResetPasswordFieldEntries() {
        ResetPasswordPage resetPasswordPage = new BasicWorkFlow()
                .goToHome()
                .clickSignInLink()
                .goToResetPassword()
                .enterUserName("b")
                .enterEmail("b")
                .resetFailure();

        assertThat(resetPasswordPage.expectError("not a well-formed email address"))
                .contains("not a well-formed email address")
                .as("Invalid email error is displayed");

        String error = resetPasswordPage.getErrors().get(0);
        // Both are valid, but show seemingly at random
        assertThat(error.equals("size must be between 3 and 20") ||
                error.equals("must match ^[a-z\\d_]{3,20}$"))
                .isTrue()
                .as("Invalid email error is displayed");
View Full Code Here

Examples of org.zanata.page.account.ResetPasswordPage

    @Feature(summary = "The user must enter both an account name and email " +
            "address to reset their password",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void emptyResetPasswordFieldEntries() {
        ResetPasswordPage resetPasswordPage = new BasicWorkFlow()
                .goToHome()
                .clickSignInLink()
                .goToResetPassword()
                .clearFields()
                .resetFailure();

        assertThat(resetPasswordPage.expectError("may not be empty"))
                .contains("may not be empty")
                .as("Empty email error is displayed");

        // All are valid, but may show at random
        String error = resetPasswordPage.getErrors().get(0);
        assertThat(error.equals("size must be between 3 and 20") ||
                error.equals("may not be empty") ||
                error.equals("must match ^[a-z\\d_]{3,20}$"))
                .as("The regex match for the reset password field has failed");
    }
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.