Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }