Example #1
0
        public void ModifyUserProfileFailedWhenCancel(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();

            UserProfile.FillInUserProfile(input.InputData);
            //Cancel modification by cancel button.
            UserProfile.ClickCancelButton();
            TimeManager.LongPause();

            //Verify the modify fields didn't save 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());
        }
        public void ModifyProfileToEmptyComments(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();
            UserProfile.FillInUserProfile(input.InputData);
            UserProfile.ClickSaveButton();
            TimeManager.MediumPause();

            //Verify the modify field saved successfully.
            Assert.AreEqual(input.ExpectedData.Name, UserProfile.GetNameValue());
            Assert.AreEqual(input.ExpectedData.RealName, UserProfile.GetRealNameValue());
            Assert.AreEqual(input.ExpectedData.Type, UserProfile.GetTypeValue());
            Assert.AreEqual(input.ExpectedData.Title, UserProfile.GetTitleValue());
            Assert.AreEqual(input.ExpectedData.Email, UserProfile.GetEmailValue());
            Assert.AreEqual(input.ExpectedData.Telephone, UserProfile.GetTelephoneValue());

            //Verify the comment is hidden when save with blank.
            UserProfile.IsCommentHidden();
        }