public void RegistrationTest()
        {
            var homePage = new HomePageBL(webDriver);

            homePage
            .ClickOnCreateAnAccountButton()
            .CreateAnAccount();

            var expectedResult = "My Account";
            var actualResult   = new SuccessfulRegistrationPageBL(webDriver).GetMyAccountTitle();

            Assert.IsTrue(actualResult.Contains(expectedResult));
        }
        public void TryToRegistrationWithEmptyFieldsTest()
        {
            var homePage = new HomePageBL(webDriver);

            homePage
            .ClickOnCreateAnAccountButton()
            .TryToCreateAnAccountWithEmptyFields();

            var expectedResult = "This is a required field";
            var actualResult   = new RegistrationPageBL(webDriver).GetErrorMessage();

            Assert.IsTrue(actualResult.Contains(expectedResult));
        }
        public void TryToRegistrationWithWrongFormateDataTest()
        {
            var homePage = new HomePageBL(webDriver);

            homePage
            .ClickOnCreateAnAccountButton()
            .TryToCreateAnAccountWithWrongFormatData();

            var expectedResult = "Minimum of different classes of characters in password is 3." +
                                 " Classes of characters: Lower Case, Upper Case, Digits, Special Characters.";

            var actualResult = new RegistrationPageBL(webDriver).GetErrorMessageWrongPasswordFormat();

            Assert.IsTrue(actualResult.Contains(expectedResult));
        }
Пример #4
0
        public void ChangePasswordTest()
        {
            var homePage = new HomePageBL(webDriver);

            homePage
            .ClickOnCreateAnAccountButton()
            .CreateAnAccount()
            .ClickOnChangePasswordLink();

            var expectedEditAccountTitle = "Edit Account Information";
            var actualTitle = new EditAccountInformationPageBL(webDriver).GetEditAccountTitle();

            Assert.IsTrue(actualTitle.Contains(expectedEditAccountTitle));

            var changePassword = new EditAccountInformationPageBL(webDriver);

            changePassword
            .ChangePassword();
            var expectedSuccessMessage = "You saved the account information.";
            var actual = new SuccessfulRegistrationPageBL(webDriver).GetSuccessSavingInformationMessage();

            Assert.IsTrue(actual.Contains(expectedSuccessMessage));
        }