public void GivenIEnteredMessageData() { List <Recipient> recipients = EntitiesManager.GetRecipients(); sendMessagePage = messagePage.ClickCreateMessageButton(); sendMessagePage.AssertPageIsLoaded(); sendMessagePage.EnterRecipients(recipients); _context.ExpectedSubject = StringUtils.GenerateAlphanumericString(10); sendMessagePage.EnterSubject(_context.ExpectedSubject); sendMessagePage.EnterMessage(StringUtils.GenerateAlphabeticalString(20)); }
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"); }