Ejemplo n.º 1
0
        public void Added_Posts_Show_Up()
        {
            // Go to posts, get posts count, store
            ListPostsPage.GoTo(PostType.Posts);
            ListPostsPage.StoreCount();

            // Go back to Dashboard
            DashboardPage.GoTo();

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

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

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

            // Trash post (clean up)
            PostCreator.TrashPost();
            Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash post");
        }