Example #1
0
            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.");
            }
Example #2
0
            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.");
            }