public void Editor_List_FullFlow() { BsonArray tagExValue = _params["Tags"].AsBsonArray; BsonArray titles = _params["Titles"].AsBsonArray; string body = _params["Body"].ToString(); _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); EditorPage editorPage = homePage.ClickOnAddArticle(); ListsTemplate listsTemplate = editorPage.ClickOnList(); listsTemplate.WriteTitle("VIDEO:test list template"); listsTemplate.DragImages(); listsTemplate.SetSubTitles(titles); listsTemplate.SetBodyTextBoxs(body); listsTemplate.WriteTags(tagExValue); listsTemplate.ClickOnAscendingBtn(); listsTemplate.ClickOnDscBtn(); PreviewPage previewPage = listsTemplate.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); Assert.True(postPage.ValidatePostCreated("VIDEO:test list template"), "Post was not created"); }
public void Editor_List_FullFlow() { Auth0LoginPage loginPage = new Auth0LoginPage(_browser); NewsRoomPage newsRoomPage = loginPage.LoginNewsRoom(_config.ConfigObject.Users.AdminUser); EditorPage editorPage = newsRoomPage.ClickOnEditorBtn(); BsonArray tagExValue = _params["Tags"].AsBsonArray; BsonArray titles = _params["Titles"].AsBsonArray; string body = _params["Body"].ToString(); ListsTemplate listsTemplate = editorPage.ClickOnList(); listsTemplate.WriteTitle("VIDEO:test list template"); listsTemplate.SearchImage("cats"); listsTemplate.DragImages(); listsTemplate.SetSubTitles(titles); listsTemplate.SetBodyTextBoxsMmNews(body); listsTemplate.WriteTags(tagExValue); listsTemplate.ClickOnAscendingBtn(); listsTemplate.ClickOnDscBtn(); PreviewPage previewPage = listsTemplate.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); Assert.True(postPage.ValidatePostCreated("VIDEO:test list template"), "Post was not created"); var errors = postPage.ValidateComponents(_params["Components"].AsBsonArray); Assert.True(string.IsNullOrEmpty(errors), errors); }
public void Editor_List_ValidateDragImages() { _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); EditorPage editorPage = homePage.ClickOnAddArticle(); ListsTemplate listsTemplate = editorPage.ClickOnList(); listsTemplate.DragImages(); var listEditorImages = listsTemplate.GetImagesUrl(); Assert.True(listEditorImages.Count == 4, $"Expected 4 images, but actual {listEditorImages.Count}"); }
public void Editor_List_ValidateAscendingOrder() { _browser.Navigate(_config.Url); HomePage homePage = new HomePage(_browser); homePage.Login(_config.ConfigObject.Users.AdminUser); EditorPage editorPage = homePage.ClickOnAddArticle(); ListsTemplate listsTemplate = editorPage.ClickOnList(); List <string> before = listsTemplate.GetItemsIndex(); listsTemplate.ClickOnAscendingBtn(); List <string> after = listsTemplate.GetItemsIndex(); Assert.True(listsTemplate.ValidateAscDesc(before, after), "The counter is not in ascending order."); }
public void Editor_List_ValidateTtitle() { _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(); ListsTemplate listsTemplate = editorPage.ClickOnList(); listsTemplate.WriteTitle("Test Title Lists Template"); Assert.True(listsTemplate.ValidateTitle(), "Title in text box was not as inserted."); }
public void Editor_List_ValidateSubTitelsFields() { BsonArray titles = _params["Titles"].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(); ListsTemplate listsTemplate = editorPage.ClickOnList(); listsTemplate.SetSubTitles(titles); List <string> acValues = listsTemplate.GetSubTitelsValues(); Assert.True(listsTemplate.ValidateSubTitlesFields(acValues, titles), "Actual values are not as expected values"); }
public void Editor_List_ValidateTextBoxsBodys() { string text = _params["text"].ToString(); _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(); ListsTemplate listsTemplate = editorPage.ClickOnList(); listsTemplate.SetBodyTextBoxs(text); List <string> acValues = listsTemplate.GetBodyTextBoxesValue(); var errors = listsTemplate.ValidateBodyTextBoxes(acValues, text); Assert.True(string.IsNullOrEmpty(errors), errors); }