public void ThenUserOnUser_InfoPageShouldBeAsExpected() { User user = (User)_scenarioContext["user"]; Assert.AreEqual(UserInfoP.GetFirstName(), user.FirstName); Assert.AreEqual(UserInfoP.GetLastName(), user.LastName); Assert.AreEqual(UserInfoP.GetEmail(), user.Email); Assert.AreEqual(UserInfoP.GetPhone(), user.Phone); }
public void TestChangeEmail() { UITest(() => { logInPage.SignIn(Constants.USER_FOR_CHANGE_EMAIL, Constants.USER_PASSWORD); userInfo = header.GoToUserAccountPage(); var changeEmailPage = userInfo.OpenChangeEmailPage(); string newEmail = "*****@*****.**"; changeEmailPage.SetNewEmail(newEmail, Constants.USER_PASSWORD); var email = header.GoToUserAccountPage().GetEmail(); var isEqual = String.Equals(email, newEmail); Assert.True(isEqual); header.SignOut(); header.GoToLogInPage().SignIn("*****@*****.**", Constants.USER_PASSWORD); var flag = header.GetCurrentUrl().Contains(Constants.LOGIN_URL_CONTAINS); Assert.False(flag, "Email was changed on UI but not in DB"); header.GoToUserAccountPage(); var isEqualAfterRepeatLogIn = string.Equals(userInfo.GetEmail(), newEmail, StringComparison.InvariantCulture); Assert.True(isEqualAfterRepeatLogIn); }); }