public void New_Messages_Sent_Invoke_New_Messages_Notification() { LoginSteps.LoginTestUser1(); string messageContent = RandomDataGenerator.GenerateRandomString(5, 15); MessagesSteps.SendMessageTo(TestUsers.TestUser2, messageContent); LoginSteps.LoginTestUser2(); this.StartPageElements.NewMessagesLink.AssertIsPresent(); // Reverse to initial state (there are no unread messages between the users) MessagesSteps.ReadNewMessages(); }
public void New_Messages_Notification_Is_Removed_After_The_Message_Is_Read() { LoginSteps.LoginTestUser1(); string messageContent = RandomDataGenerator.GenerateRandomString(5, 15); MessagesSteps.SendMessageTo(TestUsers.TestUser2, messageContent); LoginSteps.LoginTestUser2(); this.StartPageElements.NewMessagesLink.AssertIsPresent(); MessagesSteps.ReadNewMessages(); NavigateTo.Url("http://test.telerikacademy.com/"); this.StartPageElements.NewMessagesLink.AssertIsNotPresent(); }
public void Messages_Sent_Are_Received_By_The_Recepient() { LoginSteps.LoginTestUser1(); string messageContent = RandomDataGenerator.GenerateRandomString(5, 15); MessagesSteps.SendMessageTo(TestUsers.TestUser2, messageContent); LoginSteps.LoginTestUser2(); NavigateTo.Page(this.MessagesPage); this.MessagesPage.Elements.FriendTile.Click(); this.MessagesPage.Elements.Messages.Wait.ForExists(5000); Assert.IsTrue(this.MessagesPage.Elements.Messages.InnerText.Contains(messageContent)); // Reverse to initial state (there are no unread messages between the users) MessagesSteps.ReadNewMessages(); }