Search in sources :

Example 31 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject 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 32 with ArticlePageObject

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

the class EmbedMapTests method EmbedMapTests_002_VerifyEmbedMapElements.

@Test(groups = { "EmbedMapTests_002", "EmbedMapTests", "InteractiveMaps" })
@DontRun(env = { "dev", "sandbox", "preview" })
public void EmbedMapTests_002_VerifyEmbedMapElements() {
    ArticlePageObject article = new ArticlePageObject();
    article.open(InteractiveMapsContent.EMBED_MAP_ARTICLE_NAME);
    EmbedMapComponentObject embedMapDialog = article.clickViewEmbedMap();
    embedMapDialog.verifyEmbedMapModalOpened();
    embedMapDialog.verifyMapTitlePresented();
    embedMapDialog.verifyCloseButtonPresented();
    embedMapDialog.verifyMapElementsPresented();
    embedMapDialog.verifyBrandFooterNotVisible();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) EmbedMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject) Test(org.testng.annotations.Test) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Example 33 with ArticlePageObject

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

the class EmbedMapTests method EmbedMapTests_006_VerifyEmbeddedMapAddPinType.

@Test(enabled = false, groups = { "EmbedMapTests_006", "EmbedMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void EmbedMapTests_006_VerifyEmbeddedMapAddPinType() {
    WikiBasePageObject base = new WikiBasePageObject();
    ArticlePageObject article = new ArticlePageObject();
    article.open(InteractiveMapsContent.EMBED_MAP_ARTICLE_NAME);
    EmbedMapComponentObject embedMapDialog = article.clickViewEmbedMap();
    CreatePinTypesComponentObject pinTypesDialog = embedMapDialog.clickEditPinTypesButton();
    pinTypesDialog.verifyPinTypesDialog();
    pinTypesDialog.deletePinTypes();
    pinTypesDialog.typeManyPinTypeTitle(InteractiveMapsContent.PIN_TYPE_NAME, 4);
    pinTypesDialog.clickSave();
    embedMapDialog.verifyPinTypeExists(InteractiveMapsContent.PIN_TYPE_NAME);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) EmbedMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreatePinTypesComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 34 with ArticlePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject 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)

Example 35 with ArticlePageObject

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

the class VEImageTests method changeImageAlignment.

@Test(groups = { "VEImageTests", "VEMediaSetting" })
@Execute(asUser = User.USER_9)
public void changeImageAlignment() {
    int numOfMedia = 3;
    List<String> wikiTexts = new ArrayList<String>();
    wikiTexts.add("|centre");
    wikiTexts.add("|left");
    String randomArticleName = PageContent.ARTICLE_NAME_PREFIX + new VisualEditorPageObject().getTimeStamp();
    VisualEditorPageObject veCreatePage = new VisualEditorPageObject().openVEOnArticle(wikiURL, randomArticleName);
    VisualEditorAddMediaDialog mediaDialog = veCreatePage.searchImage("h");
    veCreatePage = mediaDialog.addExistingMedia(numOfMedia);
    veCreatePage.verifyMedias(numOfMedia);
    veCreatePage.clickPublishButton();
    new VisualEditorSaveChangesDialog(this.driver).savePage();
    veCreatePage.waitForPageLoad();
    ArticlePageObject article = new ArticlePageObject();
    article.openVEModeWithMainEditButton();
    VisualEditorPageObject ve = new VisualEditorPageObject();
    ve.alignMedia(2, Alignment.LEFT);
    ve.alignMedia(0, Alignment.CENTER);
    ve.verifyEditorSurfacePresent();
    ve.verifyVEToolBarPresent();
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(wikiTexts);
    saveDialog = reviewDialog.clickReturnToSaveFormButton();
    saveDialog.savePage();
    article.verifyVEPublishComplete();
}
Also used : VisualEditorAddMediaDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArrayList(java.util.ArrayList) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Execute(com.wikia.webdriver.common.core.annotations.Execute) 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