コード例 #1
0
        public void Logged_Users_Can_Access_Messages_Section()
        {
            LoginSteps.LoginTestUser1();
            NavigateTo.Page(this.MessagesPage);

            MessagesPage.Elements.SendMessageButton.Wait.ForExists(5000);
        }
コード例 #2
0
        public void Trying_To_Remove_A_Friend_Prompts_For_Confirmation()
        {
            LoginSteps.LoginTestUser1();
            NavigateTo.Page(this.FriendsPage);

            this.FriendsPage.Elements.RemoveFriendshipButton.Click();

            this.FriendsPage.Elements.RemoveFriendshipConfirmation.Wait.ForExists(5000);
        }
コード例 #3
0
        public void Send_Message_Button_On_A_Friends_Tile_Navigates_To_The_Correct_Place()
        {
            LoginSteps.LoginTestUser1();
            NavigateTo.Page(this.FriendsPage);

            this.FriendsPage.Elements.SendMessageButton.Click();
            Manager.Current.ActiveBrowser.WaitUntilReady();

            this.MessagesPage.Elements.Messages.AssertTextIsContained("13:32, 1.10Test22:49, 8.10Test22:52, 8.10Test22:54, 8.10This is a text message");
        }
コード例 #4
0
        public void Invitation_Is_Received_By_The_Correct_Users()
        {
            LoginSteps.LoginTestUser1();
            FriendsSteps.RemoveUserFromFriends(TestUsers.TestUser2);
            FriendsSteps.AddUserToFriends(TestUsers.TestUser2);

            LoginSteps.LoginTestUser2();
            this.UserStartPage.UnacceptedInvitationsLink.Wait.ForExists();

            // Reverse to initial state (the two test users ARE friends)
            FriendsSteps.AcceptUserInvitation();
        }
コード例 #5
0
        public void Request_Notification_Disappears_After_Friendship_Approval()
        {
            LoginSteps.LoginTestUser1();
            FriendsSteps.RemoveUserFromFriends(TestUsers.TestUser2);
            FriendsSteps.AddUserToFriends(TestUsers.TestUser2);

            LoginSteps.LoginTestUser2();
            this.UserStartPage.UnacceptedInvitationsLink.Wait.ForExists();

            FriendsSteps.AcceptUserInvitation();
            this.Browser.Refresh();

            this.UserStartPage.UnacceptedInvitationsLink.Wait.ForExistsNot();
        }
コード例 #6
0
        public void Removing_A_Friend_Removes_Him_From_Your_Friends_List()
        {
            LoginSteps.LoginTestUser1();
            FriendsSteps.RemoveUserFromFriends(TestUsers.TestUser2);

            NavigateTo.Page(this.FriendsPage);
            Manager.Current.ActiveBrowser.RefreshDomTree();
            this.FriendsPage.Elements.NoFriendsMessage.Wait.ForExists(5000);

            // Reverse to initial state (the two test users ARE friends)
            FriendsSteps.AddUserToFriends(TestUsers.TestUser2);
            LoginSteps.LoginTestUser2();
            FriendsSteps.AcceptUserInvitation();
        }
コード例 #7
0
        public void Requesting_A_Friendship_Does_Not_Add_User_To_Your_Friends_Without_Approval()
        {
            LoginSteps.LoginTestUser1();
            FriendsSteps.RemoveUserFromFriends(TestUsers.TestUser2);
            FriendsSteps.AddUserToFriends(TestUsers.TestUser2);

            NavigateTo.Page(this.FriendsPage);

            this.FriendsPage.Elements.SentInvitationsList.Wait.ForExists(5000);

            // Reverse to initial state (the two test users ARE friends)
            LoginSteps.LoginTestUser2();
            FriendsSteps.AcceptUserInvitation();
        }
コード例 #8
0
        public void Invitation_Notification_Link_Navigates_To_The_Correct_Place()
        {
            LoginSteps.LoginTestUser1();
            FriendsSteps.RemoveUserFromFriends(TestUsers.TestUser2);
            FriendsSteps.AddUserToFriends(TestUsers.TestUser2);

            LoginSteps.LoginTestUser2();
            this.UserStartPage.UnacceptedInvitationsLink.Click();
            this.Browser.WaitUntilReady();

            Assert.AreEqual(this.FriendsPage.Url, this.Browser.Url);

            // Reverse to initial state (the two test users ARE friends)
            FriendsSteps.AcceptUserInvitation();
        }
コード例 #9
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();
        }
コード例 #10
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();
        }
コード例 #11
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();
        }