public static void SetupTest(TestContext testContext) { Browser.Open(); HomePage = Pages.Home; HomePage.Open(); LoginDialog = HomePage.OpenLogInDialog(); ForgotPasswordDialog = LoginDialog.ForgotPassword(); ForgotPasswordDialog.WaitElementToAppear(ForgotPasswordDialog.Root); }
public void UserActivatedPasswordMismatchTest() { // Arrange Gmail.DeleteUnread(); ForgotPasswordDialog.HelpMe(Users.Activated); ForgotPasswordDialog.WaitForClose(); Gmail.WaitLetter(); Gmail.GetLetterLinks(); Assert.AreEqual(Users.Activated.Email, Gmail.LetterLinks["User"].Text); Browser.Goto(Gmail.LetterLinks["Reset"].Href); // Act var updateDialog = Dialogs.Update; updateDialog.UpdatePassword(Users.Activated.Password, Users.WrongPassword.Password); // Assert ForgotPasswordDialog.WaitElementToAppear(ForgotPasswordDialog.ErrorMessage); Assert.IsTrue(ForgotPasswordDialog.ErrorMessage.Displayed); Assert.AreEqual("This email was not found in our system", ForgotPasswordDialog.ErrorMessage.Text); }