Beispiel #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));
        }
        public void ModifyValidInput(UserProfileData input)
        {
            //Navigate to usr profile from PersonalMgtMenu.
            PersonalMgt.NavigatorToUserProfile();
            TimeManager.LongPause();
            TimeManager.LongPause();

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

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

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

            //Verify the modify field saved successfully.
            Assert.AreEqual(input.ExpectedData.RealName, UserProfile.GetRealNameValue());
            Assert.AreEqual(input.ExpectedData.Email, UserProfile.GetEmailValue());
            Assert.AreEqual(input.ExpectedData.Telephone, UserProfile.GetTelephoneValue());
            Assert.AreEqual(input.ExpectedData.Comments, UserProfile.GetCommentValue());
        }