public void Can_Search_Posts()
        {
            //Create a new post
            PostCreator.CreatePost();

            //Search for post
            ListsPostPage.SearchForPost(PostCreator.PreviousTitle);

            //Check that post show up in results
            Assert.IsTrue(ListsPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));

            //Clean up(Trash post)
            ListsPostPage.TrashPost(PostCreator.PreviousTitle);
        }
        public void Added_Posts_Show_Up()
        {
            //Go to posts, get post count, store
            ListsPostPage.GoTo(PostType.Posts);
            ListsPostPage.StoreCount();

            //Add a new post
            PostCreator.CreatePost();

            //Go to posts, get a new post count
            ListsPostPage.GoTo(PostType.Posts);
            Assert.AreEqual(ListsPostPage.PreviousPostCount + 1, ListsPostPage.CurrentPostCount, "Count of posts did not increase");

            //Check for added post
            Assert.IsTrue(ListsPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));

            //Trash post(clean up)
            ListsPostPage.TrashPost(PostCreator.PreviousTitle);
            Assert.AreEqual(ListsPostPage.PreviousPostCount, ListsPostPage.CurrentPostCount, "Could not trash post");
        }
Example #3
0
 private static void TrashPost()
 {
     ListsPostPage.TrashPost(PreviousTitle);
     Initialize();
 }