use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class VetModalCaptionTests method VetModalCaption_001_modalCaption.
@Test(groups = { "VetModalCaption_001" })
@Execute(asUser = User.USER)
public void VetModalCaption_001_modalCaption() {
WikiBasePageObject base = new WikiBasePageObject();
articleTitleCaption = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
VisualEditModePageObject visualEditMode = base.navigateToArticleEditPage(wikiURL, articleTitleCaption);
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
caption = PageContent.CAPTION + vetOptions.getTimeStamp();
vetOptions.setCaption(caption);
vetOptions.submit();
Assertion.assertEquals(visualEditMode.getVideoCaption(), caption);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
Assertion.assertTrue(sourceEditMode.getContent().contains(caption));
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
Assertion.assertEquals(previewMode.getVideoCaption(), caption);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
Assertion.assertEquals(article.getVideoCaption(), caption);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class FeaturedVideoAdminPageObject method clickAddVideo.
public VetAddVideoComponentObject clickAddVideo() {
wait.forElementVisible(featuredVideoForm);
WebElement addVideoButton = featuredVideoForm.findElement(By.cssSelector(".add-video-button"));
addVideoButton.click();
PageObjectLogging.log("VetAddVideoComponentObject", "Add video button clicked", true);
return new VetAddVideoComponentObject(driver);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject 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();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class ArticleFeaturesCRUDTestsUser method addVideo.
@Test(groups = { "ArticleFeaturesCRUDUser_007", "Media" })
@Execute(asUser = User.USER)
public void addVideo() {
new ArticleContent().clear();
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
VetAddVideoComponentObject vetAddVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.setCaption(PageContent.CAPTION);
vetOptions.submit();
visualEditMode.verifyVideo();
visualEditMode.submitArticle().verifyVideo();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class VetAddingVideoTests method VetAddVideo_001_MessageWallProvider.
@Test(groups = { "VetAddVideo_001" })
@RelatedIssue(issueID = "QAART-889", comment = "test fails randomly")
@Execute(asUser = User.USER)
public void VetAddVideo_001_MessageWallProvider() {
MessageWall wall = new MessageWall(driver).open(credentials.userName);
String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
MiniEditorComponentObject mini = wall.triggerMessageArea();
wall.clickBoldButton();
mini.switchAndWrite(message);
wall.setTitle(title);
VetAddVideoComponentObject vetAddingVideo = mini.clickAddVideo();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL3);
vetOptions.setCaption(PageContent.CAPTION);
vetOptions.submit();
mini.verifyVideoMiniEditor();
wall.submit();
wall.verifyPostedMessageVideo(title);
}
Aggregations