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 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 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 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 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"); }
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"); }