use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage in project selenium-tests by Wikia.
the class VideosModuleTests method visitorCanSeeVideosModuleOnArticleAndFilePages.
@Test(groups = { "VideosModule", "VideosModuleTest_001", "Media" })
public void visitorCanSeeVideosModuleOnArticleAndFilePages() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
VideosModuleComponentObject videosModule = new VideosModuleComponentObject(driver);
new ArticlePageObject().open();
videosModule.verifyVideosModuleShowing();
new FilePage().open(VideoContent.YOUTUBE_VIDEO_URL2_FILENAME);
videosModule.verifyVideosModuleShowing();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage in project selenium-tests by Wikia.
the class ImageStorageTests method ImageStorage_002_moveImage.
@Test(groups = { "ImageStorageTests", "ImageStorage_002" })
@UseUnstablePageLoadStrategy
@Execute(asUser = User.STAFF)
@RelatedIssue(issueID = "QAART-921")
public void ImageStorage_002_moveImage() {
String fileName = DateTime.now().getMillis() + PageContent.FILE;
new SpecialNewFilesPage().openSpecialNewFiles(wikiURL).addPhoto().selectFileToUpload(PageContent.FILE).hideWarnings().clickOnMoreOptions().setFileName(fileName).checkIgnoreAnyWarnings().clickUploadButton().verifyFileUploaded(fileName);
FilePage file = new FilePage().open(fileName, true);
RenamePageObject renamePage = file.renameUsingDropdown();
String imageNewName = DateTime.now().getMillis() + PageContent.FILERENAME;
renamePage.rename(imageNewName, true);
List<Notification> confirmNotifications = file.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, RenamePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), RenamePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
file.verifyHeader(imageNewName);
file = new FilePage().open(imageNewName, true);
renamePage = file.renameUsingDropdown();
renamePage.rename(fileName, true);
confirmNotifications = file.getNotifications(NotificationType.CONFIRM);
Assertion.assertTrue(confirmNotifications.size() == 1, RenamePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), RenamePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
file.verifyHeader(fileName);
DeletePageObject delete = file.deletePage();
delete.submitDeletion();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage in project selenium-tests by Wikia.
the class ImageServingTests method ImageServing_002_SpecialUploadTest.
@Test(groups = { "ImageServing_002", "ImageServing" }, dataProviderClass = FileDataProvider.class, dataProvider = "getFileNames")
@Execute(asUser = User.USER)
public void ImageServing_002_SpecialUploadTest(String fileName) {
WikiBasePageObject base = new WikiBasePageObject();
SpecialUploadPageObject upload = base.openSpecialUpload(wikiURL);
upload.selectFileToUpload(PageContent.FILE);
upload.typeFileName(fileName);
upload.checkIgnoreAnyWarnings();
FilePage filePage = upload.clickUploadButton();
filePage.verifySelectedTab("about");
filePage.verifyHeader(fileName);
String imageURL = filePage.getImageUrl();
String imageThumbnailURL = filePage.getImageThumbnailUrl();
filePage.verifyURLStatus(200, imageURL);
filePage.verifyURLStatus(200, imageThumbnailURL);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage in project selenium-tests by Wikia.
the class FilePageTests method filePage002_tabsLoggedIn.
/**
* Verify that file page tabs will save their state for logged in users when they navigate away
* from the page and back to it.
*/
@Test(groups = { "FilePage", "filePage002_tabsLoggedIn", "Media" })
@Execute(asUser = User.USER)
public void filePage002_tabsLoggedIn() {
FilePage filePage = new FilePage().open(URLsContent.FILENAME_001);
filePage.refreshAndVerifyTabs(0);
filePage.refreshAndVerifyTabs(1);
filePage.refreshAndVerifyTabs(2);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage in project selenium-tests by Wikia.
the class FilePageTests method filePage004_delete.
/**
* Verify that a video can be deleted from the File page
*/
@RelatedIssue(issueID = "MAIN-4294")
@Test(groups = { "FilePage", "filePage004_delete", "Media" })
public void filePage004_delete() {
// Go to Special:Videos to add a video
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("data");
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());
// Now delete the video
FilePage filePage = new FilePage().open(video.getFileName());
DeletePageObject deletePage = filePage.deletePage();
deletePage.submitDeletion();
// Go back to the file page and make sure its gone
filePage = filePage.open(video.getFileName());
filePage.verifyEmptyFilePage();
}
Aggregations