Search in sources :

Example 16 with VetAddVideoComponentObject

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);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) PreviewEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 17 with VetAddVideoComponentObject

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);
}
Also used : VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) WebElement(org.openqa.selenium.WebElement)

Example 18 with VetAddVideoComponentObject

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();
}
Also used : DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) YoutubeVideo(com.wikia.webdriver.common.core.video.YoutubeVideo) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) FilePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 19 with VetAddVideoComponentObject

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();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 20 with VetAddVideoComponentObject

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);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Aggregations

VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)26 Test (org.testng.annotations.Test)24 Execute (com.wikia.webdriver.common.core.annotations.Execute)21 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)18 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)14 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)12 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)11 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)5 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)5 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)4 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)4 SpecialVideosPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject)4 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)3 FilePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage)3 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)2 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)1 FeaturedVideoAdminPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.videohomepage.FeaturedVideoAdminPageObject)1 LatestVideoAdminPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.videohomepage.LatestVideoAdminPageObject)1