Search in sources :

Example 1 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class MiniEditorComponentObject method addVideoMiniEditor.

public void addVideoMiniEditor(String url) {
    wait.forElementClickable(addVideoButton);
    scrollAndClick(addVideoButton);
    VetAddVideoComponentObject vetAddingVideo = new VetAddVideoComponentObject(driver);
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.submit();
    verifyVideoMiniEditor();
}
Also used : VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)

Example 2 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class VetAddingVideoTests method VetAddVideo_002_MessageWallLibrary.

@Test(groups = { "VetAddVideo_002" })
@RelatedIssue(issueID = "QAART-889")
@Execute(asUser = User.USER)
public void VetAddVideo_002_MessageWallLibrary() {
    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.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
    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)

Example 3 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class VetModalAlignmentTests method Vet_Modal_001_leftOnPage.

/**
   * 1. Verify left alignment in visual mode, source mode, preview, and published page, 2. Verify
   * left alignment in vet modal when page edited, 3. Verify right alignment in visual mode, source
   * mode, preview, and published page, 4. Verify right alignment in vet modal when page edited, 5.
   * Verify center alignment in visual mode, source mode, preview, and published page, 6. Verify
   * center alignment in vet modal when page edited,
   */
@Test(groups = { "VetModalAlignment_001" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_001_leftOnPage() {
    new ArticleContent().push("");
    VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
    VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.adjustPosition(PositionsVideo.LEFT);
    vetOptions.submit();
    visualEditMode.verifyVideoPosition(PositionsVideo.LEFT);
    SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
    sourceEditMode.verifySourceModeEnabled();
    sourceEditMode.verifyVideoAlignment(PositionsVideo.LEFT);
    PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
    previewMode.verifyVideoAlignment(PositionsVideo.LEFT);
    previewMode.closePreviewModal();
    ArticlePageObject article = sourceEditMode.submitArticle();
    article.verifyVideoAlignment(PositionsVideo.LEFT);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) 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 4 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class VetModalAlignmentTests method Vet_Modal_003_centerOnPage.

@Test(groups = { "VetModalAlignment_003" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_003_centerOnPage() {
    new ArticleContent().push();
    VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
    VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.adjustPosition(PositionsVideo.CENTER);
    vetOptions.submit();
    visualEditMode.verifyVideoPosition(PositionsVideo.CENTER);
    SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
    sourceEditMode.verifySourceModeEnabled();
    sourceEditMode.verifyVideoAlignment(PositionsVideo.CENTER);
    PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
    previewMode.verifyVideoAlignment(PositionsVideo.CENTER);
    previewMode.closePreviewModal();
    ArticlePageObject article = sourceEditMode.submitArticle();
    article.verifyVideoAlignment(PositionsVideo.CENTER);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) 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 5 with VetOptionsComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject in project selenium-tests by Wikia.

the class VetArticlePlaceholderTests method userCanAddVideoFromWikiaUsingPlaceholderInEditMode.

@Test(groups = { "VideoArticlePlacehoder_004" })
@Execute(asUser = User.STAFF, onWikia = "mobileregressiontesting")
public void userCanAddVideoFromWikiaUsingPlaceholderInEditMode() {
    new ArticleContent().push(SourceModeContent.PLACEHOLDERS);
    // Added cause of MAIN-6374 issue
    new ArticlePageObject().open();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    VetAddVideoComponentObject vetAddingVideo = (VetAddVideoComponentObject) visualEditMode.modifyComponent(Components.VIDEO_PLACEHOLDER);
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    visualEditMode.verifyVideo();
    ArticlePageObject article = visualEditMode.submitArticle();
    article.verifyVideo();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) 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)

Aggregations

VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)24 Test (org.testng.annotations.Test)23 Execute (com.wikia.webdriver.common.core.annotations.Execute)22 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)18 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)17 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)15 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)15 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)2 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)1 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)1