Search in sources :

Example 76 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class VetModalAlignmentTests method Vet_Modal_005_rightOnPage.

@Test(groups = { "VetModalAlignment_005" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_005_rightOnPage() {
    new ArticleContent().push();
    VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
    VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.adjustPosition(PositionsVideo.RIGHT);
    vetOptions.submit();
    visualEditMode.verifyVideoPosition(PositionsVideo.RIGHT);
    SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
    sourceEditMode.verifySourceModeEnabled();
    sourceEditMode.verifyVideoAlignment(PositionsVideo.RIGHT);
    PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
    previewMode.verifyVideoAlignment(PositionsVideo.RIGHT);
    previewMode.closePreviewModal();
    ArticlePageObject article = sourceEditMode.submitArticle();
    article.verifyVideoAlignment(PositionsVideo.RIGHT);
}
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 77 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class VetModalWidthTests method Vet_Modal_001_modalWidth.

@Test(groups = { "VetModalwidth_001" })
@Execute(asUser = User.USER)
public void Vet_Modal_001_modalWidth() {
    WikiBasePageObject base = new WikiBasePageObject();
    articleTitle = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject visualEditMode = base.navigateToArticleEditPage(wikiURL, articleTitle);
    VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.adjustWith(MODAL_WIDTH);
    vetOptions.submit();
    Assertion.assertEquals(visualEditMode.getVideoWidth(), MODAL_WIDTH);
    SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
    sourceEditMode.verifySourceModeEnabled();
    Assertion.assertEquals(sourceEditMode.getVideoWidth(), MODAL_WIDTH);
    PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
    Assertion.assertEquals(previewMode.getVideoWidth(), MODAL_WIDTH);
    previewMode.closePreviewModal();
    ArticlePageObject article = sourceEditMode.submitArticle();
    Assertion.assertEquals(article.getVideoThumbnailWidth(), MODAL_WIDTH);
}
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 78 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class VideosModuleTests method VideosModuleTest_004.

/**
   * Checks if the Videos Module is not showing any duplicate videos
   */
@Test(groups = { "VideosModule", "VideosModuleTest_004", "Media" })
public void VideosModuleTest_004() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    new ArticlePageObject().open();
    new VideosModuleComponentObject(driver).verifyNoDuplicates();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VideosModuleComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.videosmodule.VideosModuleComponentObject) Test(org.testng.annotations.Test)

Example 79 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyImagesInWhatLinksHerePage.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
public void verifyImagesInWhatLinksHerePage() {
    new ArticleContent().push(String.format("[[%s]]", PageContent.INFOBOX_2), "Infobox2_WhatLinksHere");
    // provide an article linking to testing Infobox
    new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
    new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
    ArticlePageObject article = new ArticlePageObject();
    article.open("Infobox2_WhatLinksHere");
    String articleName = article.getArticleName();
    SpecialWhatLinksHerePageObject whatLinksHere = article.openSpecialWhatLinksHere(wikiURL);
    whatLinksHere.clickPageInputField().typeInfoboxImageName("Infobox2").clickShowButton();
    Assertion.assertTrue(whatLinksHere.whatLinksHereContainsArticleName(articleName));
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) SpecialWhatLinksHerePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWhatLinksHerePageObject) Test(org.testng.annotations.Test)

Example 80 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject in project selenium-tests by Wikia.

the class PortableInfoboxTests method insertEmptyInfoboxInVE.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertEmptyInfoboxInVE() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    article.open();
    new ArticlePurger().purgeArticleAsAnon();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) Test(org.testng.annotations.Test)

Aggregations

ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)181 Test (org.testng.annotations.Test)169 Execute (com.wikia.webdriver.common.core.annotations.Execute)68 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)51 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)44 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)41 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)39 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)35 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)16 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)14 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)11 VisualEditorReviewChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog)9 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)7 SalesPitchDialog (com.wikia.webdriver.pageobjectsfactory.pageobject.communitypage.SalesPitchDialog)7 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)5 EmbedMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject)5 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)4