public void PostPage_ValidateUiComponentsExistOnPage() { var postTitle = "VIDEO:Test post article"; BsonArray components = _params["Components"].AsBsonArray; _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); FaceBookconnectPage faceBookconnectPage = homePage.ClickOnConnectBtn(); HomePage homePageConnected = faceBookconnectPage.Login(_config.ConfigObject.Users.AdminUser); homePageConnected.ValidateUserProfilePic(); EditorPage editorPage = homePageConnected.ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnArticle(); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle(postTitle); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); _browser.ProxyApi.NewHar(); PostPage postPage = previewPage.ClickOnPublishBtn(); var postId = postPage.GetPostId(); var errors = postPage.ValidateComponents(components); Assert.True(string.IsNullOrEmpty(errors), errors); var counterRequest = _browser.ProxyApi.GetRequests().Where(r => r.Url.Contains("counter") && r.Url.Contains("reads") && r.Url.Contains(postId)); Assert.True(counterRequest.Count() != 0, "A request to counter reads service was not sent."); }
public PostPage Create(Type template) { EditorPage editorPage = ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnTemplate(Templates.FindIndex(x => x == template)); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle(Title); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); postPage.ValidatePostCreated(Title); var parsedTitle = new string(Title.ToCharArray().Where(c => char.IsLetter(c) || c == '-').ToArray()).Replace("posts", "").Replace("-", " "); Title = parsedTitle.Trim(); return(new PostPage(_browser)); }
public void PreviewButtonCheckEditButton() { HomePage homePage = new HomePage(_browser); FaceBookconnectPage faceBookconnectPage = homePage.ClickOnConnectBtn(); HomePage homePageConnected = faceBookconnectPage.Login(_config.ConfigObject.Users.AdminUser); homePageConnected.ValidateUserProfilePic(); EditorPage editorPage = homePageConnected.ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnArticle(); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle("VIDEO:Title Title Title"); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); ArticleBase articleBaseEdit = previewPage.ClickOnEditButton(); Assert.IsTrue(articleBaseEdit.ValidateEditMode()); }
public void PublishButton() { var postTitle = "VIDEO:Test post article"; HomePage homePage = new HomePage(_browser); FaceBookconnectPage faceBookconnectPage = homePage.ClickOnConnectBtn(); HomePage homePageConnected = faceBookconnectPage.Login(_config.ConfigObject.Users.AdminUser); homePageConnected.ValidateUserProfilePic(); EditorPage editorPage = homePageConnected.ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnArticle(); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle(postTitle); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); Assert.IsTrue(postPage.ValidatePostCreated(postTitle)); }
public void ValidateTagsTextBoxInsertSingleTag() { BsonArray tagExValue = _params["Tag"].AsBsonArray; HomePage homePage = new HomePage(_browser); FaceBookconnectPage faceBookconnectPage = homePage.ClickOnConnectBtn(); HomePage homePageConnected = faceBookconnectPage.Login(_config.ConfigObject.Users.AdminUser); homePageConnected.ValidateUserProfilePic(); EditorPage editorPage = homePageConnected.ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnArticle(); articleBase.WriteTags(tagExValue); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle("VIDEO:Title Title Title"); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); string errors = postPage.ValidateTagsOnSourcePage(tagExValue); Assert.IsTrue(string.IsNullOrEmpty(errors), errors); }
public void ValidateUiComponentsExistOnPage() { var postTitle = "VIDEO:Test post article"; BsonArray components = _params["Components"].AsBsonArray; HomePage homePage = new HomePage(_browser); FaceBookconnectPage faceBookconnectPage = homePage.ClickOnConnectBtn(); HomePage homePageConnected = faceBookconnectPage.Login(_config.ConfigObject.Users.AdminUser); homePageConnected.ValidateUserProfilePic(); EditorPage editorPage = homePageConnected.ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnArticle(); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle(postTitle); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); var errors = postPage.ValidateComponents(components); Assert.True(string.IsNullOrEmpty(errors), errors); }