Search in sources :

Example 6 with SpecialVideosPageObject

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

the class PlayingVideoTests method PlayingVideoTests_004_ign.

@Test(groups = { "Media", "ProviderTests", "PlayingVideoTests", "PlayingVideoTests_004" })
@Execute(onWikia = "sktest123", disableFlash = "false")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void PlayingVideoTests_004_ign() {
    int itemNumber = 0;
    String providerName = "ign";
    String queryString = "provider=" + providerName;
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver).openSpecialVideoPage(wikiURL, queryString);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(itemNumber);
    lightbox.verifyLightboxPopup();
    lightbox.verifyLightboxVideo();
    lightbox.verifyVideoAutoplay(providerName);
    VideoComponentObject video = lightbox.getVideoPlayer();
    video.verifyVideoIframeVisible();
    video.verifyVideoIframeWidth();
    video.verifyVideoIgnEmbed();
}
Also used : VideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.media.VideoComponentObject) 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 7 with SpecialVideosPageObject

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

the class PlayingVideoTests method PlayingVideoTests_005_anyclip.

@Test(enabled = false, groups = { "Media", "ProviderTests", "PlayingVideoTests", "PlayingVideoTests_005" })
@RelatedIssue(issueID = "QAART-750", comment = "Test disabled as Selenium doesn't allow to access" + "elements with <object> tag. Check after Selenium update.")
@Execute(onWikia = "sktest123", disableFlash = "false")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void PlayingVideoTests_005_anyclip() {
    int itemNumber = 0;
    String providerName = "anyclip";
    String queryString = "provider=" + providerName;
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver).openSpecialVideoPage(wikiURL, queryString);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(itemNumber);
    lightbox.verifyLightboxPopup();
    lightbox.verifyLightboxVideo();
    lightbox.verifyVideoAutoplay(providerName);
    VideoComponentObject video = lightbox.getVideoPlayer();
    video.verifyVideoEmbedWidth();
    video.verifyFlashVideoObjectVisible();
    video.verifyVideoAnyclipEmbed();
}
Also used : VideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.media.VideoComponentObject) 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) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 8 with SpecialVideosPageObject

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

the class FollowVideosTests method FollowVideo_001_setup.

@Test(groups = "FollowVideo")
@Execute(asUser = User.USER)
public void FollowVideo_001_setup() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialVideosPageObject special = base.openSpecialVideoPage(wikiURL);
    WatchPageObject watch = special.unfollowVideo(wikiURL, special.getRandomVideo());
    watch.confirmWatchUnwatch();
    special.verifyPageUnfollowed();
    videoName = special.getHeaderText();
}
Also used : WatchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.watch.WatchPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 9 with SpecialVideosPageObject

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

the class VideosPageTests method VideosPageTest_002_deleteVideo_notificationContainsTitle.

/**
     * Checks if a video can successfully be deleted from the Special:Videos page. Specifically, this
     * test checks if, after the video has been deleted, its title shows up in the delete confirmation
     * presented by Global Notifications. (Note: This test also adds a video beforehand to make sure
     * running this test is sustainable).
     */
@Execute(asUser = User.STAFF)
@Test(groups = { "VideosPage", "VideosPageTest_002", "Media" })
@RelatedIssue(issueID = "SUS-755")
public void VideosPageTest_002_deleteVideo_notificationContainsTitle() {
    SpecialVideosPageObject specialVideos = new SpecialVideosPageObject(driver);
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery(VIDEO_QUERY);
    specialVideos.addVideoViaAjax(video.getUrl());
    Assertion.assertTrue(specialVideos.isNewVideoAdded());
    String addedVideoTitle = specialVideos.getNewestVideoTitle();
    String addedVideoTitlePattern = addedVideoTitle;
    if (addedVideoTitle.endsWith(SUFFIX_FOR_LONG_TITLE)) {
        addedVideoTitlePattern = addedVideoTitle.replace(SUFFIX_FOR_LONG_TITLE, "");
    }
    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(), addedVideoTitlePattern);
}
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)

Example 10 with SpecialVideosPageObject

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

the class VideosPageTests method VideosPageTest_001_UIComponentsPresence.

/**
     * Verify UI elements on the Special:Videos page Logged-Out
     */
@Test(groups = { "VideosPage", "VideosPageTest_001", "Media" })
public void VideosPageTest_001_UIComponentsPresence() {
    SpecialVideosPageObject specialVideos = new WikiBasePageObject().openSpecialVideoPageMostRecent(wikiURL);
    Assertion.assertTrue(specialVideos.isHeaderVisible(), "Header is not visible");
    Assertion.assertTrue(specialVideos.isAddVideoButtonClickable(), "Add video button is not clickable");
    Assertion.assertTrue(specialVideos.isNewestVideoVisible(), "Newest video is not visible");
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Test(org.testng.annotations.Test)

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