public void Castr_ResetAndFeatureAPost() { var feedUrl = _params["PremierLeague"].ToString(); var feedUrl2 = _params["ChampionLeague"].ToString(); _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.UnCheckLeague(0); post.PublishPostToFeed(Platforms.ftbpro, 1); CastrPage publishedPosts = newPosts.SelectStatus(Statuses.published); post = publishedPosts.ClickOnPost(postCreator.Title); post.ResetPost(); newPosts = newPosts.SelectStatus(Statuses.New); post = newPosts.ClickOnPost(postCreator.Title); post.PublishPostToFeed(Platforms.ftbpro, 0); _browser.Navigate($"{_config.Url}/{feedUrl}"); FeedPage feedPage = new FeedPage(_browser); Assert.True(feedPage.ValidateArticleByTitle(postCreator.Title), $"Post {postCreator.Title} was not shown on {feedUrl} after it was reseted."); feedPage = new FeedPage(_browser); _browser.Navigate($"{_config.Url}/{feedUrl2}"); Assert.True(feedPage.ValidateArticleByTitle(postCreator.Title), $"Post {postCreator.Title} was not shown on {feedUrl2} after it was reseted."); }
public void Castr_FTB90_CheckIDPostsFromDiffrentDomains() { _browser.Navigate(_config.GlobalConfigObject["90Min"]["Url"].ToString()); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); PostCreator postCreator = new PostCreator(_browser); postCreator.Create(); var url = $"http://{_config.Env}.{_config.GlobalConfigObject["Ftb90"]["Url"]}"; _browser.Navigate(url); HomePage homePageFtb = new HomePage(_browser); homePage.ClickOnConnectBtnWithCoockies(); PostCreator postCreatorFtb90 = new PostCreator(_browser); PostPage postPageFTb90 = postCreatorFtb90.Create(typeof(ArticleBase)); CastrPage castrPage = homePageFtb.GoToCastr(); CastrPage newPosts = new CastrPage(_browser); CastrPost castrPostFTB90 = newPosts.ClickOnPost(postCreatorFtb90.Title); Assert.True(castrPostFTB90.ValidatePublishAlsoTo()); CastrPost castrPost = newPosts.ClickOnPost(postCreator.Title); Assert.True(castrPostFTB90.ValidatePublishAlsoTo()); }
public void Castr_PnPost() { string urbanAirShipUrl = _params["Url"].ToString(); var user = _params["Credentials"]; _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.SendPn(Platforms.mobile, 0); _browser.OpenNewTab($"{_config.Url}/management/push_notifications?test=test"); PnDashBoardPage pnDashBoardPage = new PnDashBoardPage(_browser); Assert.True(pnDashBoardPage.ValidatePost(0, postCreator.Title)); _browser.Navigate(urbanAirShipUrl); UrbanAirShipLoginPage urbanAirShipLoginPage = new UrbanAirShipLoginPage(_browser); urbanAirShipLoginPage.Login(user); Assert.True(urbanAirShipLoginPage.SearchPost(postCreator.Title)); }
public void Castr_Social_Networks_Facebook() { _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.PublishToSocialNetwork(0, 2, 0); FacebookClient facebookClient = new FacebookClient(); Assert.True(facebookClient.SearchPost(postCreator.Title), $"Post {postCreator.Title} was not created"); }
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 Caster_Schedulr_PostBox() { _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.PublishToSocialNetworksSchedul(0, 2, "16"); _browser.Navigate($"{ _config.Url}/management/schedulr"); SchedulrPage schdulrPage = new SchedulrPage(_browser); Assert.False(schdulrPage.ValidatePostFacebook(postCreator.Title) && schdulrPage.ValidatePostTwitter(postCreator.Title)); }
public void Castr_Social_Networks_Twitter() { _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.PublishToSocialNetwork(0, 2, 1); _browser.Navigate(_config.ConfigObject.TwitterUrl); TwitterAppPage twitterAppPage = new TwitterAppPage(_browser); PostPage postPage2 = twitterAppPage.ClickOnTweetLink(postCreator.Title); Assert.True(postPage2.ValidatePostCreated(postCreator.Title), "User has not redircted to post after click on twitter link."); }
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_FTB90_PublishAnIdPostFromFTB90Caster() { _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 = new CastrPage(_browser); newPosts.ClickOnPost(postCreator.Title); FtbPost castrPostFTB90 = new FtbPost(_browser); castrPostFTB90.CheckpublishToCategoryCb(); castrPostFTB90.PublishPostToTeam(1, 0, new List <int> { 0, 1 }, "l"); castrPostFTB90.ValidateSucMsg(); JsonHelper jsonHelper = new JsonHelper(179, postCreator.Title); Assert.True(jsonHelper.SearchArticleInFeed(), $"Post '{postCreator.Title}' was not published to team's feed."); jsonHelper = new JsonHelper(1, postCreator.Title); Assert.False(jsonHelper.SearchArticleInFeed(0), "Post apeared on an unchecked team's feed."); jsonHelper = new JsonHelper(2, postCreator.Title); Assert.False(jsonHelper.SearchArticleInFeed(0), "Post apeared on an unchecked team's feed."); jsonHelper = new JsonHelper("id", 179, "90Min", postCreator.Title); Assert.False(jsonHelper.SearchArticleInFeed(0), "Post apeared on 90Min team's feed."); jsonHelper = new JsonHelper("en", 179, "90Min", postCreator.Title); Assert.False(jsonHelper.SearchArticleInFeed(0), "Post apeared on 90Min team's feed."); jsonHelper = new JsonHelper("lists", postCreator.Title); Assert.True(jsonHelper.SearchArticleInFeed(), $"Post '{postCreator.Title}' was not published to List catageory feed."); }
public void Caster_Schedulr_ValidateDate() { _browser.Navigate(_config.Url); var curYear = DateTime.Now.Year; 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.PublishToSocialNetworks(0, 2); _browser.Navigate($"{ _config.Url}/management/schedulr"); SchedulrPage schdulrPage = new SchedulrPage(_browser); schdulrPage.SelectYear(curYear + 1); SchedulrPage schedulrPageNewDate = schdulrPage.ClickOnGoBtn(); Assert.False(schedulrPageNewDate.ValidatePostFacebook(postCreator.Title, 0, false) && schedulrPageNewDate.ValidatePostTwitter(postCreator.Title, 0, false)); }
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."); }