Exemplo n.º 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 ViewProfile(UserProfileData input)
        {
            //Navigate to usr profile from PersonalMgtMenu.
            PersonalMgt.NavigatorToUserProfile();
            TimeManager.MediumPause();

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

            //View user profile
            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());
            Assert.AreEqual(input.ExpectedData.Comments, UserProfile.GetCommentValue());
        }