use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage 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.filepage.FilePage in project selenium-tests by Wikia.
the class ImageStorageTests method ImageStorage_001_deleteImage.
@Test(groups = { "ImageStorageTests", "ImageStorage_001" })
@UseUnstablePageLoadStrategy
@Execute(asUser = User.USER_2)
@RelatedIssue(issueID = "QAART-1028")
public void ImageStorage_001_deleteImage() {
SpecialNewFilesPage filesPage = new SpecialNewFilesPage().openSpecialNewFiles(wikiURL);
filesPage.addPhoto();
filesPage.selectFileToUpload(PageContent.FILE);
String fileName = DateTime.now().getMillis() + PageContent.FILE;
filesPage.clickOnMoreOptions();
filesPage.setFileName(fileName);
filesPage.checkIgnoreAnyWarnings();
filesPage.clickUploadButton();
filesPage.verifyFileUploaded(fileName);
FilePage file = new FilePage().open(fileName, true);
imageURL = file.getImageUrl();
imageThumbnailURL = file.getImageThumbnailUrl();
file.verifyURLStatus(200, imageURL);
file.verifyURLStatus(200, imageThumbnailURL);
file.loginAs(User.STAFF);
DeletePageObject delete = file.deletePage();
delete.submitDeletion();
List<Notification> confirmNotifications = filesPage.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, DeletePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), DeletePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
filesPage.verifyURLStatus(404, imageURL);
filesPage.verifyURLStatus(404, imageThumbnailURL);
confirmNotifications = delete.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, DeletePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
SpecialRestorePageObject restore = confirmNotifications.stream().findFirst().get().undelete();
restore.giveReason(PageContent.CAPTION);
restore.restorePage();
confirmNotifications = restore.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialRestorePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), SpecialRestorePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
file.verifyURLStatus(200, imageURL);
file.verifyURLStatus(200, imageThumbnailURL);
file.deletePage();
delete.submitDeletion();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage in project selenium-tests by Wikia.
the class FilePageTests method filePage001_tabs.
/**
* Verify functionality of tabs on file pages in Oasis. When a tab is clicked, the corresponding
* content should be displayed.
*/
@Test(groups = { "FilePage", "filePage001_tabs", "Media" })
public void filePage001_tabs() {
FilePage filePage = new FilePage();
filePage.open(URLsContent.FILENAME_001);
filePage.verifySelectedTab("about");
filePage.clickTab(FilePage.HISTORY_TAB);
filePage.verifySelectedTab("history");
filePage.clickTab(FilePage.ABOUT_TAB);
filePage.verifySelectedTab("about");
filePage.clickTab(FilePage.METADATA_TAB);
filePage.verifySelectedTab("metadata");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage 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.filepage.FilePage in project selenium-tests by Wikia.
the class LightboxTests method LightboxTest_009_filepage_image.
/**
* Open lightbox from Special:NewFiles, verify title url, verify More Info button and verify file
* page (logged-in user)
*/
@Test(groups = "LightboxTest_009")
@RelatedIssue(issueID = "MAIN-6170", comment = "Test manually")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_009_filepage_image() {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
SpecialNewFilesPage specialNewFiles = base.openSpecialNewFiles(wikiURL);
int itemNumber = 2;
LightboxComponentObject lightbox = specialNewFiles.openLightbox(itemNumber);
lightbox.verifyLightboxPopup();
lightbox.verifyLightboxImage();
// lightbox.verifyTitleUrl(fileUrl);
// lightbox.verifyMoreInfoUrl(fileUrl);
FilePage filePage = lightbox.clickTitle();
filePage.verifyTabsExistImage();
}
Aggregations