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