Search in sources :

Example 11 with SpecialVideosPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject in project selenium-tests by Wikia.

the class FilePageTests method filePage004_delete.

/**
   * Verify that a video can be deleted from the File page
   */
@RelatedIssue(issueID = "MAIN-4294")
@Test(groups = { "FilePage", "filePage004_delete", "Media" })
public void filePage004_delete() {
    // Go to Special:Videos to add a video
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("data");
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
    specialVideos.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
    specialVideos.openSpecialVideoPage(wikiURL);
    // Add a Youtube video we'll delete
    VetAddVideoComponentObject vetAddingVideo = specialVideos.clickAddAVideo();
    vetAddingVideo.addVideoByUrl(video.getUrl());
    // Verify the video is actually there
    specialVideos.verifyVideoAdded(video.getTitle());
    // Now delete the video
    FilePage filePage = new FilePage().open(video.getFileName());
    DeletePageObject deletePage = filePage.deletePage();
    deletePage.submitDeletion();
    // Go back to the file page and make sure its gone
    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) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 12 with SpecialVideosPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject 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)

Example 13 with SpecialVideosPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject in project selenium-tests by Wikia.

the class VetSpecialVideosTests method SpecialVideos_002_Library.

@Test(enabled = false, groups = { "VetTests002" })
@Execute(asUser = User.USER)
public void SpecialVideos_002_Library() {
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
    specialVideos.openSpecialVideoPage(wikiURL);
    VetAddVideoComponentObject vetAddingVideo = specialVideos.clickAddAVideo();
    vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
    specialVideos.verifyVideoAdded(vetAddingVideo.getVideoName());
}
Also used : VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 14 with SpecialVideosPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject in project selenium-tests by Wikia.

the class LightboxTests method LightboxTest_006_verifyCarousel.

@Test(groups = "Lightbox_006")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_006_verifyCarousel() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialVideosPageObject specialVideos = base.openSpecialVideoPage(wikiURL);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(0);
    lightbox.clickPinButton();
    lightbox.clickCarouselRight();
    lightbox.clickCarouselLeft();
    lightbox.verifyCarouselLeftDisabled();
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) LightboxComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

SpecialVideosPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject)14 Test (org.testng.annotations.Test)14 Execute (com.wikia.webdriver.common.core.annotations.Execute)8 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)6 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)5 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)5 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)5 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)5 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)4 FilePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage)4 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)2 VideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.media.VideoComponentObject)2 AddMediaModalComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.AddMediaModalComponentObject)1 DetachedRegisterPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage)1 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)1 WatchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.watch.WatchPageObject)1