Exemplo n.º 1
0
        public void ModifyIllegalUserProfile(UserProfileData input)
        {
            //Navigate to usr profile from PersonalMgtMenu.
            PersonalMgt.NavigatorToUserProfile();
            TimeManager.LongPause();
            TimeManager.LongPause();

            PersonalMgt.ClickViewUserProfile();
            TimeManager.LongPause();
            TimeManager.LongPause();
            TimeManager.LongPause();

            //Modify the profile
            UserProfile.ClickModifyButton();
            TimeManager.LongPause();
            //Fillin each filed with common data.
            UserProfile.FillInRealName(input.InputData.RealName);
            UserProfile.FillInTelephone(input.InputData.Telephone);
            UserProfile.FillInEmail(input.InputData.Email);
            UserProfile.FillInComment(input.InputData.Comments);

            UserProfile.ClickSaveButton();
            TimeManager.MediumPause();

            //Verify the invalid message display correctly.
            Assert.IsFalse(UserProfile.IsCommentsInvalid());
            Assert.IsFalse(UserProfile.IsCommentsInvalid());
            Assert.IsFalse(UserProfile.IsCommentsInvalid());
            Assert.IsFalse(UserProfile.IsCommentsInvalid());
            TimeManager.MediumPause();

            Assert.IsTrue(UserProfile.IsTelephoneInvalidMsgCorrect(input.ExpectedData.Telephone));
            Assert.IsTrue(UserProfile.IsEmailInvalidMsgCorrect(input.ExpectedData.Email));
            Assert.IsTrue(UserProfile.IsRealNameInvalidMsgCorrect(input.ExpectedData.RealName));
        }