use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class VetArticlePlaceholderTests method userCanAddVideoFromWikiaUsingPlaceholder.
@Test(groups = { "VideoArticlePlacehoder_002" })
@Execute(asUser = User.USER, onWikia = "mobileregressiontesting")
public void userCanAddVideoFromWikiaUsingPlaceholder() {
new ArticleContent().push(SourceModeContent.PLACEHOLDERS);
ArticlePageObject article = new ArticlePageObject().open();
VetAddVideoComponentObject vetAddingVideo = article.clickAddVideoPlaceholder();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
vetOptions.submit();
article.verifyVideo();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class VetArticlePlaceholderTests method userCanAddVideoByUrlUsingPlaceholderInEditMode.
@Test(groups = { "VideoArticlePlacehoder_003" })
@Execute(asUser = User.STAFF, onWikia = "mobileregressiontesting")
public void userCanAddVideoByUrlUsingPlaceholderInEditMode() {
new ArticleContent().push(SourceModeContent.PLACEHOLDERS);
// Added cause of MAIN-6374 issue
new ArticlePageObject().open();
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
VetAddVideoComponentObject vetAddingVideo = (VetAddVideoComponentObject) visualEditMode.modifyComponent(Components.VIDEO_PLACEHOLDER);
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.setCaption(PageContent.CAPTION);
vetOptions.submit();
visualEditMode.verifyVideo();
ArticlePageObject article = visualEditMode.submitArticle();
article.verifyVideo();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class VetArticlePlaceholderTests method userCanAddVideoByUrlUsingPlaceholder.
@Test(groups = { "VideoArticlePlacehoder_001" })
@Execute(asUser = User.USER, onWikia = "mobileregressiontesting")
public void userCanAddVideoByUrlUsingPlaceholder() {
new ArticleContent().push(SourceModeContent.PLACEHOLDERS);
ArticlePageObject article = new ArticlePageObject().open();
VetAddVideoComponentObject vetAddingVideo = article.clickAddVideoPlaceholder();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.submit();
article.verifyVideo();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class ArticleCommentsTests method ArticleComments_003_anonReplyComment.
@Test(groups = "ArticleComments_003")
public void ArticleComments_003_anonReplyComment() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
String comment = PageContent.COMMENT_TEXT + article.getTimeStamp();
MiniEditorComponentObject editor = article.triggerCommentArea();
editor.switchAndWrite(comment);
article.submitComment();
article.verifyCommentText(comment);
article.verifyCommentCreator(PageContent.WIKIA_CONTRIBUTOR);
article.triggerCommentReply();
String commentReply = PageContent.REPLY_TEXT + article.getTimeStamp();
editor.switchAndReplyComment(commentReply);
article.submitReplyComment();
article.verifyCommentReply(commentReply);
article.verifyReplyCreator(PageContent.WIKIA_CONTRIBUTOR);
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class ArticleCommentsTests method ArticleComments_004_deleteComment.
@Test(groups = "ArticleComments_004")
@Execute(asUser = User.STAFF)
public void ArticleComments_004_deleteComment() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
String comment = PageContent.COMMENT_TEXT + article.getTimeStamp();
MiniEditorComponentObject editor = article.triggerCommentArea();
editor.switchAndWrite(comment);
article.submitComment();
article.verifyCommentText(comment);
article.verifyCommentCreator(credentials.userNameStaff);
String commentText = article.getFirstCommentText();
DeletePageObject delete = article.deleteFirstComment();
delete.submitDeletion();
List<Notification> confirmNotifications = article.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, DeletePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible());
article.verifyCommentDeleted(commentText);
}
Aggregations