public void CanSearchPosts() { Wordpress.StartApplication(); //Add a new post PostCreater.CreatePost(); //Search for posts ListPostsPage.SearchForPost(PostCreater.PreviousTitle); //check for post up in the results Assert.IsTrue(ListPostsPage.DoesPostExistsWithTitle(PostCreater.PreviousTitle)); }
public void Can_Search_Posts() { // Create new post NewPostPage.GoTo(); NewPostPage.CreatePost("Searching posts, title") .WithBody("Searching posts, body") .Publish(); // Go to list posts ListPostsPage.GoTo(PostType.Posts); // Search for post ListPostsPage.SearchforPost("Searching posts, title"); // Check that post shows up in results Assert.IsTrue(ListPostsPage.DoesPostExistsWithTitle("Searching posts, title")); // Cleanup (Trash post) ListPostsPage.TrashPost("Searching posts, title"); }
public void CreatePostUsingWorkflow() { Wordpress.StartApplication(); //Go to posts, get post count and store ListPostsPage.GoTo(PostType.Posts); ListPostsPage.StorePostsCount(); //Add a new post PostCreater.CreatePost(); //Go to posts, get new posts count ListPostsPage.GoTo(PostType.Posts); Assert.AreEqual(ListPostsPage.PreviousPostCount + 1, ListPostsPage.CurrentPostCount, "Count of posts did not match"); //Check for added posts Assert.IsTrue(ListPostsPage.DoesPostExistsWithTitle(PostCreater.PreviousTitle), ""); //Trash Post (Clean up) ListPostsPage.TrashPost(PostCreater.PreviousTitle); 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(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, "Count of current posts didn't increase"); // Check for added post Assert.IsTrue(ListPostsPage.DoesPostExistsWithTitle(PostCreator.PreviousTitle)); // Trash post(clean up) ListPostsPage.TrashPost(PostCreator.PreviousTitle); Thread.Sleep(1000); Assert.AreEqual(ListPostsPage.PreviousPostCount, ListPostsPage.CurrentPostCount, "Couldn't trash the post"); }