public void TestSentMessageSeveralUsers() { List <Recipient> recipients = EntitiesManager.GetRecipients(); sendMessagePage = messagePage.ClickCreateMessageButton(); sendMessagePage.AssertPageIsLoaded(); sendMessagePage.EnterRecipients(recipients); string expectedSubject = StringUtils.GenerateAlphanumericString(10); sendMessagePage.EnterSubject(expectedSubject); sendMessagePage.EnterMessage(StringUtils.GenerateAlphabeticalString(20)); sendMessagePage.SendButtonClick(); Assert.IsTrue(sendMessagePage.CheckMessageIsSent(), "Message sent notification was not displayed."); sendMessagePage.SentMessagesButtonClick(); WebDriverUtil.Refresh(); List <string> subjects = sendMessagePage.GetSubjects(); Assert.IsTrue(subjects.Any(subject => subject.Contains(expectedSubject)), "Subject was not in the list"); }
public void ThenTheMessageShouldBeInSentMessagesFolder() { List <string> subjects = sendMessagePage.GetSubjects(); Assert.IsTrue(subjects.Any(subject => subject.Contains(_context.ExpectedSubject)), "Subject was not in the list"); }