Example #1
0
            public void Caster_Schedulr_SocialNetworks()
            {
                _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.PublishToSocialNetworks(0, 2);
                _browser.Navigate($"{ _config.Url}/management/schedulr");
                SchedulrPage schdulrPage = new SchedulrPage(_browser);

                Assert.True(schdulrPage.ValidatePostFacebook(postCreator.Title) && schdulrPage.ValidatePostTwitter(postCreator.Title));
            }
Example #2
0
            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));
            }