public void Can_Edit_A_Page()
        {
            ListPostPage.GoTo(PostType.Page);
            ListPostPage.SelectPost("Sample Page");

            Assert.IsTrue(NewPostPage.IsInEditMode(), "Wasn't in edit mode");
            Assert.AreEqual("Sample Page", NewPostPage.Title, "Title did not match");
        }
Exemple #2
0
        public void Can_Search_Posts()
        {
            PostCreator.CreatePost();

            ListPostPage.SearchForPost(PostCreator.PreviousTitle);

            Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));
        }
Exemple #3
0
        public void Can_Search_Posts()
        {
            // add a new post
            PostCreator.CreatePost();

            // search for post
            ListPostPage.SearchForPost(PostCreator.PreviousTitle);

            // check that post shows up in results
            Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));
        }
 public void Added_Posts_Show_Up()
 {
     ListPostPage.GoTo(PostType.Posts);
     ListPostPage.StoreCount();
     PostCreator.CreatePost();
     ListPostPage.GoTo(PostType.Posts);
     Assert.AreEqual(ListPostPage.PreviousPostCount + 1, ListPostPage.CurrentPostCount, "Could of posts did not increase");
     Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));
     ListPostPage.TrashPost(PostCreator.PreviousTitle);
     Assert.AreEqual(ListPostPage.PreviousPostCount, ListPostPage.CurrentPostCount, "Could not trash post");
 }
        public void Can_Edit_Page()
        {
            // navigate to the list post page
            ListPostPage.GoTo(PostType.Page);

            // select page/post to select
            ListPostPage.SelectPost("Career");

            // verify edit mode
            Assert.IsTrue(NewPostPage.IsInEditMode(), "Was not in edit mode");

            // verify we are at the page/post to edit
            Assert.AreEqual("Career", NewPostPage.Title, "Title did not match");
        }
Exemple #6
0
        public void Added_Posts_Show_Up()
        {
            // get post count and store
            ListPostPage.StoreCount();

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

            // get new post count
            Assert.AreEqual(ListPostPage.PreviousPostCount + 1, ListPostPage.CurrentPostCount, "Post count did not match");

            // check for added post
            Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));

            // delete post
            ListPostPage.DeletePost(PostCreator.PreviousTitle);
            Assert.AreEqual(ListPostPage.PreviousPostCount, ListPostPage.CurrentPostCount, "Could not delete post");
        }
 private static void TrashPost()
 {
     ListPostPage.TrashPost(PreviousTitle);
     Initialize();
 }