use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class UserProfilePageObject method openFirstPost.
public BlogPageObject openFirstPost() {
for (int i = 0; i < blogPostList.size(); i++) {
BlogPageObject blogPage = openBlogPage(i);
String pageContent = blogPage.getAtricleTextRaw().toLowerCase();
if (!(pageContent.contains("deleted") || pageContent.contains("redirected"))) {
PageObjectLogging.log("openFirstPost", "valid post found on " + i + " position", true);
break;
}
PageObjectLogging.log("openFirstPost", "deleted post found on " + i + " position, trying next one", true);
driver.navigate().back();
}
return new BlogPageObject(driver);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class WikiActivityTests method WikiActivityTests_003_newBlogCreationIsRecordedOnActivityModule.
/**
* https://wikia-inc.atlassian.net/browse/DAR-1617
*/
@Test(groups = "WikiActivity_003")
@Execute(asUser = User.USER)
public void WikiActivityTests_003_newBlogCreationIsRecordedOnActivityModule() {
String blogTitle = PageContent.BLOG_POST_NAME_PREFIX + DateTime.now().getMillis();
String blogContent = PageContent.BLOG_CONTENT + DateTime.now().getMillis();
UserProfilePageObject userProfile = new WikiBasePageObject().openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
SpecialCreatePage createBlogPage = userProfile.clickOnCreateBlogPost();
VisualEditModePageObject visualEditMode = createBlogPage.populateTitleField(blogTitle);
visualEditMode.addContent(blogContent);
BlogPageObject blogPage = visualEditMode.submitBlog();
blogPage.verifyBlogTitle(blogTitle);
blogPage.verifyContent(blogContent);
new SpecialWikiActivityPageObject(driver).open().verifyRecentNewBlogPage(blogContent, blogTitle, credentials.userName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class BlogCommentsTests method BlogComments_003_User_editComment.
@Test(groups = "BlogComments_003")
@Execute(asUser = User.USER)
public void BlogComments_003_User_editComment() {
WikiBasePageObject base = new WikiBasePageObject();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
MiniEditorComponentObject editor = blogPage.triggerCommentArea();
String comment = PageContent.COMMENT_TEXT + blogPage.getTimeStamp();
editor.switchAndWrite(comment);
blogPage.submitComment();
blogPage.verifyCommentText(comment);
blogPage.verifyCommentCreator(credentials.userName);
blogPage.triggerEditCommentArea();
String commentEdited = PageContent.COMMENT_TEXT + blogPage.getTimeStamp();
editor.switchAndEditComment(commentEdited);
blogPage.submitEditComment();
blogPage.verifyCommentText(commentEdited);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_002_AddingSlideshow.
@Test(groups = { "BlogFeatures_002", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_002_AddingSlideshow() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
SlideshowBuilderComponentObject slideshowBuilder = blogEdit.clickSlideshowButton();
AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
slideshowAddPhoto.search("image");
slideshowAddPhoto.choosePhotos(4);
slideshowAddPhoto.clickSelect();
slideshowBuilder.adjustPosition(Positions.CENTER);
slideshowBuilder.clickFinish();
blogEdit.verifySlideshow();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifySlideshow();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_003_AddingSlider.
@Test(groups = { "BlogFeatures_003", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_003_AddingSlider() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
SliderBuilderComponentObject sliderBuilder = blogEdit.clickSliderButton();
sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
sliderAddPhoto.search("image");
sliderAddPhoto.choosePhotos(4);
sliderAddPhoto.clickSelect();
sliderBuilder.clickFinish();
blogEdit.verifySlider();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifySlider();
}
Aggregations