use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class ArticleFeaturesCRUDTestsUser method modifySlideshow.
@Test(groups = { "ArticleFeaturesCRUDUser_003" })
@Execute(asUser = User.USER)
public void modifySlideshow() {
new ArticleContent().push("<gallery type=\"slideshow\">\nImage010.jpg\nImage009.jpg\nImage008.jpg\nImage007.jpg\n" + "Image010.jpg\nImage009.jpg\nImage008.jpg\nImage007.jpg\nImage006.jpg\nImage005.jpg\n" + "Image004.jpg\nImage003.jpg\n</gallery>");
VisualEditModePageObject visualEditor = new VisualEditModePageObject().open();
SlideshowBuilderComponentObject slideshowBuilder = (SlideshowBuilderComponentObject) visualEditor.modifyComponent(Components.SLIDESHOW);
AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
slideshowAddPhoto.search("image");
slideshowAddPhoto.choosePhotos(8);
slideshowAddPhoto.clickSelect();
slideshowBuilder.adjustPosition(Positions.RIGHT);
slideshowBuilder.clickFinish();
visualEditor.verifySlideshow();
visualEditor.submitArticle().verifySlideshow();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class ArticleCommentsTests method ArticleComments_002_replyComment.
@Test(groups = "ArticleComments_002")
@Execute(asUser = User.COMMENTS_REGULAR_USER)
public void ArticleComments_002_replyComment() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
String comment = PageContent.COMMENT_TEXT + DateTime.now().getMillis();
MiniEditorComponentObject editor = article.triggerCommentArea();
editor.switchAndWrite(comment);
article.submitComment();
article.verifyCommentText(comment);
article.verifyCommentCreator(User.COMMENTS_REGULAR_USER.getUserName());
article.triggerCommentReply();
String commentReply = PageContent.REPLY_TEXT + article.getTimeStamp();
editor.switchAndReplyComment(commentReply);
article.submitReplyComment();
article.verifyCommentReply(commentReply);
article.verifyReplyCreator(User.COMMENTS_REGULAR_USER.getUserName());
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class FollowArticleTests method unfollowArticleIfFollowed.
@Test
@Execute(asUser = User.USER)
public void unfollowArticleIfFollowed() {
new ArticleContent().push(PageContent.ARTICLE_TEXT, ARTICLE_NAME);
ArticlePageObject article = new ArticlePageObject().open(ARTICLE_NAME);
WatchPageObject watch = article.unfollowArticle();
watch.confirmWatchUnwatch();
article.verifyPageUnfollowed();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class VetArticleCommentsTests method RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl.
@Test(groups = { "VetArticleComments_001" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "SUS-758", comment = "This issue is related to API call and should not cause permanent " + "test failure. Otherwise the failure must be caused by other issue")
public void RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl() {
new ArticleContent().clear();
ArticlePageObject article = new ArticlePageObject().open();
MiniEditorComponentObject editor = article.triggerCommentArea();
VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo();
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("microsoft");
String expectedCaption = PageContent.CAPTION + article.getTimeStamp();
vetAddingVideo.addVideoByUrl(video.getUrl()).setCaption(expectedCaption).submit();
Assertion.assertTrue(article.getArticleComment().isVideoVisible());
article.submitComment();
Assertion.assertEquals(article.getArticleComment().getLatestCommentCaption(), expectedCaption, "Latest comment caption doesn't equal to expected caption");
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class LightboxTests method LightboxTest_005_verifyExistenceAndURLsOfSocialButtons.
@Test(groups = "LightboxTest_005")
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_005_verifyExistenceAndURLsOfSocialButtons() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
visualEditMode.clearContent();
PhotoAddComponentObject photoAddPhoto = visualEditMode.clickPhotoButton();
PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
photoOptions.setCaption(PageContent.CAPTION);
photoOptions.clickAddPhoto();
visualEditMode.verifyPhoto();
visualEditMode.submitArticle();
article.verifyPhoto();
LightboxComponentObject lightbox = article.clickThumbnailImage();
lightbox.clickPinButton();
// Assure header buttons are visible if not hovered over
lightbox.makeHeaderVisible();
lightbox.clickShareButton();
lightbox.verifyShareButtons();
lightbox.clickFacebookShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.FACEBOOK_DOMAIN);
lightbox.clickTwitterShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.TWITTER_DOMAIN);
lightbox.clickStumbleUponShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.STUMPLEUPON_DOMAIN);
lightbox.clickRedditShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.REDDIT_DOMAIN);
lightbox.clickPlusOneShareButton();
lightbox.verifyUrlInNewWindow(URLsContent.GOOGLE_DOMAIN);
lightbox.clickCloseShareScreenButton();
lightbox.verifyShareScreenClosed();
lightbox.clickCloseButton();
lightbox.verifyLightboxClosed();
}
Aggregations