Search in sources :

Example 21 with VetAddVideoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.

the class VetArticleCommentsTests method RegularUserCanAddVideoInArticleCommentEditorByFindingWikiaVideo.

@Test(groups = { "VetArticleComments_002" })
@Execute(asUser = User.USER)
public void RegularUserCanAddVideoInArticleCommentEditorByFindingWikiaVideo() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject().open();
    MiniEditorComponentObject editor = article.triggerCommentArea();
    VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
    vetOptions.setCaption(PageContent.CAPTION);
    String desiredVideoName = vetOptions.getVideoName();
    vetOptions.submit();
    Assertion.assertTrue(article.getArticleComment().isVideoVisible(), "Video is not visible");
    article.submitComment();
    Assertion.assertTrue(article.isVideoCommentPresent(desiredVideoName), "Video comment doesn't have desired name");
}
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) 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 22 with VetAddVideoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject 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 23 with VetAddVideoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject 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 24 with VetAddVideoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject 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 25 with VetAddVideoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.

the class VetSpecialVideosTests method SpecialVideos_001_Provider.

@Test(groups = { "VetTests001" })
@Execute(asUser = User.USER)
public void SpecialVideos_001_Provider() {
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("flower");
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
    specialVideos.openSpecialVideoPage(wikiURL);
    VetAddVideoComponentObject vetAddingVideo = specialVideos.clickAddAVideo();
    vetAddingVideo.addVideoByUrl(video.getUrl());
    specialVideos.verifyVideoAdded(video.getTitle());
    FilePage filePage = new FilePage().open(video.getFileName());
    // filePage.getGlobalNavigation().openAccountNavigation().clickLogOut();
    filePage.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
    DeletePageObject deletePage = filePage.deletePage();
    deletePage.submitDeletion();
    filePage = filePage.open(video.getFileName());
    filePage.verifyEmptyFilePage();
}
Also used : DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) YoutubeVideo(com.wikia.webdriver.common.core.video.YoutubeVideo) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) FilePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)26 Test (org.testng.annotations.Test)24 Execute (com.wikia.webdriver.common.core.annotations.Execute)21 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)18 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)14 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)12 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)11 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)5 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)5 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)4 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)4 SpecialVideosPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject)4 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)3 FilePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage)3 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)2 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)1 FeaturedVideoAdminPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.videohomepage.FeaturedVideoAdminPageObject)1 LatestVideoAdminPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.videohomepage.LatestVideoAdminPageObject)1