Ejemplo n.º 1
0
        public void Can_Search_Posts()
        {
            #region Manual test case
            //Go to login page
            //Login as “admin” user with correct password “ha tran”
            //Click Login button
            //Hover mouse on the “Posts” menu on the left navigation panel
            //Click “All Posts” menu
            //Enter a search string that matches to at least a post title to the Search text box
            //Click “Search Posts” button
            //Verify that the matching post titles show up in the list
            #endregion Manual test case

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

            //Go to list posts
            ListPostsPage.GoTo(PostType.Posts);

            //Search for posts
            ListPostsPage.SearchForPosts(PostCreator.PreviousTitle);

            //Check that post show up in results
            Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));
        }
Ejemplo n.º 2
0
        public void Added_Post_Show_Up()
        {
            #region Manual test case
            //Go to login page
            //Login as “admin” user with correct password “ha tran”
            //Click Login button
            //Hover mouse on the “Posts” menu on the left navigation panel
            //Click “All Posts” menu
            //Observe and record the posts count at the top right corner of the posts list
            //Add a new post and publish it
            //Go to All Posts list
            //Verify that the posts count increase by 1
            //Verify that the added post exists in the list
            #endregion Manual test case
            //Go to Posts, get post count, store
            ListPostsPage.GoTo(PostType.Posts);
            ListPostsPage.StoreCount();

            //Add a new post
            PostCreator.CreatePost();
            //Go to Posts, get new post count
            ListPostsPage.GoTo(PostType.Posts);
            Assert.AreEqual(ListPostsPage.PreviousPostsCount + 1, ListPostsPage.CurrentPostsCount, "Count of posts didn't increase");

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

            //Trash post(clean up)
            ListPostsPage.TrashPost(PostCreator.PreviousTitle);
            Assert.AreEqual(ListPostsPage.PreviousPostsCount, ListPostsPage.CurrentPostsCount, "Couldn't trash post");
        }
Ejemplo n.º 3
0
        public void Can_Search_Posts()
        {
            PostCreator.CreatePost();

            ListPostPage.SearchForPost(PostCreator.PreviousTitle);

            Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));
        }
        public void Can_Search_Posts()
        {
            //create a new post
            PostCreator.CreatePost();

            //search for post
            ListPostsPage.SearchForPost(PostCreator.PreviousTitle);
            //check the post shows up in the results
            Assert.IsTrue(ListPostsPage.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");
 }
Ejemplo n.º 6
0
        public void Can_Search_Posts()
        {
            // Create a new post
            PostCreator.CreatePost();

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

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

            // Cleanup (Trash post)
            // Automatically clean up by WordpressTests class
        }
        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);
        }
Ejemplo n.º 8
0
        public void Can_Search_Posts()
        {
            PostCreator.CreatePost();
            //NewPostPage.GoTo();
            //NewPostPage.CreatePost("Searching posts, title")
            //    .WithBody("Searching posts, body")
            //    .Publish();

            //ListPostsPage.GoTo(PostType.Post);  change to Is At

            ListPostsPage.SearchForPost(PostCreator.PreviousTitle);

            Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle(PostCreator.PreviousTitle));

            //Trash post(clean up)  - moved to PostCreator in TestCleanup(WOrdpressTests)
            //ListPostsPage.TrashPost(PostCreator.PreviousTitle);
        }
Ejemplo n.º 9
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");
        }
        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");
        }
Ejemplo n.º 11
0
        public void AddedPostsShowUp()
        {
            // Go to posts, get post count, store
            ListPostsPage.GoTo(PostType.Posts);
            ListPostsPage.StoreCount();

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

            //Go to posts, get new post count
            ListPostsPage.GoTo(PostType.Posts);
            Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Post was not publish");

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

            // Delete post
            ListPostsPage.TrashPost(PostCreator.PreviousTitle);
            Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Post was not deleted");
        }