Search in sources :

Example 1 with SpecialVideosPageObject

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

the class LightboxTests method LightboxTest_007_specialVideo.

@Test(groups = "LightboxTest_007")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_007_specialVideo() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialVideosPageObject specialVideos = base.openSpecialVideoPage(wikiURL);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(0);
    lightbox.verifyLightboxPopup();
    lightbox.verifyLightboxVideo();
}
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)

Example 2 with SpecialVideosPageObject

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

the class LightboxTests method LightboxTest_008_filepage_video.

/**
   * Open lightbox from Special:Videos, verify title url, verify More Info button and verify file
   * page (logged-in user)
   */
@Test(groups = "LightboxTest_008")
@Execute(asUser = User.USER, disableFlash = "false")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_008_filepage_video() {
    SpecialVideosPageObject specialVideos = new WikiBasePageObject().openSpecialVideoPage(wikiURL);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(0);
    lightbox.verifyLightboxPopup();
    lightbox.verifyLightboxVideo();
    FilePage filePage = lightbox.clickTitle();
    filePage.verifyTabsExistVideo();
    filePage.verifyEmbeddedVideoIsPresent();
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) FilePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) LightboxComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 3 with SpecialVideosPageObject

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

the class ForcedLoginTests method anonCanLogInViaAuthModalWhenAddingVideo.

@Test(groups = "ForcedLogin_anonCanLogInViaAuthModalWhenAddingVideo")
public void anonCanLogInViaAuthModalWhenAddingVideo() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialVideosPageObject specialPage = base.openSpecialVideoPage(wikiURL);
    specialPage.clickAddAVideo();
    DetachedSignInPage authModal = new DetachedRegisterPage().navigateToSignIn();
    authModal.login(credentials.userName10, credentials.password10);
    AddMediaModalComponentObject modal = new AddMediaModalComponentObject(driver);
    modal.closeAddVideoModal();
    specialPage.verifyUserLoggedIn(credentials.userName10);
}
Also used : AddMediaModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.AddMediaModalComponentObject) DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DetachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Test(org.testng.annotations.Test)

Example 4 with SpecialVideosPageObject

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

the class FilePageTests method filePage005_deleteFromHistory.

/**
   * Verify that a video can be deleted from the File page
   */
@Test(groups = { "FilePage", "filePage005_deleteFromHistory", "Media" })
@RelatedIssue(issueID = "SUS-317", comment = "Product code defect. Test manually that the video can be deleted")
public void filePage005_deleteFromHistory() {
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("pokemon");
    // Go to Special:Videos to add a video
    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());
    // Go to the history tab and add a second video to test deleting a version
    FilePage filePage = new FilePage().open(video.getFileName());
    filePage.selectHistoryTab();
    filePage.replaceVideo(VideoContent.YOUTUBE_VIDEO_URL5);
    // Load the file page again, should have the same name
    filePage.open(video.getFileName()).verifyEmbeddedVideoIsPresent();
    //Removed following lines until SUS-317 is fixed
    //// Go to the history tab and verify there are at least two videos
    //filePage.selectHistoryTab();
    //filePage.verifyVersionCountAtLeast(2);
    //// Delete the second version
    //DeletePageObject deletePage = filePage.deleteVersion(2);
    //deletePage.submitDeletion();
    //Removed above lines until SUS-317is fixed
    // Load the file page again, should have the same name
    filePage.open(video.getFileName()).verifyEmbeddedVideoIsPresent();
    // Delete the first version and thus the whole page
    DeletePageObject deletePage = filePage.deleteVersion(1);
    deletePage.submitDeletion();
    // Go back to the file page and make sure its gone
    filePage.open(video.getFileName()).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 5 with SpecialVideosPageObject

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

the class VideosPageTests method VideosPageTest_003_deleteVideo_removedFromRecentVideos.

/**
     * Checks if a video can successfully be deleted from the Special:Videos page. Specifically, this
     * test checks if, after the video has been deleted, it is no longer present in the list of most
     * recent videos on Special:Videos. (Note: in order to accomplish this the test also adds a video
     * before hand to ensure that 1.) the test is sustainable, and 2.) it knows what the most recent
     * video is).
     */
@Execute(asUser = User.STAFF)
@Test(groups = { "VideosPage", "VideosPageTest_003", "Media" })
@RelatedIssue(issueID = "SUS-863")
public void VideosPageTest_003_deleteVideo_removedFromRecentVideos() {
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery(VIDEO_QUERY);
    specialVideos.addVideoViaAjax(video.getUrl());
    Assertion.assertTrue(specialVideos.isNewVideoAdded());
    String addedVideoTitle = specialVideos.getNewestVideoTitle();
    specialVideos.deleteNewestVideo();
    List<Notification> confirmNotifications = specialVideos.getNotifications(NotificationType.CONFIRM);
    Assertion.assertEquals(confirmNotifications.size(), 1, SpecialVideosPageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
    Notification notification = confirmNotifications.stream().findFirst().get();
    Assertion.assertTrue(notification.isVisible(), SpecialVideosPageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
    Assertion.assertStringContains(notification.getMessage(), addedVideoTitle);
    Assertion.assertNotEquals(specialVideos.getNewestVideoTitle(), addedVideoTitle, "Video is still visible as newest video");
}
Also used : YoutubeVideo(com.wikia.webdriver.common.core.video.YoutubeVideo) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

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