public void Castr_CheckPublishStatus() { _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); PostCreator postCreator = new PostCreator(_browser); postCreator.Create(); CastrPage castrPage = homePage.GoToCastr(); CastrPage newPosts = castrPage.SelectStatus(Statuses.New); CastrPost post = newPosts.ClickOnPost(postCreator.Title); post.PublishPost(); CastrPage publishedPosts = castrPage.SelectStatus(Statuses.published); Assert.True(publishedPosts.SearchPostByTitle(postCreator.Title), "Was was not shown under 'Published' after published."); }
public void Castr_CheckControlsAreDissabledOnPublishPost() { _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); PostCreator postCreator = new PostCreator(_browser); postCreator.Create(); CastrPage castrPage = homePage.GoToCastr(); CastrPage newPosts = castrPage.SelectStatus(Statuses.New); CastrPost post = newPosts.ClickOnPost(postCreator.Title); post.PublishPost(); CastrPage publishedPosts = newPosts.SelectStatus(Statuses.published); post = publishedPosts.ClickOnPost(postCreator.Title); Assert.True(post.ValidateTextAreasDissabled() && post.ValidateInputDissabled() && post.ValidateControlsDissabled(), "Controls were not dissabled."); }
public void Castr_CheckReset() { _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); PostCreator postCreator = new PostCreator(_browser); postCreator.Create(); CastrPage castrPage = homePage.GoToCastr(); CastrPage newPosts = castrPage.SelectStatus(Statuses.New); CastrPost post = newPosts.ClickOnPost(postCreator.Title); post.PublishPost(); CastrPage publishedPosts = castrPage.SelectStatus(Statuses.published); post = publishedPosts.ClickOnPost(postCreator.Title); post.ResetPost(); Assert.True(castrPage.ValidateSucMsg(), "Post reset suc message hasn't shown"); CastrPage archivedPosts = publishedPosts.SelectStatus(Statuses.New); Assert.True(archivedPosts.SearchPostByTitle(postCreator.Title), "Post was not shown under 'New' after reseted."); }