Search in sources :

Example 91 with ArticleContent

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();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 92 with ArticleContent

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();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 93 with ArticleContent

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();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 94 with ArticleContent

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);
}
Also used : MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Test(org.testng.annotations.Test)

Example 95 with ArticleContent

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);
}
Also used : MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)99 Test (org.testng.annotations.Test)94 Execute (com.wikia.webdriver.common.core.annotations.Execute)55 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)51 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)38 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)16 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)15 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)11 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)8 CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)6 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)4 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)3 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)3