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();
}
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();
}
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();
}
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);
}
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");
}
Aggregations