public void LogInSendEmail_DeleteViaRightMouseClick() { _homePage = new HomePage(); _logInform = _homePage.OpenLoginForm(); //Log in as first user _mainEmailBoxPage = _logInform.LogInToEmailBox(Constants.Sender, Constants.Password); _navigationPanel = new MainNavigationPanel(); //Verify that login is successful bool isFirstLoginSuccessfull = _navigationPanel.IsElementVisible(_navigationPanel.InboxLink); Assert.IsTrue(isFirstLoginSuccessfull, $"Login of first user '{Constants.Sender}' was not successful"); //Write and send an email _mainEmailBoxPage.SendEmail(Constants.Recipient, Constants.Message); _logInform = _mainEmailBoxPage.SignOut(); _logInform.LogInToEmailBox(Constants.Recipient, Constants.Password); //Delete an email _mainEmailBoxPage.DeleteEmailViaRightClick(Constants.SenderName); }
public void GivenILogInToTheEmailBoxWithAnd(string login, string password) { LogInForm _logInform = new LogInForm(); _logInform.LogInToEmailBox(login, password); Logger.Configure(); Log.Information($"I login with the invalid credentials: {login} / {password}"); }
public void LogInSendEmailLogOut_LogInChechThatEmailIsSent() { // IHomePage _homePage = new HomePageDecorator(new HomePage()); _logInform = _homePage.OpenLoginForm(); //Log in as first user _logInform.LogInToEmailBox(Constants.Sender, Constants.Password); //Verify that login is successful _navigationPanel = new MainNavigationPanel(); bool isFirstLoginSuccessfull = _navigationPanel.IsElementVisible(_navigationPanel.InboxLink); Assert.IsTrue(isFirstLoginSuccessfull, $"Login of first user '{Constants.Sender}' was not successful"); //Write and send an email _mainEmailBoxPage.SendEmail(Constants.Recipient, Constants.Message); //Verify that email is in sent mail box _navigationPanel.SentMailLink.Click(); _sentMailPage = new SentMailPage(); bool isEmailInSentBox = _sentMailPage.IsElementVisible(_sentMailPage.RecipientName); Assert.IsTrue(isEmailInSentBox, "Email was not sent and is not resent in Sent Mail box"); _logInform = _mainEmailBoxPage.SignOut(); _logInform.LogInToEmailBox(Constants.Recipient, Constants.Password); //Verify that login is successful bool isSecondLoginSuccessfull = _navigationPanel.InboxLink.Displayed; Assert.IsTrue(isSecondLoginSuccessfull, $"Login of second user '{Constants.Recipient}' was not successful"); //Verify that email is in Inbox bool isEmailInInbox = _sentMailPage.IsElementVisible(_sentMailPage.SenderName); Assert.IsTrue(isEmailInInbox, $"Email is not displayed in Inbox"); //Drag&drop email to trash _mainEmailBoxPage.DeleteEmail(Constants.SenderName); //Verify that email is in the trash _navigationPanel.TrashButton.Click(); _trashPage = new TrashPage(); bool isEmailInTrash = _trashPage.IsElementVisible(_trashPage.SenderName); Assert.IsTrue(isEmailInInbox, $"Email is not displayed in Trash"); }
public void GivenILoginWithTheFollowingCredentials(Table table) { var user = new User(table.Rows[0][0], table.Rows[0][1]); ScenarioContext.Current.Add("Username", user); ScenarioContext.Current.Add("Password", user); HomePage _homePage = new HomePage(); LogInForm _logInform = _homePage.OpenLoginForm(); _logInform.LogInToEmailBox(user.Username, user.Password); Logger.Configure(); Log.Information("I login with the following credentials: {Username} / {Password}", table.Rows[0][0], table.Rows[0][1]); }