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)); }
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"); }
public void Can_Search_Posts() { PostCreator.CreatePost(); ListPostsPage.SearchForPost(PostCreator.PreviousTitle); Assert.IsTrue(ListPostsPage.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 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 Added_Posts_Show_Up() { ListPostsPage.GoTo(PostType.Posts); ListPostsPage.StoreCount(); PostCreator.CreatePost(); ListPostsPage.GoTo(PostType.Posts); Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Count of posts did not increase"); Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle(PostCreator.PreviousTitle)); ListPostsPage.TrashPost(PostCreator.PreviousTitle); Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash post"); }
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); }
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"); }
public void Can_Search_Posts() { // Create new post NewPostPage.GoTo(); NewPostPage.CreatePost("Searching posts, title") .WithBody("Seraching posts, body") .Publish(); // Go to lists posts ListPostsPage.GoTo(PostType.Posts); // Search for the post ListPostsPage.SearchForPost("Searching posts, title"); // Check that posts shows up in the results Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle("Searching posts, title")); // Cleanup (Trash post) ListPostsPage.TrashPost("Searching posts, title"); }
public void Added_Posts_Show_Up() { // Go to posts, get post count, store ListPostsPage.GoTo(PostType.Posts); ListPostsPage.StoreCount(); // Add a new post PostCreator.CreatePost(); // Check for count ListPostsPage.GoTo(PostType.Posts); Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Count is wrong of posts on page"); // Check for added post Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle(PostCreator.PreviousTitle)); // Trash post (clean up) ListPostsPage.TrashPost(PostCreator.PreviousTitle); Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash post"); }
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"); }
public void Added_Posts_Show_Up() { // Go to posts, get post count, store ListPostsPage.GoTo(ListPostsPage.PostType.Posts); ListPostsPage.StoreCount(); // Add a new post NewPostPage.GoTo(); NewPostPage.CreatePost("Added posts show up, title") .WithBody("Added posts show up, body") .Publish(); // Go to posts, get new post count ListPostsPage.GoTo(ListPostsPage.PostType.Posts); Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Count of posts did not increase"); // Check for added post Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle("Added posts show up, title")); // Trash post (clean up) ListPostsPage.TrashPost("Added posts show up, title"); Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash post"); }
public void Added_Posts_Show_Up() { // go to posts, het post count, store ListPostsPage.GoTo(PostType.Posts); ListPostsPage.StoreCount(); // add a new post PostCreator.CreatePost(); //go to post, get new post count ListPostsPage.GoTo(PostType.Posts); Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Count of posts did not increase"); // check for added post Assert.IsTrue(ListPostsPage.DoesPostExistWithTitle(PostCreator.PreviousTitle)); //trash post (clean up) ListPostsPage.TrashPost(PostCreator.PreviousTitle); Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash post"); }