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